FontDlg sample text

Dmitry Timoshkov dmitry at baikal.ru
Sun Nov 30 07:48:47 CST 2003


"Shachar Shemesh" <wine-devel at shemesh.biz> wrote:

> The main reason is that they are loaded based on encoding, rather than 
> language. This has several implications that caused me not to go that route:
> 1. The mapping between encoding and charcter encoding is not a 
> straightforward one. The reverse mapping is even less so.

Well, GetTextCharset() does exactly what you want.

> 2. The mapping is based on the selected locale, and does not care about 
> the current language.

The mapping should be based on the font charset, and actually has nothing
to do with current language or locale.

> These two mean that placing the sample text in a resource will only 
> server to confuse the issue. The first point is even harder - what if 
> you want different sample text for Chinese BIG-5 and the other Chinese 
> encoding? Which language should I try to load for centeral Europe? 
> French? German? I can only load one.

Exactly. GetTextCharset() is your friend here. Just have different
strings for different charsets in the resources and load them at
appropriate time.

> In short, doing that through resources seems like an unnecessary 
> complication to me. Add to that the fact that you still need the mapping 
> table, and you get "ain't worth the hassle".

I hope you will reconsider.

-- 
Dmitry.





More information about the wine-devel mailing list