nanogui: microwindows fonts


Previous by date: 12 Aug 2004 04:16:10 +0100 how can i comprehend the frame of microwindows ??, ZhangWei
Next by date: 12 Aug 2004 04:16:10 +0100 Re: how can i comprehend the frame of microwindows ??, Greg Haerr
Previous in thread: 12 Aug 2004 04:16:10 +0100 Re: Microwindows Fonts, Greg Haerr
Next in thread:

Subject: Re: Microwindows Fonts
From: "Greg Haerr" ####@####.####
Date: 12 Aug 2004 04:16:10 +0100
Message-Id: <016301c4801a$a5548020$3eba46a6@winXP>

> hFont = CreateFont
12,0,0,0,0,0,0,0,0,0,0,0,FF_DONTCARE|DEFAULT_PITCH,"HZKFONT");
> And the result is ok
> But now I would like to load big5font, gb2312 and jisx0213-12x12 fonts.
how can I do that?
> because I tried hFont =
CreateFont(12,0,0,0,0,0,0,0,0,0,0,0,FF_DONTCARE|DEFAULT_PITCH,"BIG5FONT");
and It doesn't work.

Turn off HZK fonts in the config file.  The built-in fonts are an older
design and weren't really designed to allow switching between Japanese
and multiple Chinese builtin fonts.  Make sure you are using the
name that is found in the .c file.  You also must encode your
text the way that the builtin font handler expects, which is
hard to describe, but typically found in drivers/genfont.c and
engine/devfont.c.


> I have another question. I tried to load a pcf font like gb24st.pcf. So, I
write :

hFont = CreateFont(12,0,0,0,0,0,0,0,0,0,0,0,0,"gb24st.pcf");
SelectObject(hdc,hFont);
TextOut(hdc, 20, 160,"ï ¤ ¨ ¥", -1);

> And the result looks like ok :
> pcf_createfont: using font gb24st.pcf
> But I don't see anything on my screen. The text doesn't appears. Is there
something wrong in my code?

The win32 API doesn't allow for changing the character encoding.
You'll need to edit mwin/wingdi.c::MwExtTextOut and change
the flags parameter to GrText to the encoding that you'll be using.
We need to design an API workaround to this, if multiple fonts
with different encodings will be used.  (The Microsoft answer
is to support only unicode, and Microwindows then needs
TextOutA and TextOutW versions, which is probably the best
way to go)

Regards,

Greg



Previous by date: 12 Aug 2004 04:16:10 +0100 how can i comprehend the frame of microwindows ??, ZhangWei
Next by date: 12 Aug 2004 04:16:10 +0100 Re: how can i comprehend the frame of microwindows ??, Greg Haerr
Previous in thread: 12 Aug 2004 04:16:10 +0100 Re: Microwindows Fonts, Greg Haerr
Next in thread:


Powered by ezmlm-browse 0.20.