Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c087cc5

Browse files
authoredNov 15, 2024
Merge pull request #1285 from nativescript-community/develop
fix: `fontWithCTFont` not return the correct font
2 parents dd061b8 + fa0d149 commit c087cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Core/Source/UIFont+DTCoreText.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ @implementation UIFont (DTCoreText)
1414

1515
+ (UIFont *)fontWithCTFont:(CTFontRef)ctFont
1616
{
17-
NSString *fontName = (__bridge_transfer NSString *)CTFontCopyName(ctFont, kCTFontPostScriptNameKey);
17+
NSString *fontName = (__bridge_transfer NSString *)CTFontCopyName(ctFont, kCTFontFullNameKey);
1818

1919
CGFloat fontSize = CTFontGetSize(ctFont);
2020
UIFont *font = [UIFont fontWithName:fontName size:fontSize];

0 commit comments

Comments
 (0)
Please sign in to comment.