[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Fwd: X/PS font naming, embedding
From:       Sivan Toledo <stoledo () post ! tau ! ac ! il>
Date:       2000-12-06 7:44:11
[Download RAW message or body]


Hi, this is not koffice specific, but I think that my proposal below
would have a great positive effect on the usability of koffice, so I ask
that you support this initiative and ask trolltech to implement it.

----------  Forwarded Message  ----------
Subject: X/PS font naming, embedding
Date: Wed, 6 Dec 2000 09:34:31 +0000
From: Sivan Toledo <stoledo@post.tau.ac.il>
To: keithp@suse.com,
 knoll@mpi-hd.mpg.de


Hi, I'd like to propse a way to specify the name of font files in XLFD font
names, which would allow applications (e.g. Qt/KDE) to find the correct
postscript name of the file and to embed it in printouts.

I implemented a small prototype which works very well (allows robust
printing with scalable X fonts from KDE).

I am pretty sure that Keith is a right person to turn to and I am hoping
that Lars might be able to direct this proposal to the appropriate person
in TrollTech (the one in charge of qpsprinter.cpp).

Specifically, I am proposing to embed the font name (absolute path) in
the XLFD font name, e.g.

agw_____.pfb
-itc-avantgardegothic-medium-r-normal-/home/stoledo/fonts/x/type1/agw_____.pf
b-0-0-0-0-p-0-iso8859-1

in fonts.dir instead of just

agw_____.pfb-itc-avantgardegothic-medium-r-normal--0-0-0-0-p-0-iso8859-1

I am abusing a little (never) used field in XLFD, additional style and using
it to store the font file name. These XLFD font names could be edited by the
user, by a script, or the X font server (x server) could add this field
automatically.

Knowing where the font file is allows X apps to find the correct postscript
name for the font and to embed it. Currently each application has a different
hack which makes it very difficult to install fonts. E.g., Qt guesses font
names, often wrong, StarOffice uses a file that describes the mapping from X
font names to font files, etc. Using my proposed mechanism all apps would
be able to find font files in a uniform way.

Using this idea I modified qpsprinter, the PS printer driver in Free Qt to
seach for font file names in XLFD font names and to extract the PS font name
and to embed the font in the printout. If it does not find the font file name
in the XLFD it falls back to its normal behavio of guessing the font name and
not embedding. Right now it works for PFB files but I think that I could
easily add support for PFA files and for TTF files. It should be possible to
do font subsetting as well but it's more complicated because I would have
to know which glyphs appear in the printout.

I am asking for your feedback on this idea. In particular, I'd like to find
out whether TrollTech will be willing to merge my code (or write new one)
into qpsprinter.

Thanks, Sivan Toledo (stoledo@tau.ac.il, Tel-Aviv University)

-------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic