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;