Skip to content

Commit

Permalink
fix(ios): revert rename hippy prefix for compatibility part2
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Jan 3, 2024
1 parent a1cba87 commit e377647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renderer/native/ios/renderer/HippyFont.mm
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ + (UIFont *)updateFont:(UIFont *)font

// Gracefully handle being given a font name rather than font family, for
// example: "Helvetica Light Oblique" rather than just "Helvetica".
if (font && !didFindFont && familyName.length > 0 && fontNamesForFamilyName(familyName).count == 0) {
if (!didFindFont && familyName.length > 0 && fontNamesForFamilyName(familyName).count == 0) {
familyName = font.familyName;
fontWeight = weight ? fontWeight : weightOfFont(font);
isItalic = style ? isItalic : isItalicFont(font);
Expand Down Expand Up @@ -311,7 +311,7 @@ + (UIFont *)updateFont:(UIFont *)font
}

// Apply font variants to font object
if (font && variant) {
if (variant) {
NSArray *fontFeatures = [HippyConvert NativeRenderFontVariantDescriptorArray:variant];
UIFontDescriptor *fontDescriptor =
[font.fontDescriptor fontDescriptorByAddingAttributes:
Expand Down

0 comments on commit e377647

Please sign in to comment.