Now I am getting the font name by the following code:
PrivateFontCollection fontCollection = new PrivateFontCollection();
fontCollection.AddFontFile("path_to_my_Thai_font");
return fontCollection.Families[0].Name;
On a English Win7 system, I get "DFPHeiMedium-UN", but on a Chinese Win7 system, I get "華康中黑體(P)-UN".
So, the font name differs in different system languages.
My question is how to write my code to make sure that I can always get "DFPHeiMedium-UN" regardless of the system language?
Thank you.
By the way, I tried CurrentCulture. I put this line before the above code. Still don't work.
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us");
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…