Fonts in a KDE application
James Richard Tyrer
tyrerj at acm.org
Thu Apr 7 21:56:49 BST 2005
Craig Drummond wrote:
>> 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.
>
As I said, it has been normal practice. Perhaps the reason that Type1
and TrueType were kept in separate directories was that it used to be
necessary to use separate apps to install them. This is no longer the
case so that reason is no longer valid.
>
>> 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
You would add that to GS_LIB since GS_FONTPATH is used to list
directories that do NOT have Fontmap files. But, this should not be
needed if you add it to:
/usr/share/ghostscript/8.50/lib/Fontmap
> (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
That is the only problem. It was not added to:
/usr/share/ghostscript/8.50/lib/Fontmap
after I installed the font to test it.
>> 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.
So, now that it is possible to have Type1 and TrueType fonts in the same
directory, I will try you system and see how it works. I can edit my:
/usr/share/ghostscript/8.50/lib/Fontmap
by hand, no problem, but you should find out why it didn't work.
However, I do have a lot of fonts and for me it is helpful to have them
in separate directories but not an issue for a user that only uses
KFontInst to manage his fonts.
--
JRT
More information about the kde-core-devel
mailing list