When using a text edit application, a font (such as "Menlo") is selected to present glyphs, when the selected font doesn't contain a special glyph(such as “”, it's a simple Chinese glyph, "Menlo" doesn't contain it), Application will pick up a font for you to present it, In MacOS(Catalina), there are about 62 fonts (STBaoliSC-Regular, STKaiti, STSong, PingFangSC-Regular...) contain this glyph "", I found that almost every text edit application (vscode, sublime text, TextEdit) pick up the same font -- "PingFangSC-Regular" ,so I consider if it is every glyph has its own default font? if so, how can I get the font name?
How to find the default font for East Asian character in MacOS
697 Views Asked by Ethan At
1
There are 1 best solutions below
Related Questions in MACOS
- Error installing Nativescript on Mac M2 Sonoma 14.4.1
- macOS - Most secure way of a GUI SUDO_ASKPASS
- When using onDrag in SwiftUI on Mac how can I detect when the dragged object has been released anywhere?
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- ZSH function parameters conundrum
- how to make read only file/directory in Mac writable
- macOS BigSur - Unable to run bundled php version or brew php 8
- 9 Digit Addresses in Hexadecimal System in MacOS
- MacOS Bash-Script: while read p and echo
- How to make a range for tail rows on a categorized table in Numbers with JXA scripts?
- Cannot build a basic project with curl on Mac (M2) for Raspberry Pi Pico
- How to recover deleted files from create vite react project
- Can't run built SFML project from Xcode template
- React Native - RealmJS - Linker command failed with exit code 1
- How can I manually add a keyboard shortcut to a Shortcut Action Service directly via the system files, without going through the System Prefs GUI?
Related Questions in TEXTEDIT
- AppleScript to Get Open TextEdit RTF or RTFD File Properties & Copy to Clipboard?
- AppleScript - Remove First Three Lines of Text in Clipboard But Retain Styled Text?
- How to create a new TextEdit-window in plain Text by AppleScript without saving it?
- asp.net textEdit losses focus after typing one or two characters
- Applescript - Can't Get Text of TextEdit or variable not defined
- isEmpty in android kotlin does not check EditText
- egui::TextEdit::singleline with macroquad - not able to edit text
- How to save an html file in TextEdit so that it opens correctly in a browser?
- How to make a new line for a sentence after finished sentene with dot?
- Change ctrl+left/right arrow behaviour in Firefox (or Chrome)
- AppleScript that scrapes a website for data with curl function not working after some time making it
- Can I use textedit on mac as the text editor for writing c program?
- pyqt Event when button clicked
- RobotFramework "input text" does not let access text
- BBedit Script - Replace text field?
Related Questions in NSFONT
- Oblique text: Creating NSFont with a textTransform changes the size to 1 pt
- Why fonts loaded using CoreText (CTFont) behave different than loaded using AppKit (NSFont)?
- NSTextView ligature attribute overridden
- List all available fonts in SwiftUI for macOS
- Is there a mapping between NSFont.Weight and the integer values?
- macOS: "SF Pro Text" not available on new computer
- What values can be used in NSFont.TextStyleOptionKey
- NSInvalidUnarchiveOperationException?
- Use SwiftUI's Font.largeTitle when NSFont is expected
- How does NSFont font size relate to the font metrics
- Finding NSFont Size to Fit a particular width
- Text rendering on Mac OS X showing different results for app target OS 10.14 vs lower versions
- How to find the default font for East Asian character in MacOS
- Cocoa NSFont 'leading' attribute build error
- NSFont not working properly in macOS Catalina
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This is handled by the "cascade list." If you want the default list, it's available through
CTFontCopyDefaultCascadeListForLanguages, on a per-font basis:If you wanted to see the list, you could do it this way (Core Text does not have very nice bridging to Swift):
==>
PingFangSC-Regular is the first East Asian font in the list, so it's going to be the one picked to replace Helvetica. It's also the first East Asian font in the cascade list for Lucida Grande, and Helvetica Neue. And it's kind of straight-forward, even boring, font. But if you were using a bit more unusual font, like American Typewriter? Well, that would be replaced with Songti, which is a bit lighter. Marker Felt replaces with Kaiti, which has more variation on the stoke widths (though IMO it would be much better to replace it with Kaiti Black rather than Regular). I don't know of any built-in Asian fonts that are as "fun" as the available Latin fonts, but if you had one, you can customize the cascade list to choose it instead (using NSFontDescriptor on Mac, or UIFontDescriptor on iOS).
If you want more details about cascade lists, see the WWDC 2018 video, Creating Apps for a Global Audience.