From b6646d1c4cba256713a2ec38a112a9a50e9ad633 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Thu, 30 Apr 2015 12:21:06 -0700 Subject: [PATCH] [ReactNative] Honor fontWeight once again --- 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 465d1f0bb..5802a80f6 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -733,11 +733,6 @@ static BOOL RCTFontIsCondensed(UIFont *font) isItalic = [self RCTFontStyle:style]; } - // Get font weight - if (weight) { - fontWeight = [self RCTFontWeight:weight]; - } - // Gracefully handle being given a font name rather than font family, for // example: "Helvetica Light Oblique" rather than just "Helvetica". if ([UIFont fontNamesForFamilyName:familyName].count == 0) { @@ -756,6 +751,11 @@ static BOOL RCTFontIsCondensed(UIFont *font) } } + // Get font weight + if (weight) { + fontWeight = [self RCTFontWeight:weight]; + } + // Get the closest font that matches the given weight for the fontFamily UIFont *bestMatch = [UIFont fontWithName:font.fontName size: fontSize]; CGFloat closestWeight;