nanogui: how to display chracter of diff sizes


Previous by date: 7 Jan 2008 00:15:33 -0000 Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7, Thomas Malkus
Next by date: 7 Jan 2008 00:15:33 -0000 Re: how to change an bitmap font to an array of MWIMAGEBITS type, Greg Haerr
Previous in thread: 7 Jan 2008 00:15:33 -0000 how to display chracter of diff sizes, aflar.163.com
Next in thread:

Subject: Re: [nanogui] how to display chracter of diff sizes
From: "Greg Haerr" ####@####.####
Date: 7 Jan 2008 00:15:33 -0000
Message-Id: <023501c850c2$5a54e610$6501a8c0@winXP>

> I want to display chinese in my app.I use win32 api with only 
> HAVE_GB2312_SUPPORT setted.I add a function to display chinese using 
> MwExtTextOut with flags MWTF_DBCS_EUCCN passed and it worked!I think it 
> was using gb2312.c generated from hzk12!

This works because microwindows converts GrText or
MwExtTextOut data from the passed MWTF_xxx input format
to the output format required by the current font.  This
conversion is done by engine/devfont.c::GdConvertEncoding().



> But now I want to display chinese character of 24 or any other size and 
> ascii chars of different sizes!How can I do that?Which fontprocs->DrawText 
> do the font drawing work?Anyone knows that?

You will have to load your own .ttf or .pcf font using
GrCreateFont or CreateFont/CreateFontIndirect, and
then MwExtTextOut to output the desired characters.

> by the way, can anyone explain the meanings of the args in MwExtTextOut?

They are the same as the standard win32 ExtTextOut, except the
last parameter, flags, is used to specify the input character
encoding, using one of the MWTF_xxx (like MWTF_DBCS_EUCCN)
character encodings.

Regards,

Greg


Previous by date: 7 Jan 2008 00:15:33 -0000 Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7, Thomas Malkus
Next by date: 7 Jan 2008 00:15:33 -0000 Re: how to change an bitmap font to an array of MWIMAGEBITS type, Greg Haerr
Previous in thread: 7 Jan 2008 00:15:33 -0000 how to display chracter of diff sizes, aflar.163.com
Next in thread:


Powered by ezmlm-browse 0.20.