nanogui: Thread: On uwin CreateFont() function.


[<<] [<] Page 1 of 1 [>] [>>]
Subject: On uwin CreateFont() function.
From: Sang Baek Lee ####@####.####
Date: 18 Sep 2001 08:49:53 -0000
Message-Id: <3BA70714.7000703@neomuse.com>

Hi~

I'd like to know if this is right or not. (I'm new to win32api :( or at
least I think so.)
On CreateFont() function there is a argument which will set the charset.
I want to make it work together with multibyte ttf support.
Using the flag on GrText() would be fine, but using MWTF_XXXX flag on
TextOut() function is not what I wanted. (And nobody will want it. ;) of
course)
I wanna know, if I should make encoding flags used when calling
CreateFont() function.

Thanks,
Sang Baek Lee.



Subject: Re: [nanogui] On uwin CreateFont() function.
From: "Greg Haerr" ####@####.####
Date: 18 Sep 2001 16:45:51 -0000
Message-Id: <082a01c1403e$e2d144c0$3aba46a6@xmission.com>

: On CreateFont() function there is a argument which will set the charset.
: I want to make it work together with multibyte ttf support.
: Using the flag on GrText() would be fine, but using MWTF_XXXX flag on
: TextOut() function is not what I wanted. (And nobody will want it. ;) of
: course)
: I wanna know, if I should make encoding flags used when calling
: CreateFont() function.

The CreateFont function does not require encoding flags
when creating the font.  Instead, just pass the filename
of the .ttf file. (See src/mwin/winfont.c for more details).

In order to select an encoding other than MWTF_ASCII or
MWTF_UC16 (win32 only supports these directly) you will
need to modify the file src/mwin/wingdi.c::MwDrawText.
Change the "static int" function declaration to "int",
and call MwDrawText rather than DrawText, using your
desired MWTF_xxx flag for the encoding.  This should
work fine.

Regards,

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.