nanogui: Asian Fonts In Nano-X
Subject:
Re: [nanogui] Re: Asian Fonts In Nano-X
From:
Gil Glass ####@####.####
Date:
26 Oct 2005 15:22:49 +0100
Message-Id: <OFDBB30B42.7171345D-ON852570A6.004A224A-852570A6.004EE3D5@acterna.com>
> Well, except that I was trying to say that these options,
> including HZxxFONT, are obsolete, and chinese .bdf files
> should be used instead. There are all sorts of strange,
> antiquated behaviours with these older font subdrivers.
Oh, oops. OK then, just a few more questions and then I'll relinquish the
bandwidth back to other discussions, I promise. ;-)
So when you talk about Chinese .bdf files, are you referring to
gbk16-xke.bdf that comes with 0.91? If so, how do I incorporate this font
and how do I load it with GrCreateFont()? I searched for references to it
in the Makefiles and in *.rules and didn't find any. Also, this would be
a simplified Chinese font. Is there a .bdf available for Big-5 which is
traditional Chinese?
I guess the bottom line issue is that I want to be able to use traditional
(Big-5) and simplified (GB) Chinese text in my application. Can I do that
with the files that come with 0.91 and, if so, how? That is, what files
to I have to put where, how do I load the fonts (GrCreateFont(???)), and
how do I display text with them once I have them loaded (GrText(???))?
Sorry to appear so clueless, but the documentation is a little sketchy on
this.
> > 1. What is the difference between the HZXFONT and the HZKFONT? When
I
> > used HZK, I didn't get any characters although I probably guessed
wrong on
> > the Unicode values.
>
> I'm not sure ;-) I don't think either supports unicode input format,
> though.
> These were contributed very very early before unicode support,
> and are builtin fonts only.
Just FYI, HZXFONT does support UTF-8 correctly, at least for the small,
random set of symbols that I tried. I embedded the UTF-8 encodings of
some symbols that I found at Unicode.org and Nano-X rendered the correct
ones.
> > 2. Are the Chinese and other Asian fonts scalable? If not, what are
the
> > available sizes. Based on the filenames, it looks like there is a 12
> > pitch and a 16 pitch available. The 16 pitch fonts are the ones being
> > loaded right now. How do I select? I've tried using
> > GrSetFontSize(fontId, 12) and GrSetFontSize(fontId, 16) but the result
is
> > the same for each.
>
> No, these aren't scalable. Any freetype asian font would be though.
> Only one size can be compiled in at a time. Suggest you switch
> to .pcf, .fnt, or .ttf format.
Scalability is not critical for the Asian fonts. 12 or 16 pitch is fine.
However, if I can find a free Chinese TrueType font, I'll use it.
Gil Glass
Telecom Field Services
JDSU
Germantown, MD, USA
+1-240-404-2551