comdlg32: Remove the font sample characters string.

Michael Stefaniuc mstefani at
Wed Jan 18 07:38:26 CST 2012

Frédéric Delanoy wrote:
> 2012/1/18 Francois Gouget <fgouget at>:
>> On Wed, 18 Jan 2012, Frédéric Delanoy wrote:
>>> On Wed, Jan 18, 2012 at 10:12, Francois Gouget <fgouget at> wrote:
>>>> The sample text does not depend on the dialog language but on the scripts supported by the font. As such translating it in the resource file makes no sense.
>>>> -    CTEXT           "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
>>>> +    CTEXT           "",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
>>> Actually it's used to show a sample in the font picker (e.g. with
>>> wordpad do Format > Font).
>> No it's not. The code overwrites this string when drawing the dialog and
>> then based on the entry selected in the 'Script:' combobox (cmb5). See
>> CFn_WMPaint():
>>    if( GetWindowInfo( GetDlgItem( hDlg, stc5), &info ) )
>>    {
>> ...
>>        DrawTextW( hdc,
>>                sample_lang_text[CHARSET_ORDER[lpcf->lpLogFont->lfCharSet]],
>>                -1, &info.rcWindow, DT_CENTER|DT_VCENTER|DT_SINGLELINE );
>> ...
>> So the string which is in the resource file is useless and only causes
>> grief.
> That's why I later added:
> "If the sample text does not depend on the dialogue language, that's
>  what should be done instead IMHO"
> i.e. alter the code so it does use the (translatable) string instead
> of removing it altogether.
And what Francois is saying is that that isn't possible as the string
depends on the font and not on the UI language. So if I select a Klingon
font that has no latin characters I won't be able to see the "AaBbYyZz".


More information about the wine-devel mailing list