[ReactNative] Honor fontWeight once again
This commit is contained in:
parent
eb0476074f
commit
b6646d1c4c
|
@ -733,11 +733,6 @@ static BOOL RCTFontIsCondensed(UIFont *font)
|
||||||
isItalic = [self RCTFontStyle:style];
|
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
|
// Gracefully handle being given a font name rather than font family, for
|
||||||
// example: "Helvetica Light Oblique" rather than just "Helvetica".
|
// example: "Helvetica Light Oblique" rather than just "Helvetica".
|
||||||
if ([UIFont fontNamesForFamilyName:familyName].count == 0) {
|
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
|
// Get the closest font that matches the given weight for the fontFamily
|
||||||
UIFont *bestMatch = [UIFont fontWithName:font.fontName size: fontSize];
|
UIFont *bestMatch = [UIFont fontWithName:font.fontName size: fontSize];
|
||||||
CGFloat closestWeight;
|
CGFloat closestWeight;
|
||||||
|
|
Loading…
Reference in New Issue