[Fontconfig] gnome-terminal and font selection -- again

John A. Boyd Jr. jaboydjr at netwalk.com
Wed Feb 18 08:25:11 EST 2004

I'm almost at a loss for words...

It "works?"  How do you define "works?"  I guess I have a different
standard: it "works" when it can be used from all applications of
interest to me.

Two other comments:

1) Decipixels is not "weird".  It's purpose is to allow subpixel
    resolution to be specified without using floating point
    representations, which are not as portable as integers, and
    which, from an end user's perspective, are not as easy to use
    as integers.

    And it's not unusual.  Postscript has been doing similar
    things for quite a while now.  Other non-font human-readable
    specification protocols use it as well.  It's a standard technique.

    (Consider how food and medicine are measured, for example.)

2) What is style "Regular"?  What does it have to do with the
    original XLFD specification?

    In EVERY one of the font packages I am aware of, "style" is
    at the least redundantly defined, and used only for three

	- "Regular"  - which is ENTIRELY ambiguous
	- "Bold"     - which is also a "weight"
	- "Italic"   - which is also a "slant"

3) If you, Brian, make up an alias family name for a font which
    could otherwise be very easily described in a standard way,
    then others will do the same, and bunches of people will have
    different pet names for what used to be a standardly-aliased
    font.  That's real progress (NOT)...

No one has commented on my patches, which introduce a standard
way to handle attributes which occur in known fonts but are not
otherwise as easily classified, e.g., as "weight" or "slant", or are
not otherwise uniformly classified across font-handling applications.

All applications that I know of handle a "style" attribute.  If
weight "Bold" (which has been hardcoded) and slant "Italic" are
acceptable style keywords, then why not also width "SemiCondensed",
introduced so as to allow other such keywords as well?

If all font-handling applications are changed to handle a more
flexible definition of "style", it would address this kind of
issue in a way that truly "works".

There is a difference between what a programmer considers necessary,
and what a user needs.  What Keith has suggested, and Brian has
called "working", with all due respect to both of you, does not
work for users, but only for programmers in the limited sense that
you can define something which can't be used as you define it.

Working for programmers in such a limited sense isn't good enough
for me.


Brian J. Murrell wrote:
> On Mon, 2004-02-16 at 14:55, Keith Packard wrote:
>>You're so close...
> :-)
>>You need to assign each field separately;
> Ahhhh.
>>you can't use the string 
>>syntax (although, that might not be a bad addition...)
> Indeed.  It seemed "intuitive", and certainly is a lot more brief than
> the alternative (see below).
>>	<edit name="width"><double>8.7</double></edit>
>>might be what you want.  I don't know what the 'width' value of the font 
>>you want to use is though; 87 is certainly wrong -- XLFD names use widths 
>>in decipixels for some weird reason.
> This worked.  I ended up using the following in my fonts.conf:
> <fontconfig>
>     <match target="pattern">
> 	<test qual="any" name="family">
> 	    <string>Fixed</string>
> 	</test>
> 	<edit name="family" mode="assign"><string>Fixed</string></edit>
> 	<edit name="style" mode="assign"><string>Regular</string></edit>
> 	<edit name="slant" mode="assign"><int>0</int></edit>
> 	<edit name="weight" mode="assign"><int>100</int></edit>
> 	<edit name="width" mode="assign"><double>8.7</double></edit>
> 	<edit name="pixelsize" mode="assign"><double>13</double></edit>
> 	<edit name="spacing" mode="assign"><int>100</int></edit>
>     </match>
> </fontconfig>
> It certainly is possible that I could have specified fewer edits and
> still got the font I wanted, but I did not test (by trial and error)
> this out.
> So, this works, but it "butchers" the use of the the "Fixed" font for
> any other applications.  Is there a way to use some other value than
> "Fixed" such that it is listed as an available font in gnome-terminal's
> setup dialog (actually the gnome/gtk font dialog)?
> Ideally I want to define a brand new font name.  Perhaps something like
> "My Terminal Font", so that "Fixed" remains unaltered but I get a new
> font in the standard gnome font dialog that I can use in gnome-terminal.
> Any way to do it with just fonts.conf?
> b.

More information about the Fontconfig mailing list