Message Boards Message Boards

1
|
3607 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

What's the default font for Chinese characters on Mathematica 13.2?

Posted 2 years ago

Hello, When exporting to pdf files, which contains some Chinese characters, from Mathematica 13.2 on Debian 11, which is linux system, the pdf outputed doesn't have any Chinese characters as they are missing. I know it is that in my computer there is not the font the mathematica uses to output Chinese characters. So I need to install the missing font, but what name is it? How can I find the name of the missing font.

Thanks.

POSTED BY: Zhenyu Zeng
3 Replies
Style["Times, Italic, Bold", FontFamily -> "Times", 
 FontSlant -> "Italic", FontWeight -> "Bold", FontSize -> 24]
Graphics[{FontSize -> 18, 
  Text[Style["Comic Sans MS", FontFamily -> "Comic Sans MS", 
    FontColor -> Red], {0, 0}]}]
SetOptions[EvaluationNotebook[], 
 StyleDefinitions -> 
  Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], 
    Cell[StyleData["Text"], FontFamily -> "Georgia", FontSize -> 12], 
    Cell[StyleData["Input"], FontFamily -> "Courier New", 
     FontSize -> 12], 
    Cell[StyleData["Output"], FontFamily -> "Arial", FontSize -> 12]}]]
Style["Verdana, Extended, 20", FontFamily -> "Verdana", 
 FontTracking -> "Extended", FontSize -> 20]
SetOptions[$FrontEnd, 
 FontProperties -> {"ScreenResolution" -> 96, 
   "FontAntialiasing" -> True}]

Oh I've got an idea what if you send the .pdf and the Mathematica notebook..then we could try to reproduce and do some debugging. I think if you post some of the output here then I get a notification..I can't tell you how many times that has saved me. I had all these responses I was getting that were getting taken down. And I had this thing where whenever I posted they just immediately took my post down. And now, I'm back. I have returned my dear @Zhenyu Zeng to answer your question, or hopefully we can resume our discussion. And there are lots of fonts for you to try. Default 1 Default 2 Default 3

We need. Things like $FontFamilies. Or

fonts = $FontFamilies;
DynamicModule[{font = "Arial", size = 12}, 
 Column[{PopupMenu[Dynamic[font], fonts], 
   Slider[Dynamic[size], {6, 72}], 
   Dynamic[Style[font, FontFamily -> font, FontSize -> size]]}]]
sampledFonts = RandomSample[fonts, 9];
Grid[Partition[
  Style[#, FontFamily -> #, FontSize -> 20] & /@ sampledFonts, 3]]

Arial

Raanana

And I know this might seem like a canned response, but what you could do is list all the fonts..and you're using Mathematica 13.2. You could list out all the non-English fonts, those system fonts that Mathematica recognizes. Look for the Chinese fonts in the output. Which one is set as the default in your system settings?

(*ExportString[Style["Export as \
PDF",FontFamily->"Arial",FontSize->20],"PDF"]*)
CurrentValue[$FrontEndSession, "DialogSettings", {"FontChooser", 
  "LastFont"}]
SetOptions[$FrontEnd, DefaultFont -> {"Comic Sans MS", 12}]
TraditionalForm[
 Style[Sin[x]^2 + Cos[x]^2 == 1, FontFamily -> "Comic Sans MS", 
  FontSize -> 18]]

Default 6

Default 7

Are you looking? Mathematica loves using the system default font for Chinese characters that may not be explicitly listed under Mathematica's font settings. In this case, displaying all the system fonts recognized by Mathematica might be the leap forward that we need, but it's really about finding the answer we're looking for. Maybe it's your operating system's default fonts for Chinese text. Give us your error messages. The Ruliad untangles a lot of things we thought about philosophy. Some modern AI developments "certainly" help in form. But what we need to do is focus on Windows and Linux. When I saw that you were using Debian 11 that which is a Linux system, I felt a jolt of recognition that yes, you should be able to print more PDFs. Give us your console output! What if you do fc-list :lang=zh ?

POSTED BY: Dean Gladish
Posted 2 years ago

Thanks for your reply. But I still confused, as

CurrentValue[$FrontEnd, {"SystemFonts"}]

only displays the English fonts, not Chinese font.

So how can I know the name of the Chinese font it uses as default?

POSTED BY: Zhenyu Zeng

Hmm..it's a beautiful font, what is it..SimSun? But where is this font coming from?

There is an empty place in my heart for these Chinese characters, as they are missing. Legend has it that you could find the Current Value and then look for the font family on the front-end.

CurrentValue[$FrontEnd, {"SystemFonts"}]
Style["中文文字", FontFamily -> "STSong"]
Style["中文文字", FontFamily -> "Songti"]

<|"Controls" -> {FontFamily -> ".AppleSystemUIFont", FontSize -> 13}, "Menu" -> {FontFamily -> ".AppleSystemUIFont", FontSize -> 13}, "Panel" -> {FontFamily -> ".AppleSystemUIFont", FontSize -> 10}, "Tooltip" -> {FontFamily -> ".AppleSystemUIFont", FontSize -> 11}|>

\!(* StyleBox["\<\"中文文字\"\>", StripOnInput->False, FontFamily->"STSong"])

\!(* StyleBox["\<\"中文文字\"\>", StripOnInput->False, FontFamily->"Songti"])

systemfonts

songti

stsong

POSTED BY: Dean Gladish
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract