W->A dlls/commdlg/fontdlg.c

Shachar Shemesh wine-devel at sun.consumer.org.il
Sun Mar 16 15:47:08 CST 2003

Tony Lambregts wrote:

> I would appreciate Any comments about this.
I have started to work on setting fontdlg straight. The main obsticle is 
(besides the fact that I don't have time to look at it) is that 
ChooseFontA and ChooseFontW behave slightly different on Windows.

On Windows, ChooseFontA be default displays a charset selection 
combobox. When selecting a font that has several charsets, the selection 
has the full list of the charsets. The "Sample" area shows (W2K) "AaBb", 
followed by several letters that are charset dependant ("YyZz" for 
western). The sample text code is, actually, already implemented and 
commited (the actual sample text is only there for Western and Hebrew, 
because that's all I had, but it's a simple matter of placing text in 
the "SAMPLE_LANG_TEXT" for more languages).

Calling ChooseFontW, on the other hand, displays the charset selection 
(most amuzing), but it is disabled (makes no sense for Unicode). When a 
font is selected, the sample text for ALL charsets in that font is 

Wine's fontdlg is currently not in a very good shape. When a font has 
several charsets, the font appears several times in the font dialog. 
Selecting a given instance of the font dictates which charset you will 
receive. Of course, at the moment, unless the charset has a unique 
sample text, you have no way of knowing which charset that was that you 
have selected.

All of these problems are not very difficult to solve, but they require 
some time. The common dialog itself needs to be a unicode dialog 
accepting a boolean dictating whether charset selection is necessary. It 
then needs to call "EnumFontFamiliesExW" instead of "EnumFontFamiliesA". 
This MAY also indicate a bug in "EnumFontFamilies". I'm not sure whether 
it was supposed to return once for each font, or whether it should 
really return each charset of each font as a different entity.

Part of the reason all of this is taking me time, besides the fact that 
I don't get around to Wine very much of late, and the fact that, when I 
do, I'm working on making wineboot autowork, is that the entire font 
dialog experience is jittery. It effectively resets the size and face 
every time a new font is selected, which is not the desired effect. 
Fixing this requires a bit more work. This comes hand in hand with the 
fact that, when initializing it from an existing structure, the 
structure's existing info is not reflected in the dialog.

Hope this was not too technical an answer to your question. If you feel 
like working on it, please let me know. It will allow me to work on 
wineboot with much clearer concious.


Shachar Shemesh
Open Source integration consultant
Home page & resume - http://www.shemesh.biz/

More information about the wine-devel mailing list