When it comes to Chinese characters, I am unable to get the Front End of Mathematica to use the fonts of my choice. How can I get it to use the fonts I need?
Here I provide two screenshots to show the problem, one from Word (top), the other from Mathematica on WinXP, both displaying the same string. Note that Mathematica uses several different fonts (I guess it uses font substitution when the font it tries to use first doesn't contain a glyph---however the font I specified contains all glyphs I need!). Here I use the font Microsoft YaHei, which comes with Win7, but is downloadable for XP too.
EDIT: Here's some test code:
str = "肖诮陗俏削帩消峭捎绡莦弰悄焇琑逍㲖㲵䏴哨娋宵屑綃梢痟睄筲艄萷销䇌䘯趙揱旓硝稍踃輎矟䌃箾蛸誚榍蕱銷鞘潲碿糏霄䴛韒髾鮹鞩魈颵"
Style[str, Large, FontFamily -> "SimSun"]
(SimSun comes with XP and should contain all these characters too, although not sure if in all versions.)
EDIT 2: I am on Windows XP (with East Asian language support enabled), I wonder if the results are different on other OSs.
Summary: It appears that the behaviour depends on the particular OS and the fonts installed, and unfortunately there seems to be no way to make the fonts uniform (even if there exists a single font containing all the glyphs).
It could be mathematica is replacing your Font-Family
setting with a neighbouring font. Running
Options[$FrontEnd, FontSubstitutions]
will give you the replacement list mathematica uses.
Font family names are not equivalent to system font files names. You can read those font names by the way below.
This is the easy way to get the right font family name is
//InputForm
. After running the cell, you will get the right font name. In my computer, the fontfamily name for "楷体" is "¿ [Not]Ìå_GB2312". Awesome.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With