tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Not matching our bitmap Helvetica



On Fri, Aug 09, 2019 at 07:35:51AM +0200, Martin Husemann wrote:
> On Thu, Aug 08, 2019 at 06:47:58PM +0000, coypu%sdf.org@localhost wrote:
> > Things like twm use XLFD, which ignores this configuration, so it can
> > still find Helvetica, so it continues working.
> 
> Since I don't know anything about fonts, matching and the relevante libs
> in our X environment, can you explain this in a bit more detail?
> 
> What is this config for, what other matchings are used and how can I$$
> check what applications use what kind of matching?
> 

ctwm/twm do this:

/etc/X11/twm/system.twmrc
14:TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"

this is the "XLFD" way of picking a font that does not go through
fontconfig.

XLFD is a purely compatibility way of picking fonts. It has some
limitations, the most notable one is:
- If the font doesn't exist, we get an error.


Almost every new program uses Xft, which goes through fontconfig, and
will be affected by these changes.
It looks like this:

xterm*font:             xft:FiraCode:size=12

You can replicate the search xft does with "fc-match FiraCode"
You will see that:
- It will try another font if FiraCode is not available
- The unit for size isn't "pixels", this font will get bigger if
  another "Xft.dpi: 200" is chosen.


Everything new uses fontconfig, but everything in xsrc uses XLFD.

Because XLFD doesn't know how to pick another font if Helvetica is not
available, just deleting it risks breaking random old programs.
e.g. twm will start without title bars, in the default configuration.


> Stupid other question: what would it take to ship a good and ttf enabled
> setup in base (plus some of the fonts)? We already rely on some of this
> in the wscons font generating tool (where we only commit the resulting
> pre-scaled fonts) - having this completely in base could have some merit
> if it is not too heavy or too churny.

We do ship some TTF fonts (/usr/X11R7/lib/X11/fonts/TTF/*), so we can
just add them as we wish.


Home | Main Index | Thread Index | Old Index