all groups > c# > june 2003 >
You're in the

c#

group:

international font selection


international font selection Jim Puls
6/30/2003 8:57:36 PM
c#:
I'm writing a Windows Forms application in C# which will run generally in a
Western environment; e.g., EN-US. I need to access a unicode font on the
user's system which is capable of displaying Japanese characters - often
there will be one or more of such fonts, but I don't know which ones by
name. If one does not exist, I need to default to a public domain font to be
included with the app.

How do I determine which fonts are available on the user's system, and if
they have the required characters? I could come up with a short list of
probable font name candidates, but is there a better way?

If there are any references to URLs which have discussed this, that would be
fine!

Thanks,

- Jim

Re: international font selection Michael (michka) Kaplan [MS]
7/1/2003 12:38:44 AM
Looking specifically for Japanese, you can base it on a font charset value
of 128?


--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.


[quoted text, click to view]

Re: international font selection Joe White
7/1/2003 4:53:29 AM
To determine which fonts are available, you can instantiate an
InstalledFontCollection object and then read its Families property.
This will give you an array of FontFamily objects, and FontFamily.Name
gives you the font name.

I'm not sure how to detect which characters are available in a font,
though. I'd be surprised if there wasn't a way to do it, but I didn't
see it in a quick skim through the docs.


[quoted text, click to view]
AddThis Social Bookmark Button