tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Not matching our bitmap Helvetica
> /etc/X11/twm/system.twmrc
> 14:TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
> this is the "XLFD" way of picking a font
Sort of. That's the X way; it just matches the pattern given against
the fonts available. It's just a string-with-wildcards match that has
been in X since at least the days of X11R3. XLFD is a way of attaching
semantics to the pieces of that string, so that (for example) a program
can take a particular font that matches that pattern (eg,
-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1) and deduce
that it is a bold-weight font and mechanically compute a name for the
corresponding regular-weight font. Or note that it is an upright font
and compute the corresponding slanted ("oblique") font. Etc.
The "modern" way, as I understand it (I don't use it, so my
understanding may be incorrect) moves font handling to the client,
which has upsides and downsides.
> It has some limitations, the most notable one is:
> - If the font doesn't exist, we get an error.
Well, if no matching font (not "the font", unless there are no
wildcards in the pattern) exists, the client gets an error. It can
choose to push that error to the user or it can handle it some other
way, such as by trying other fonts. (Admittedly, most clients using
that mechanism do choose the former. Which is not entirely
unreasonable; if I tell a program to use Helvetica, I would consider it
a bug if it took it upon itself to use something else instead, in
general, though there can be room for printing "can't find font XYZ,
using ABC instead" and substituting.)
> Because XLFD doesn't know how to pick another font if Helvetica is
> not available, just deleting it risks breaking random old programs.
More precisely, because "random old programs" don't know how to look
for other fonts if the one specified is not available. XLFD is just a
set of conventions for attaching semantics to parts of font names, not
an active subsystem, and thus isn't going to _do_ anything at all.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index