From e5aeb31d6f204509367da519f4034f0d2beb7755 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Wed, 8 Apr 2015 19:17:26 -0700 Subject: [PATCH] [ReactNative] : apply the fontWeight correctly if fontFamily style is also present --- React/Base/RCTConvert.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index fe9a9456b..a46379ae8 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -670,11 +670,6 @@ static BOOL RCTFontIsCondensed(UIFont *font) isCondensed = RCTFontIsCondensed(font); } - // Get font weight - if (weight) { - fontWeight = [self RCTFontWeight:weight]; - } - // Get font style if (style) { isItalic = [self RCTFontStyle:style]; @@ -700,6 +695,11 @@ static BOOL RCTFontIsCondensed(UIFont *font) } } + // Get font weight + if (weight) { + fontWeight = [self RCTFontWeight:weight]; + } + // Get closest match UIFont *bestMatch = font; CGFloat closestWeight = font ? RCTWeightOfFont(font) : INFINITY;