[Mono-devel-list] System.Drawing.Font question
jordi at ximian.com
Tue Dec 21 11:11:28 EST 2004
El dt 21 de 12 del 2004 a les 13:21 +0100, en/na Aleksandar Dezelin va
> I'm currently developing FontDialog for the Managed Windows Forms and I
> need some info: how can I obtain available charsets for a font? Is there
> any method in GdiPlus that can be called in order to obtain the needed
> font property?
What's my understanding of the issue. Correct me if I'm wrong.
CharSet has no real meaning in System.Drawing. C# applications are
Unicode. In MS .Net, DrawString uses font fallback to locate a glyph to
display characters that your desired that the font does not contain. You
can control this with the StringFormatFlags enumeration (see
NoFontFallback value). Basically, when FontFallback is active, with
every font you can display any glyph.
The Font object in System.Drawing has the GdiCharSet property that
allows to specify the charset for this font. I actually never has seen
this value <> 0.
In System.Windows.Forms the FontDialog allows you to select a script,
but the Font object returned always has GdiCharSet = 1. It looks like
the UI allows to select a script but the Font returned does not really
contains the information since System.Drawing do not really uses it.
My suggestion there will be not shown the script information since it's
not passed into the Font object created and it's not used at all.
In the other side, libgdiplus has no fallback system, then if a glyph is
not present is just not shown. To be honest, the i18n part has been
never worked, since I think that we should wait to see if Cairo and
Pango are finally integrated.
Note: I'm CC mono-winforms-list
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas
More information about the Mono-devel-list