File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
renderer/native/ios/renderer Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -284,11 +284,16 @@ + (UIFont *)updateFont:(UIFont *)font
284
284
// Gracefully handle being given a font name rather than font family, for
285
285
// example: "Helvetica Light Oblique" rather than just "Helvetica".
286
286
if (!didFindFont && familyName.length > 0 && fontNamesForFamilyName (familyName).count == 0 ) {
287
- familyName = [HippyFont familyNameWithCSSNameMatching: familyName] ?: familyName;
288
- fontWeight = weight ? fontWeight : weightOfFont (font);
289
- isItalic = style ? isItalic : isItalicFont (font);
290
- isCondensed = isCondensedFont (font);
291
- font = cachedSystemFont (fontSize, fontWeight);
287
+ font = [UIFont fontWithName: familyName size: fontSize];
288
+ if (font) {
289
+ didFindFont = YES ;
290
+ }
291
+ else {
292
+ fontWeight = weight ? fontWeight : weightOfFont (font);
293
+ isItalic = style ? isItalic : isItalicFont (font);
294
+ isCondensed = isCondensedFont (font);
295
+ font = cachedSystemFont (fontSize, fontWeight);
296
+ }
292
297
293
298
if (font) {
294
299
// It's actually a font name, not a font family name,
You can’t perform that action at this time.
0 commit comments