nanogui: On uwin CreateFont() function.
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