Font selection - please review

Shachar Shemesh wine-devel at shemesh.biz
Mon Apr 26 08:51:19 CDT 2004


Hi Dirk,

First of all, thank you for the reference.

Regarding the missing flag to TranslateCharsetInfo - My VisualStudio 6 
MSDN DVD (Latest that came up for that version - dated October 2001) 
does not have this flag mentioned. This means either that the flag was 
not present at that time, or that it was present but they forgot to 
mention it (has happened to me before).

The latest MSDN 
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_2ovj.asp) 
does mention it, and claims it's available on Windows 2000 (like you 
said). I guess this is anyone's guess what this means as far as when you 
can use it.

Fortunetly for Wine, we don't care when it was introduced. If Wine has 
it, we can use it. At least for code written by us, that rule is fine.

So, thank you very much for the good advice. Are you a wine user that 
needs this flag, or did you just happen to see my email when you were 
investigating a Win32 problem?

             Shachar

Dirk Luetjens wrote:

> Hello Shachar Shemesh,
>
> sorry for the lost context. Your mail I replyed to, is available at
>
> http://www.winehq.com/hypermail/wine-patches/2002/11/0221.html
>
> I know, that the wine project is totally unrelated to any windows dll. 
> I thought it would be better to mention, that this additonal flag for 
> TranslateCharsetInfo is not available in a specific windows version, 
> since the wine project tries to implement the WIN32 interface, and it 
> should behave as close as possible to the original one. Judging from 
> the code in
>
> http://source.winehq.org/source/objects/font.c#L1849
>
> this additional flag is not yet implemented in wine. I can not tell 
> you when it was introduced into WIN32 itself. The MSDN says something 
> about WIN2000, but it isn't available on my WIN2k installation.
>
> Dirk
>
>
> Shachar Shemesh wrote:
>
>> Hi Dirk,
>>
>> Judging from the email address you used to send me this email, we are 
>> talking about a fairly old post. Can you please direct me to the some 
>> context regarding what was my post exactly? A link with the post in 
>> question would be very helpful.
>>
>> Also, I hope you do realize that my post was on a Wine mailing list, 
>> which means that the functions there are totally disjointed from any 
>> particular Microsoft version or DLL.
>>
>> Many thanks,
>>          Shachar
>>
>> Dirk Luetjens wrote:
>>
>>> Hi Shachar Shemesh,
>>>
>>> I came across your post while researching a problem I had during 
>>> application development under windows.
>>>
>>> While digging in the MSDN I found another function that deals with 
>>> this problem: TranslateCharsetInfo
>>>
>>> ---
>>> TranslateCharsetInfo function translates based on the specified 
>>> character set, code page, or font signature value, setting all 
>>> members of the destination structure to appropriate values.
>>> ---
>>>
>>> and for the flag parameter:
>>>
>>> ---
>>> TCI_SRCLOCALE Windows 2000: Source (that is, lpSrc) is the LCID or 
>>> LANGID of the keyboard layout. If it is a LANGID, the value is in 
>>> the low word.
>>> ---
>>>
>>> The destination of the translation is a CHARSETINFO structure, where 
>>> one entry is the charset.
>>>
>>> I had problems using this parameter, since it isn't implemented in 
>>> the gdi version I use (VS6, gdi32.dll 5.00.2195.6898). I can only 
>>> find the definition in the newer .NET studio headers. But perhaps 
>>> this is a possible inclusion point for your function.
>>>
>>> Best regards
>>> Dirk Luetjens
>>>
>>
>>
>
>


-- 
Shachar Shemesh
Lingnu Open Source Consulting
http://www.lingnu.com/




More information about the wine-devel mailing list