[Open Office] Fonts

Giuseppe Ghibò ghibo at mandriva.com
Thu Mar 16 10:36:43 EST 2006


Philipp Lohmann - Sun Germany - ham02 - Hamburg wrote:

> Hi,
> 
> here a short overview over psprint's font discovery that i hope covers 
> the open questions. Please feel free to contact me if you want to know 
> more.
> 
> psprint discovers fonts in this order:
> - from fontconfig if available
> - from <office>/share/fonts/truetype,
>        <office>/share/fonts/type1,
>        <userinst>/user/fonts
>        the currently selected java runtime (jre)
> - from the environment variable SAL_PRIVATE_FONTPATH (usually empty)
> - from the X fontpath if fontconfig was NOT available (also on a remote 
> connection since these paths are often the same within a network)
> - from chkfontpath if the X font path is examined and server entries found
> - from some standard X font directories if the X font path is examined
> 
> 
> in the directories collected the fonts.alias files are opened and 
> corresponding alias names are added to the discovered fonts.
> 
> The attributes of all discovered fonts are stored in pspfontcache as to 
> not access every font on startup; a group of font cache entries gets 
> invalidated if the modification time of the directory containing those 
> entries has changed.

This means that it's not possible to provide an hand-tuned system-wide 
pspfontcache? As I've seen there it's possible to provide Type1 metric .afm
files as standalone (i.e. without the corresponding .pfb file), or metric .afm 
for different PFB/Type1 fonts.

> 
> psprint's fontlist concerns only fonts for which we have access to the 
> font files (so we can download them to PostScript or PDF or render them 
> with freetype). In vcl the normal X fonts are added to this list, but of
> course X fonts can only be displayed on the display. If there are two 
> fonts with the same name and attributes, then the psprint font gets 
> chosen since X fonts tend to be low quality (no antialiasing, often only 
> certain sizes available).

In fact I think I build with a patch disabling thus bitmap/no AAsed fonts.

> 
> As for the question of document creation on systems where you do not 
> have Helvetica: you can always create a document with Helvetica by 
> entering "Helvetica" into the font combobox. The font stored in the 
> document will be "Helvetica" then regardless what actually gets shown on 
> the screen. Of course it is always helpful to have either a Helvetica 
> font or a font aliased to Helvetica (either through fontconfig or 
> fonts.alias, if you don't have fontconfig).
> 

The problem is that in fontconfig (I've both fontconfig and xfs/chkfontpath)
I've already entries/rules for getting Helvetica->Nimbus Sans L aliases
(or the same for Times-Roman->Nimbus Roman No9 L), but they seems ignored
by OOo2. What I wonder is also whether fonts.dir is now ignored?

The second problem is that if in the font box I type Helvetica
(or any other fontname, such as 'MyGenericFont'), as
soon as I switch to the composition window, the current font automatically
switches to the default font and not to Helvetica or what I've type in the
fontbox.

Furthermore if I provide the Helvetica in fonts.alias instead of fonts.dir
I think that it will confuse the xfs font server, as Helvetica
already exists in PCF/bitmap format.


IMHO we can have this cases:

- suppose I'm successfully in let OOo see the n019003l.pfb
as "Helvetica" (the n019003l.pfb has fontname /NimbusSanL-Regu)
but when printing there are two choice IMHO:

1) since Helvetica is part of the AdobeStandard 35 fonts, as well
as of the standard PDF 14 fonts, it's a "resident" font, so it
could also not be included in either the PostScript or PDF output.
Of course this won't apply if instead of Helvetica I've a
font called "MyGenericFont" which is mapped to n019003l.pfb.

2) since /Helvetica mapped to /NimbusSanL-Regu might
become a de-facto like any other OOo fonts, probably the
PS/PDF output might contain the NimbusSanL-Regu font (or
a subset of it).

Thanks.
Bye
Giuseppe.


More information about the Openoffice mailing list