Re: gdk_set_locale

Pablo Saratxaga <> writes:

> Kaixo!
> On Sat, Jan 15, 2000 at 11:31:18AM -0500, Owen Taylor wrote:
> > The Pango font APIs, which will eventually replace gdk_fontset_load()
> > will be designed so that the programmer doesn't have to do
> > anything special to get correct handling of international characters -
> BTW; I've tryed playing a little with pango and libunicode and, while
> some font encodings are in libunicode; the sample viewer in pango still
> doesn't use them.
> Try a unicode file with the ukrainian letter ghe with upturn; if you have
> a koi8-u font it should be displayed; but it isn't (it is if you have
> a unicode font with that glyph).
> Same for armenian and georgian letters.
> For georgian it is even more strange; as even with a unicode font that does
> has the proper glyphs it doesn't show up...

I don't have much of an idea about this one. ENC_ISO_10646 is always
in the "possible encodings" mask for each character in the basic
module, and the U10a0-U10ff block has no additional encodings currently,
so the only thing I can think of is that the fontset in use (hardcoded
into viewer.c currently) didn't match your Unicode font at all.
> Obviously I must declare something in an additional place; but there
> isn't much documentation as of yet.
> Where should I look for the unicode -> current X11 fonts conversions, in order
> to add some more ?

Rendering with a 1<=>1 character <=> glyph mapping is handled by
the basic module. The file:


contains a table which specifies the possible encodings for each character
in Unicode; it's currently range based, though it may be be more efficient
to switch it over a straight table, since ranges aren't a good way to
represent coverage for the various CJK encodings.

So, to add support to koi8-u, you need to add an entry into the charsets
table, add the charset to the ENC_* enum in the corresponding position,
and then modify the 'ranges' table.

The 'ranges' table is generated by the tools in the tools directory.
Essentially, the way this works is that you put a file for each
encoding you want to include in the ranges tables in the maps/
subdir. (The ones I used were the ones provided by the Unicode consortium,
so they must be in that format). Then you run the script,
then you run "" to turn the result into the appropriate
ranges table.

> > If the font specified does not contain all the characters in the
> > string, then fallbacks will automatically be provided, and there
> > will also be standard aliases such as "sans", "serif", "fixed", that
> > can be customized by the vendor, system administrator and user.
> In addition to fallbacks, and before them; there should be the possibility
> to create "virtual fonts".
> Often glyphs of some fonts go very well together, but the fonts have
> different names. It would be nice to allow the user to make some aliases.
> Eg: I would prefer, when the font specified is "Bodoni", to be able to
> specify ".VnBodoni" as a the font to use for vietnamese chars; rather
> than the default sans serif (Helvetica most likely)

This is basically what I meant by "standard aliases" - the idea is
hat there will be an alias mechanism, and there would be some standard
aliases that would be guaranteed to be there and to look good.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]