Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit 7abe695

Browse files
committed
Simplify italic font method
1 parent 5d3203f commit 7abe695

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

WordPress-iOS-Shared/Core/WPFontManager.m

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ + (UIFont *)systemLightFontOfSize:(CGFloat)size
7474

7575
+ (UIFont *)systemItalicFontOfSize:(CGFloat)size
7676
{
77-
return [self italicFontWithFont:[UIFont systemFontOfSize:size weight:UIFontWeightRegular]];
77+
return [UIFont italicSystemFontOfSize:size];
7878
}
7979

8080
+ (UIFont *)systemBoldFontOfSize:(CGFloat)size
@@ -175,11 +175,4 @@ + (void)dynamicallyLoadFontResourceNamed:(NSString *)name withExtension:(NSStrin
175175
}
176176
}
177177

178-
+ (UIFont *)italicFontWithFont:(UIFont *)font
179-
{
180-
UIFontDescriptor *fontDescriptor = font.fontDescriptor;
181-
fontDescriptor = [fontDescriptor fontDescriptorWithSymbolicTraits:UIFontDescriptorTraitItalic];
182-
return [UIFont fontWithDescriptor:fontDescriptor size:font.pointSize];
183-
}
184-
185178
@end

0 commit comments

Comments
 (0)