John A. Boyd Jr.
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
Hi Brian, If you''re ambitious enough to try the attached patches, you''ll have a more complete solution, but unfortunately, the maintainers of the various packages involved don''t seem all that interested (except for the FreeType folks). These patches may be a bit out of date at the moment; I''m sure I''ll update them next time I feel the urge to update one of the packages involved. Until then, this is the best I can do, not being a maintainer of any of these packages myself. I''ve commented on the problem a few times to this list, by the way. The problem is that the XLFD ''setwidth'' attribute was not carried forward in any of the font-related packages culminating at ''gnome-terminal''. The attached patches collectively resolve the issue. Keith Packard commented to this list recently that a new ''width'' attribute has been added to fontconfig. I defer to his knowledge of the issue and the packages involved, but with all due respect to him, I''m sure that''s not enough by itself. I invite Keith to look at my patches, to comment further, and/or to assist me in getting the rest of the maintainers of these packages to do something, whether that be considering and adopting my patches, or whatever else. Or, is there some reason someone doesn''t want ''fixed'' and other common bitmap fonts to be used in the first place? All things considered, it''s a fair question, I would humbly suggest... -John Brian J. Murrell wrote:> My appologies if you see this more than once. I tried a couple of times > to post via Gmane but that does not seem to be making for some reason. > > 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. >-------------- next part -------------- A non-text attachment was scrubbed... Name: addstyle-patches.tar.gz Type: application/x-gzip Size: 12763 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040209/e4a5fa74/addstyle-patches.tar.bin
John A. Boyd Jr.
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
By the way, Brian, with the patches, the font you''re looking for selects as "Fixed Semi-Condensed 10" (as opposed to "Fixed 10", with "Regular" width), e.g., in gnome-terminal''s font selection dialog (for 2.4.x), assuming you''ve built appropriate fc-cache entries for the PCF/BDF font files. Those of you with an interest in the issue can look at this dialog, and at other places where fonts are selected, and see why Keith''s additional ''width'' attribute is not enough by itself. In this specific case, ''width'' is not a generally available selection attribute unless it (also) becomes part of the ''Style'' or ''Family'' string(s). Keith''s change is good; it''s just not enough of a change. The following are the (prefix) patterns for the fonts that conflict for me, with the prior result that 6x13 (which is usually aliased as "fixed") was not selectable: "6x13.pcf.gz" 0 "Fixed:style=SemiCondensed:slant=0:weight=100:width=87:pixelsize=13 "7x13.pcf.gz" 0 "Fixed:style=Regular:slant=0:weight=100:width=100:pixelsize=13 The former is thus unambiguously selectable as "Fixed Semi-Condensed 10", and the latter as "Fixed 10" (or Fixed Regular 10). I.e., they show up as two different styles in font selection dialogs: "Semi-Condensed" and "Regular". (Note that the patches deal with the embedded "-", so that, e.g., "Semi-Condensed" == "SemiCondensed", etc.) -John Brian J. Murrell wrote:> My appologies if you see this more than once. I tried a couple of times > to post via Gmane but that does not seem to be making for some reason. > > 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. >
Brian J. Murrell
2005-Nov-21 08:50 UTC
[Fontconfig] gnome-terminal and font selection -- again
My appologies if you see this more than once. I tried a couple of times to post via Gmane but that does not seem to be making for some reason. 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. -- 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/20040206/803b44a4/attachment.pgp