Fonts in a KDE application

Craig Drummond Craig.Drummond at gmx.net
Wed Apr 6 21:36:58 BST 2005


> so that explains the location.  But, should all fonts be placed in the
> same directory?  The normal practice is to have a TTF|TT & Type1

Why not? Font are fonts - why care about the type? When the font selector 
lists a font, it doesnt tell you if its a Type 1 or TTF.

> Yes, I found it with 1062 fonts.  I don't think that this is the correct
> way to do it.  The normal GhostScript practice is to have a separate

And why not? Accoding to some debian people, I shouldnt be modifying anything 
in /usr (this is up to the system pacakge amanger, etc.) - so no adding of 
Fontmap files to /usr/X11R6/lib/X11/fonts, etc.

Adding all the fonts to /etc/fonts/Fontmap should not cause Ghostscript any 
problems - it would, afterall, have the same amount (probably more) info to 
process if it look at each sepeare Fontmap file. Plus its easier to just add 
the one file to GS's main Fontmap file. And its easier to set the GS_LIB, 
GS_FONTPATH to point to /etc/fonts

(And kfontinst has for a while created on large Fontmap file - all the local 
ones were concated into /etc/fonts/Fontmap.)

> Do you mean that I should add to:
> /usr/local/share/ghostscript/<version>/lib/Fontmap
>
> Would the line:
>
> 	(/etc/fonts/Fontmap) .runlibfile

Yup. But this *should* be done automatically
>
> work?? IAC, is this in a README somewhere?

Well kfontinst should be adding this, hence no README.
>
> > But, does installing the font work? (Afterall that is the main purpose!)
>
> Yes, but ... . (tm)  It didn't show up till I restarted KDE.

Odd. I think you have to restart KDE apps - I dont think Qt notices fontconfig 
changes. Does the fonts:/ ioslave notice the new fonts? If so, then so does 
fontconfig - all font listing actually comes from querying fontconfig for the 
font list.

>
> So, now that I have gotten some sleep. :-)
>
> This works except that I would rather the font were placed in a seperate
> TT|TTF directory based on its extension and I would prefer that it
> recoginzed my per directory "Fontmap" file and used that rather than

This is the way its designed - and works for me. Extensions are no longer 
relied upon, so this would make no difference.

> create a global one.  And, you have to restart KDE before the font shows
> up in the KCM Fonts dialog.

This is a Qt issue.
>
> And a question: what happens if I just copy the font to:
> "/usr/local/fonts" or a subdirectory of that.  Will either KFontInst or
> FontConfig ever find it?

Should do (but you should be using /usr/local/share/fonts), as long as the 
directory (or one of its parents) is listed in either /etc/font/fonts.conf 
or /etc/fonts/local.conf. You many need to run fc-cache to speed things up. 
And as said before, kfontinst now relies upon fontconfig for its font list.

Craig.




More information about the kde-core-devel mailing list