Re: TWM: truetype support
Marc Aurele La France <[email protected]> Sun, 4 Nov 2007 11:46:13 -0700 (Mountain Standard Time)
| Newsgroups | gmane.comp.xfree86.devel |
|---|---|
| Message-ID | <Pine.WNT.4.64.0711041135530.1432@tsi> |
On Mon, 22 Oct 2007, Eeri Kask wrote: >>> (I always considered the significantly simpler approach being enough: >>> the user in enabling TWM_USE_XFT voluntarily passes "the point of no >>> return"; if xft-font problems arise, then these are to be solved.) >> Well, that's the point. As you have it, the end user does _not_ in fact >> decide on TWM_USE_XFT. The distributor does. > I not quite sure if this is the essential point in our case who and how > compiles twm, but which fonts are installed and what stands in > system.twmrc for a user not wishing to touch the default, > distributor-provided configuration. > Having not verified, but I strongly suspect if starting the unmodified > twm having first removed the 'misc/' font directory entirely, then X is > not going to find 'fixed', and as of now, twm refuses to start. It > appears, 'fixed' is an alias to something like > '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1' > according to misc/fonts.alias; and the key is, this name is XLFD compliant. > So, luckily we are now a step closed to the solution: let's not use > 'fixed' as coded-in-default in twm.c if TWM_USE_XFT is defined, but > '-*-fixed-*-*-*-*-*-*-*-*-*-*-*-*', and neither XListFonts() nor > XftFontOpenXlfd() have any further difficulties! (Is XListFonts() > supposed to translate font alias names at all?) This looks a good idea, > in fact this is what you suggested first: let XListFonts() resolve > 'fixed' and then use it. Now we know how to do that. :-) > (As a backside, we then remove the flexibility in twm to use the > 'fixed'-alias-redirection to an arbitrary font.) First, the X server does not even start if it cannot resolve 'fixed'. In that case, whether or not `twm` starts is a moot point. Secondly, there are likely to be .twmrc's out there that specify other aliases, such as '7x13' and so on. Thus, it is important to fall back to a raster font when Xft cannot resolve a font name, whether or not that name is a default. This makes it unnecessary to change twm's default font names. Marc. +----------------------------------+----------------------------------+ | Marc Aurele La France | work: 1-780-492-9310 | | Academic Information and | fax: 1-780-492-1729 | | Communications Technologies | email: [email protected] | | 352 General Services Building +----------------------------------+ | University of Alberta | | | Edmonton, Alberta | Standard disclaimers apply | | T6G 2H1 | | | CANADA | | +----------------------------------+----------------------------------+ XFree86 developer and VP. ATI driver and X server internals.