Re: [gtk-i18n-list] `.pcf' font not accessible from pango
- From: mpsuzuki hiroshima-u ac jp
- To: pottendo <pottendo utanet at>
- Cc: gtk-i18n-list gnome org
- Subject: Re: [gtk-i18n-list] `.pcf' font not accessible from pango
- Date: Tue, 17 Jan 2006 10:53:53 +0900
On Mon, 16 Jan 2006 20:28:39 +0100
pottendo <pottendo utanet at> wrote:
>> To "synthesize" charset/encoding info from given font,
>> FreeType returns platform=Apple & charset/encoding=Roman
>> (US-ASCII), if there's no way. This is why we cannot
>> use non-ASCII PCF/BDF via fontconfig.
>
>Is this a bug or a feature? ;-)
I think it's feature to keep FreeType independent
from X11. On Unix, the only reliable database of
charset/encoding for BDF/PCF is only /usr/X11R6/lib
iconv is not suitable because we cannot specify
detailed charset.
# FreeType is originally designed for TrueType
# font renderer, not "font abstraction layer".
# Asking for builtin BDF/PCF charset/encoding
# to FreeType might be wrong addressed. In fact,
# the database won't be used except of X11, so,
# it will be left as unmaintained soon.
In addition to, fontconfig is designed to be
heavily unicode-dependent and independent from X11.
To detect the "capable" language for a given font,
fontconfig checks essential characters are available
in given font. This database is written in UCS2
(see fontconfig-x.y.z/fc-lang/XXX.orth). The result
is written in "charset=" entry and "lang=" entry.
Because charset/encoding database for BDF/PCF is
missing, fontconfig cannot detect the "capable"
language for given BDF/PCF font, except of the fonts
that is declared as "iso10646" explicitly (e.g.
ClearlyU BDF bundled to recent X11).
Finally, Xft is a thin wrapper of FreeType text
rendering API. It accepts only Unicode strings,
because the availability of character in given
font is checked by font-config. No string should
be passed if it's encoded in non-Unicode or private
encodings, even if the byte sequence does not
conflict with UTF8 or UTF16.
Based on the limitations in FreeType, fontconfig
and Xft, the possible method might be recreation
of X11 core font backend in Pango. But, it will
be 10000 times longer work than packing BDF/PCF
font to bitmap in TrueType file format, with re-
mapping to match with Unicode.
>Do you think that it is possible to end up with the desired behaviour
>(petsci mapping) by hacking fonts.cache-1 by hand? (entry charset and
>maybe lang?).
I think, manual modification of fonts.cache-1 is
not recommended, because fc-cache can overwrites
the entry.
>Where can I find information about the semantics and syntax of
>fonts.cache-1 (besides the source code).
Now I'm looking for, too :-)
>Would this be the case where one should write a special `petsci'
>rendering backend for pango? I'm just curious.
Umm, I've never written Pango backend by myself,
I have no good idea. I have to check other graphic
methods like AAlib.
Regards,
mpsuzuki
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]