Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Fix Chinese text italic property
Browse files Browse the repository at this point in the history
  • Loading branch information
Txink committed Jul 18, 2019
1 parent 5bcbe6d commit f8c3d29
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
Expand Up @@ -607,12 +607,7 @@ + (UIFont *)fontWithSize:(CGFloat)size textWeight:(CGFloat)textWeight textStyle:
UIFontDescriptor *fontD = font.fontDescriptor;
UIFontDescriptorSymbolicTraits traits = 0;

if (WX_SYS_VERSION_LESS_THAN(@"8.2")) {
traits = ((textWeight-0.4) >= 0.0) ? (traits | UIFontDescriptorTraitBold) : traits;
}else {
traits = (textWeight-UIFontWeightBold >= 0.0) ? (traits | UIFontDescriptorTraitBold) : traits;
}

traits = (textWeight-UIFontWeightBold >= 0.0) ? (traits | UIFontDescriptorTraitBold) : traits;
if (textStyle == WXTextStyleItalic || traits != 0) {
if (traits != 0) {
fontD = [fontD fontDescriptorWithSymbolicTraits:traits];
Expand Down

0 comments on commit f8c3d29

Please sign in to comment.