diff --git a/React/Views/RCTFont.mm b/React/Views/RCTFont.mm index 75988e8243e200..679f2cea43ebe2 100644 --- a/React/Views/RCTFont.mm +++ b/React/Views/RCTFont.mm @@ -355,16 +355,18 @@ + (UIFont *)updateFont:(UIFont *)font } } - // Get the closest font that matches the given weight for the fontFamily - CGFloat closestWeight = INFINITY; NSArray *names = fontNamesForFamilyName(familyName); - for (NSString *name in names) { - UIFont *match = [UIFont fontWithName:name size:fontSize]; - if (isItalic == isItalicFont(match) && isCondensed == isCondensedFont(match)) { - CGFloat testWeight = weightOfFont(match); - if (ABS(testWeight - fontWeight) < ABS(closestWeight - fontWeight)) { - font = match; - closestWeight = testWeight; + if (!didFindFont) { + // Get the closest font that matches the given weight for the fontFamily + CGFloat closestWeight = INFINITY; + for (NSString *name in names) { + UIFont *match = [UIFont fontWithName:name size:fontSize]; + if (isItalic == isItalicFont(match) && isCondensed == isCondensedFont(match)) { + CGFloat testWeight = weightOfFont(match); + if (ABS(testWeight - fontWeight) < ABS(closestWeight - fontWeight)) { + font = match; + closestWeight = testWeight; + } } } }