Brian J. Murrell
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
I know this topic seems to get covered in various places with various different hacks (i.e. deleting "fixed" fonts until the one you want is the only left with enough priority that it gets used), but I want to try to solve it properly on my system without hacking up my fonts.conf file like I have to everytime I install a new fontconfig package. With the help of xfd, I have determined that the font(config specfication) I want to use in gnome-terminal is: Fixed:style=Regular:slant=0:weight=100:width=87:pixelsize=13:spacing=100 but this is a bitmap font and not scalable, so trying to get a more simple specification like "Fixed" to select it is impossible. So what configuration changes can I make to get access to this specific font (such that it will be selectable in gnome-terminal) in preference to what is in normal circumstances "better" Fixed fonts? I have tried something like: <fontconfig> <match target="pattern"> <test qual="any" name="family"> <string>Fixed</string> </test> <edit name="family" mode="assign"> <string>Fixed:style=Regular:slant=0:weight=100:width=87:pixelsize=13:spacing=100:foundry=Misc</string> </edit> </match> </fontconfig> in my ~/.fonts.conf but it does not seem to do what I want. I don''t really want to override fontconfig''s idea of the best "Fixed" font anyhow. I would prefer to create a new specification with something like: <fontconfig> <match target="pattern"> <test qual="any" name="family"> <string>MyFixedFont</string> </test> <edit name="family" mode="assign"> <string>Fixed:style=Regular:slant=0:weight=100:width=87:pixelsize=13:spacing=100:foundry=Misc</string> </edit> </match> </fontconfig> So that gnome-terminal would show an additional font in its list named "MyFixedFont". But the above syntax does not seem to do that either. How can I achieve the results I am looking for? Thanx, b.
Keith Packard
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
Around 7 o''clock on Feb 6, "Brian J. Murrell" wrote:> So what configuration changes can I make to get access to this > specific font (such that it will be selectable in gnome-terminal) in > preference to what is in normal circumstances "better" Fixed fonts? > > I have tried something like: > > <fontconfig> > <match target="pattern"> > <test qual="any" name="family"> > <string>Fixed</string> > </test> > <edit name="family" mode="assign"> > <string>Fixed:style=Regular:slant=0:weight=100:width=87:pixelsize=13:spacing=100:foundry=Misc</string> > </edit> > </match> > </fontconfig>You''re so close... You need to assign each field separately; you can''t use the string syntax (although, that might not be a bad addition...) <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. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040216/d563022b/attachment.pgp
John A. Boyd Jr.
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
<To the list - the original was rejected due to size of the attached image - this image was reduced.> <Moderator - reject my prior submission if you prefer.> I guess I''m so frustrated by this, Brian, that I can''t even count... But a picture is worth a thousand words, so I hope you can see the attached screenshot of my gnome-terminal font selection dialog. The original XLFDs in question are: 6x13 (for the font selected in the attached image): -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 7x13 (for what "Regular" might select): -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso10646-1 XLFD doesn''t use "Regular" for either. So, where does the "Regular" come from? The answer is it''s some software designer(s)'' idea of how much information the average font user needs about a font, other than "Family Name" and "Size" (which is actually height, in terms of actual font metrics). I.e., "Style" is "whatever information a user needs, besides font name and height, to select specific variants of a font." That''s a perfectly reasonable definition, but it''s not being honored by too many of the current generation of font packages, which hardcode "Regular", "Bold", and "Italic", and think automatically selecting fonts otherwise makes up the difference. The inadequacy here, that I''m trying to point out, is that users have been left high and dry, with no means to specify font characteristics, even if they want to edit files like "fonts.conf" like you did, since that doesn''t actually help them select a font in practice. It turns out that one can compose a list of "value-descriptive" keywords that a user CAN use, either in an existing font selection dialog or elsewhere, that are sufficiently abstract, mutually exclusive, and descriptive, to allow USERS to select fonts instead of programmers making decisions about what font a user should get to see, and automating the selection for them. Until such an approach is employed by recent "let''s replace XLFD because we don''t like it" tools, there is a net loss in user terms, in my opinion. -John Brian J. Murrell wrote:> On Tue, 2004-02-17 at 16:25, John A. Boyd Jr. wrote: > >>I''m almost at a loss for words... > > > Glad I could leave you speechless. :-) > > >>It "works?" How do you define "works?" > > > It met the goal(s) of my original list posting. > > >>I guess I have a different >>standard: it "works" when it can be used from all applications of >>interest to me. > > > Fair enough, but the question Keith answered and the direction he gave > me were with respect to my original goal which was to be able to choose > which font I saw as "Fixed" in gnome-terminal. > > Now as I followed up, ideally I could "invent" new fonts (being aliases > to existing fonts) that would appear in the gnome font selection dialog, > but for my purposes here, overriding "Fixed" with a specific font is a > satisfactory short term solution. > > >>2) What is style "Regular"? What does it have to do with the >> original XLFD specification? > > > As per my original posting, it was just what "xfd" gave me. I don''t > know much about the details of the original XLFD specification. > > >>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. > > > Fair enough, which is why I asked about being able to define a new > font/alias which I called "My Fixed Font" to describe the specific XLFD > font I wanted to use. > > >>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. > > > I am most likely the least qualified to do so, so I will just hold my > tongue. > > b. >-------------- next part -------------- A non-text attachment was scrubbed... Name: fontdlg-s.jpg Type: image/jpeg Size: 20624 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040217/972e74de/fontdlg-s.jpg
Brian J. Murrell
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
On Tue, 2004-02-17 at 16:25, John A. Boyd Jr. wrote:> I''m almost at a loss for words...Glad I could leave you speechless. :-)> It "works?" How do you define "works?"It met the goal(s) of my original list posting.> I guess I have a different > standard: it "works" when it can be used from all applications of > interest to me.Fair enough, but the question Keith answered and the direction he gave me were with respect to my original goal which was to be able to choose which font I saw as "Fixed" in gnome-terminal. Now as I followed up, ideally I could "invent" new fonts (being aliases to existing fonts) that would appear in the gnome font selection dialog, but for my purposes here, overriding "Fixed" with a specific font is a satisfactory short term solution.> 2) What is style "Regular"? What does it have to do with the > original XLFD specification?As per my original posting, it was just what "xfd" gave me. I don''t know much about the details of the original XLFD specification.> 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.Fair enough, which is why I asked about being able to define a new font/alias which I called "My Fixed Font" to describe the specific XLFD font I wanted to use.> 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.I am most likely the least qualified to do so, so I will just hold my tongue. b. -- My other computer is your Microsoft Windows server. Brian J. Murrell -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040217/8da994c6/attachment.pgp
Brian J. Murrell
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
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. -- My other computer is your Microsoft Windows server. Brian J. Murrell -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040217/39bcc4b9/attachment.pgp
John A. Boyd Jr.
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
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 keywords: - "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. -John 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. >
John A. Boyd Jr.
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
I guess I''m so frustrated by this, Brian, that I can''t even count... But a picture is worth a thousand words, so I hope you can see the attached screenshot of my gnome-terminal font selection dialog. The original XLFDs in question are: 6x13 (for the font selected in the attached image): -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 7x13 (for what "Regular" might select): -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso10646-1 XLFD doesn''t use "Regular" for either. So, where does the "Regular" come from? The answer is it''s some software designer(s)'' idea of how much information the average font user needs about a font, other than "Family Name" and "Size" (which is actually height, in terms of actual font metrics). I.e., "Style" is "whatever information a user needs, besides font name and height, to select specific variants of a font." That''s a perfectly reasonable definition, but it''s not being honored by too many of the current generation of font packages, which hardcode "Regular", "Bold", and "Italic", and think automatically selecting fonts otherwise makes up the difference. The inadequacy here, that I''m trying to point out, is that users have been left high and dry, with no means to specify font characteristics, even if they want to edit files like "fonts.conf" like you did, since that doesn''t actually help them select a font in practice. It turns out that one can compose a list of "value-descriptive" keywords that a user CAN use, either in an existing font selection dialog or elsewhere, that are sufficiently abstract, mutually exclusive, and descriptive, to allow USERS to select fonts instead of programmers making decisions about what font a user should get to see, and automating the selection for them. Until such an approach is employed by recent "let''s replace XLFD because we don''t like it" tools, there is a net loss in user terms, in my opinion. -John Brian J. Murrell wrote:> On Tue, 2004-02-17 at 16:25, John A. Boyd Jr. wrote: > >>I''m almost at a loss for words... > > > Glad I could leave you speechless. :-) > > >>It "works?" How do you define "works?" > > > It met the goal(s) of my original list posting. > > >>I guess I have a different >>standard: it "works" when it can be used from all applications of >>interest to me. > > > Fair enough, but the question Keith answered and the direction he gave > me were with respect to my original goal which was to be able to choose > which font I saw as "Fixed" in gnome-terminal. > > Now as I followed up, ideally I could "invent" new fonts (being aliases > to existing fonts) that would appear in the gnome font selection dialog, > but for my purposes here, overriding "Fixed" with a specific font is a > satisfactory short term solution. > > >>2) What is style "Regular"? What does it have to do with the >> original XLFD specification? > > > As per my original posting, it was just what "xfd" gave me. I don''t > know much about the details of the original XLFD specification. > > >>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. > > > Fair enough, which is why I asked about being able to define a new > font/alias which I called "My Fixed Font" to describe the specific XLFD > font I wanted to use. > > >>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. > > > I am most likely the least qualified to do so, so I will just hold my > tongue. > > b. >-------------- next part -------------- A non-text attachment was scrubbed... Name: fontdlg.jpg Type: image/jpeg Size: 33388 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040314/8d7f808e/fontdlg.jpg
Wow! A ghost mail! The mail is sent on Feb 18, and received on Mar 14. As John described in another mail, this one had been rejected due to size of the attached image. It seems the delay happened at pdx.freedesktop.org, as following mail head information shows. May anyone explain how did this happen, please? Received: from localhost ([127.0.0.1] helo=pdx.freedesktop.org) by pdx.freedesktop.org with esmtp (Exim 4.30) id 1B2Xwe-0005un-OC; Sun, 14 Mar 2004 07:54:32 -0800 Received: from nwdir2ext.netwalk.com ([216.69.192.98] helo=smtp2.netwalk.com) by pdx.freedesktop.org with esmtp (Exim 4.30) id 1AtDhB-0007fJ-EU for fontconfig@fontconfig.org; Tue, 17 Feb 2004 14:28:01 -0800 Xie Qian Open System and Chinese Information Processing Center, Institute of Software, Chinese Academy of Sciences, P.O. Box 8718, Beijing 100080, CHINA ----- Original Message ----- From: "John A. Boyd Jr." <jaboydjr@netwalk.com> To: <fontconfig@fontconfig.org> Sent: Wednesday, February 18, 2004 6:27 AM Subject: Re: [Fontconfig] gnome-terminal and font selection -- again> I guess I''m so frustrated by this, Brian, that I can''t even > count... > > ......