Core Text

RSS for tag

Create text layouts, optimize font handling, and access font metrics and glyph data using Core Text.

Posts under Core Text tag

23 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

PingFang.ttc font file is missing in iOS 18.0
I'm an iOS developer, and I've been testing our app in iOS 18.0 Beta. I noticed that there's a problem with the font rendering, and after troubleshooting, I've found out that it's caused by the removal of the PingFang.ttc font in 18.0. I would like to ask the reason for removing this font file and which font should be used to display Chinese in the future? My test device is an iPhone 11 Pro and the system version is iOS 18.0 (22A5297). I have also tested Beta 1 and it has the same issue. In previous versions of the system, the PingFang font is located in this directory /System/Library/Fonts/LanguageSupport/PingFang.ttc. But in iOS 18.0, the font file in this directory has become Kohinoor.ttc, and I've tested that this font can't display Chinese either. I traversed the following system font directories and could not find the PingFang.ttc font file. /System/Library/Fonts/AppFonts /System/Library/Fonts/Core /System/Library/Fonts/CoreAddition /System/Library/Fonts/CoreUI /System/Library/Fonts/LanguageSupport /System/Library/Fonts/UnicodeSupport /System/Library/Fonts/Watch Looking for answers, thanks for the help!
1
1
323
3w
iOS 18 beta1/2 CoreText Crash
0 libobjc.A.dylib 0x000000018e27f008 objc_msgSend + 8 (:-1) 1 CoreFoundation 0x0000000190eaa4bc -[__NSDictionaryM objectForKey:] + 168 (NSDictionaryM.m:179) 2 CoreFoundation 0x0000000190f003e8 -[NSDictionary containsKey:] + 56 (NSDictionary.m:80) 3 CoreFoundation 0x0000000190f0006c CFDictionaryContainsKey + 52 (CFDictionary.c:265) 4 libGSFont.dylib 0x00000001af98cc14 GSFontIsOverriddenSystemFontName + 32 (GSFont.m:2860) 5 CoreText 0x0000000192d6f1fc CopyAttributeForSystemFont(__CFString const*, __CFString const*) + 64 (MetadataSupport.cpp:194) 6 CoreText 0x0000000192d6edd4 AddVariationInfo(TCFMutableDictionary&, __CFString const*) + 60 (SplicedFontSupport.cpp:6760) 7 CoreText 0x0000000192de1ea0 MakeSpliceDescriptor(__CFString const*, unsigned long, __CFString const*, __CFString const*, __CFNumber const*, __CFNumber const*, unsigned int, CTFontTextStylePlatform, unsigned int, __CFNumber co... + 4504 (SplicedFontSupport.cpp:7429) 8 CoreText 0x0000000192ddd374 TDescriptorSource::CopySpliceFontForName(__CFString const*, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean const*, __CFNumber const*, __CFString const*... + 1376 (TDescriptorSource.cpp:4288) 9 CoreText 0x0000000192dda800 TDescriptorSource::CopySplicedDescriptorForName(__CFString const*, __CFString const*, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean const*, __CFNumber... + 172 (TDescriptorSource.cpp:4322) 10 CoreText 0x0000000192d0a214 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, unsigned long) const + 2332 (TDescriptor.cpp:804) 11 CoreText 0x0000000192d09148 TDescriptor::InitBaseFont(unsigned long, double) + 76 (TDescriptor.cpp:952) https://feedbackassistant.apple.com/feedback/14091158
4
1
291
3h
How to parse the PingFangUI.ttc on iOS 18?
I've noticed that the font file PingFang.ttc is no longer in /System/Library/Fonts/LanguageSupport/ on iOS 18. And I use CoreText APIs get the new font file, which is int the FontServices.framework and named PingFangUI.ttc. But it doesn't seem to be a regular TrueType font collection. It can't be parsed correctly by stb_truetype. I copied this file to my mac, and it can't be opened by Font.app either, which says it doesn't contain installable fonts. It also can’t pass font validation (Font.app → File → Verify File), saying “System validation failed”, I don't know what that means. So I tried to read the binary of that file. I've noticed that the ‘CFF ‘ table is missing in the new font file, and there is a new table 'hvgl'. But I can't find any documentation for this table. Maybe this is a new format. And what confuses me is that the TTC header of the new font file has not changed, same as the old PingFang.ttc file, with a ‘ttcf’ tag, and majorVersion is 2 minorVersion is 0. Please tell me how to parse the new format, so maybe I can modify stb_truetype to get our app to work. Thanks!
0
0
96
1w