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

Re: problem with defoma and non-GTK/KDE apps



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 25 February 2004 23:08, Florent Rougon wrote:
> After that, you can compare the working fonts.{dir,scale,alias} and
> encodings.dir with the ones generated by x-ttcidfont-conf under
> /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType. Then you will
> probably find a bug in either x-ttcidfont-conf or the package(s) that
> register(s) the fonts to defoma (since it is defoma that makes
> x-ttcidfont-conf know about the fonts).

Ok, I think I found the problem. The problem lies in the fonts.scale and 
fonts.dir files in /var/lib/defoma/x-ttcidfont-conf.d/TrueType.

Example for the ttf-arphic-bsmi00lp package:
The entries in fonts.scale are:
- -------------------------------------------------
ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-i-normal--0-0-0-0-c-0-big5-0

bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-c-0-big5-0

bw=0.5:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-i-normal--0-0-0-0-c-0-iso10646-1
bw=0.5:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-i-normal--0-0-0-0-c-0-iso8859-1
bw=0.5:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-c-0-iso10646-1
bw=0.5:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-c-0-iso8859-1
bw=0.5:ds=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-i-normal--0-0-0-0-c-0-iso10646-1
bw=0.5:ds=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-i-normal--0-0-0-0-c-0-iso8859-1
bw=0.5:ds=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-r-normal--0-0-0-0-c-0-iso10646-1
bw=0.5:ds=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-r-normal--0-0-0-0-c-0-iso8859-1

ds=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-i-normal--0-0-0-0-c-0-big5-0
ds=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-r-normal--0-0-0-0-c-0-big5-0

vl=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-i-normal--0-0-0-0-m-0-big5-0
vl=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-i-normal--0-0-0-0-m-0-iso10646-1
vl=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-i-normal--0-0-0-0-m-0-iso8859-1
vl=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-m-0-big5-0
vl=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-m-0-iso10646-1
vl=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-m-0-iso8859-1
vl=y:ds=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-i-normal--0-0-0-0-m-0-big5-0
vl=y:ds=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-i-normal--0-0-0-0-m-0-iso10646-1
vl=y:ds=y:ai=0.167:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-i-normal--0-0-0-0-m-0-iso8859-1
vl=y:ds=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-r-normal--0-0-0-0-m-0-big5-0
vl=y:ds=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-r-normal--0-0-0-0-m-0-iso10646-1
vl=y:ds=y:bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-bold-r-normal--0-0-0-0-m-0-iso8859-1
- ---------------------------------------------------
As you can see, the majority of the entries have formatting parameters 
in front of the fontname. 
When I create the fonts.scale, fonts.dir and fonts.alias files 
in /usr/lib/X11/fonts/TrueType amnually for this font and put that font 
path into XF86Config-4 in front of the defoma path, everythig works 
fine. xcin uses these entries, while other apps seem to use the defoma 
entries. The only difference between the two versions is, that the 
formatting attributes are missing.

I've noted the following behaviour:
- - when deleting the formatting parameters in the defoma fonts.scale and 
fonts.dir it still does not work.
- - when adding additional lines without the parameters it will also not 
work. I need to create them in a seperate directory and put that one in 
front of the defoma path in XF86Config-4.
- - defoma uses 24 styles for the same font thanks to the formatting 
attributes. When I copy the 24 lines without the attributes into the 
different directory, xcin works, but it will only use the original font 
specification built into the font. So, basically I can delete the other 
entries, which leaves 3 entries for this font:
- ---------------------------------------------------
bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-c-0-big5-0
bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-c-0-iso10646-1
bsmi00lp.ttf -arphic-ar pl mingti2l 
big5-medium-r-normal--0-0-0-0-c-0-iso8859-1
- ---------------------------------------------------
The fonts.alias file can also be stripped the the 14 entries which 
support these 3 encodings.

Solution: create the entries for each font like my example above 
additionally into /usr/lib/X11/fonts/TrueType and put the path in front 
of the defoma path in XF86Config-4.

The hints file for the ttf-arphic-bsmi00lp package looks liike this:
- ----------------------------
category truetype
begin /usr/share/fonts/truetype/arphic/bsmi00lp.ttf
  Family = Arphic-Ming
  FontName = ShanHeiSun-Light
  Encoding = Unicode
  Location = Chinese-Taiwan English
  Charset = ISO10646-1 BIG5 ISO8859-1
  UniCharset = BIG5 ISO8859-1
  GeneralFamily = Ming
  Weight = Light
  Width = Fixed
  Shape = Upright
  Alias = Arphic-MingB5 ArphicMingB5
  Foundry = Arphic
  Priority = 20
  X-Family = AR_PL_Mingti2L_Big5
  X-Weight = medium
  X-ElementAlias = foundry=default:family=ming:resx=72:resy=72
  TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique 
no-ritalic
end
- -----------------------------------

I'd like to know if the solution I proposed will work be simply 
modifying the hints file (and if yes, how?), or if defoma itself needs 
to be modified.

Can someone give me a hint where to find detailed documentation about 
how defoma works?

Cheers
Arne
- --
Arne Götje (高盛華) <20030910antispam@gmx.net>
(Spam catcher.  Address might change in future!)
PGP/GnuPG key: 1024D/685D1E8C
Fingerprint: 2056 F6B7 DEA8 B478 311F  1C34 6E9F D06E 685D 1E8C
Key available at wwwkeys.pgp.net.   Encrypted e-mail preferred.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAV+Z1bp/QbmhdHowRAtKTAKCt0oqdxdqYMbrxwIcDZA7Evs3GWACcC5tb
opEfMutRHwlU2KVDKV8in3I=
=Hziu
-----END PGP SIGNATURE-----



Reply to: