xfs initscript enhancements, take 5
Mike A. Harris
mharris at redhat.com
Thu Oct 9 10:41:17 UTC 2003
On Thu, 9 Oct 2003, Derek P. Moore wrote:
>> + if ls | grep -iqs "\.tt[cf]$" ; then
>> + # TrueType fonts found, generate fonts.scale and fonts.dir
>> ttmkfdir -d . -o fonts.scale
>> mkfontdir . &>/dev/null
>> [ -e fonts.dir ] && chmod 644 fonts.scale fonts.dir
>> fi
>> + if ls | grep -iqs "\.ot[cf]$" ; then
>> + # Opentype fonts found, generate fonts.scale and fonts.dir
>> + mkfontscale .
>> + mkfontdir . &>/dev/null
>> + [ -e fonts.dir ] && chmod 644 fonts.scale fonts.dir
>> + fi
>
>This script is fine and dandy assuming TTF and OTF fonts are in seperate
>directories.
Correct, but that isn't a problem because you would be incredibly
hard pressed to get both ttf and otf fonts working on your system
if you installed them into the same directory. XFree86.org
originally installed both TTF and OTF fonts into the same dir,
until it was learned that this broke horribly, then they
separated them out.
So, for XFree86 4.3.0 at least, each font type MUST be in a
directory which contains only fonts of that same type. There may
be some exceptions to that perhaps if one was to exhaustively
test all possible combinations, but the exceptions don't make the
rule. If people put one font type in each directory only, there
are no problems, so that is the only configuration officially
supported.
That is ugly of course, and so I hope to see future improvements
that permit all fonts to live in one huge directory if desired.
That's a ways off though IMHO, at least for core fonts.
>However, if even one OTF file occurs in the same directory as TTF
>files, the 'fonts.scale' of 'ttmkfdir' will be overwritten by 'mkfontscale'.
>... Which is fine, I suppose. If there /really/ is an important difference
>between 'ttmkfdir' and 'mkfontscale', it might be useful to be conscious of
>this particular "gotcha".
Yep, I'm conscious of that. ;o) XFree86.org has clearly stated
"that isn't supported" so it isn't something Red Hat installation
will ever do, and a user that does it kills their own
installation. ;o)
>Also... I think I must not be clued in to something here, but
>why doesn't this script have support for PostScript Type 1
>fonts? Don't they need fonts.dir and fonts.scale files?
XFree86 has never shipped with a tool to generate fonts.scale for
Type1 fonts. The files are hand edited presumeably and provided
in the sources. There was a tool called type1inst which was not
part of XFree86, however I don't recall the story on that tool.
I presume it sucked because it's never been shipped and nobody
seems to use it out there. mkfontscale supports Type1 fonts
however, and unless Owen objects, I would like to add support to
the xfs initscript to handle Type1 fonts also for the future.
It's kind of late in our development cycle for this kind of
change though, so it will have to wait until the next
distribution development cycle opens up. I think this could
potentially solve a number of problems people occasionally
encounter.
One way to avoid most of the problems that currently exist, is to
never ever put any of your own fonts into font directories which
are provided with the distribution and populated with fonts that
come with the distribution. The exceptions are the XFree86
"local" directory, and /usr/share/fonts and ~/.fonts
It's best to make your own new dirs and add them to the relevant
config files IMHO.
This will of course improve each release until we have font
sanity in OSSland. ;o)
--
Mike A. Harris ftp://people.redhat.com/mharris
OS Systems Engineer - XFree86 maintainer - Red Hat
More information about the fedora-devel-list
mailing list