Hi All! Tell me please is it possible to set font sizes in fontconfig? I''ve configured hinting, rendering and antialiasing settings system-wide and it works great, but still my KDE is using 8pt fonts, gnome apps by default are 9 or 10, and java apps are 11 or 12. I''d like to configure those settings system-wide... Thanx!
Hi, On 08/24/11 12:10 PM, Aekold Helbrass wrote:> Tell me please is it possible to set font sizes in fontconfig? I''ve > configured hinting, rendering and antialiasing settings system-wide > and it works great, but still my KDE is using 8pt fonts, gnome apps by > default are 9 or 10, and java apps are 11 or 12. I''d like to configure > those settings system-wide...In this case the problem could rather be that all those toolkits have their own understanding of the default font size, which they already supply to fontconfig when looking up their font. It is certainly possible to map all pixel sizes between say, 8 and 12 of a particular font to a single size using fontconfig, thus overriding what applications provide, but I don''t think that''s very wise, since it will also affect places where fonts shouldn''t be altered (e. g. Firefox window content). Toolkits normally check a few places for font settings -- for example (but probably not limited to): (1) XSETTINGS (2) System-wide toolkit-specific config files (qtrc, gtkrc -- the latter also for the Java GTK L&F). Note: this will use theme-specific config, if a theme is set in XSETTINGS. (3) User''s toolkit-specific config files (same but in home directory) (4) App-specific config files (for example, Firefox supports CSS files) (5) User''s app-specific config files (same but in home directory) Toolkit configuration can also be overridden with environment variables like GTK2_RC_FILES. Your best bet might be a GTK/Qt theme integration package. AFAIK most KDE-based distributions used to have such a thing, but I admit I have little experience with KDE. If you already use one and it doesn''t work, well, then I guess some trussing and file-editing is in order :) or asking somewhere where the KDE gurus lurk.. -Raimund -- Worringer St 31, Duesseldorf 40211 Germany, +49-179-2981632, icq 16845346
On 2011/08/25 01:18 (GMT+0200) Raimund Steger composed:> Your best bet might be a GTK/Qt theme integration package. AFAIK most > KDE-based distributions used to have such a thing, but I admit I have > little experience with KDE. If you already use one and it doesn''t work, > well, then I guess some trussing and file-editing is in order :) or > asking somewhere where the KDE gurus lurk..I have no material experience using Gnome, much less using KDE apps in Gnome. What I do know is that font sizes in QT & KDE apps are affected by the following 4 user config files, with the font content (most set to 10pt) of each of mine as a guide to manual configuration: ~/.config/Trolltech.conf: ... [Qt] font="Droid Sans,10,-1,5,50,0,0,0,0,0" ... ~/.kde4/shar/config/kdeglobals: [General] desktopFont=Droid Sans,10,-1,5,50,0,0,0,0,0 fixed=Droid Sans Mono,10,-1,5,50,0,0,0,0,0 font=Droid Sans,10,-1,5,50,0,0,0,0,0 menuFont=Droid Sans,10,-1,5,50,0,0,0,0,0 smallestReadableFont=Droid Sans,9,-1,5,50,0,0,0,0,0 taskbarFont=Droid Sans,9,-1,5,50,0,0,0,0,0 toolBarFont=Droid Sans,10,-1,5,50,0,0,0,0,0 ~/.fonts.conf: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font" > <edit name="autohint" > <bool>true</bool> </edit> </match> <match target="font" > <edit mode="assign" name="rgba" > <const>none</const> </edit> </match> <match target="font" > <edit mode="assign" name="hinting" > <bool>true</bool> </edit> </match> <match target="font" > <edit mode="assign" name="hintstyle" > <const>hintmedium</const> </edit> </match> <match target="font" > <edit mode="assign" name="antialias" > <bool>true</bool> </edit> </match> </fontconfig> ~/.kderc: [General] activeFont=Droid Sans,10,-1,5,75,0,0,0,0,0 desktopFont=Droid Sans,10,-1,5,50,0,0,0,0,0 fixed=Droid Sans Mono,10,-1,5,50,0,0,0,0,0 font=Droid Sans,10,-1,5,50,0,0,0,0,0 menuFont=Droid Sans,10,-1,5,50,0,0,0,0,0 smallestReadableFont=Droid Sans,9,-1,5,50,0,0,0,0,0 taskbarFont=Droid Sans,9,-1,5,50,0,0,0,0,0 toolBarFont=Droid Sans,10,-1,5,50,0,0,0,0,0 Why KDE4 duplicates the same font specs in two different config files I don''t know. Possibly ~/.kderc is a legacy from KDE3 that KDE3 apps run under KDE4 depend on, and KDE4 sets it only for that compatibility reason. The utility kcm_gtk is used to make Gnome apps run under KDE4 use the same fonts as KDE4. Under KDE4 fonts are configured using the systemsettings utility. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
On 2011/08/24 13:10 (GMT+0300) Aekold Helbrass composed:> Tell me please is it possible to set font sizes in fontconfig? I''ve > configured hinting, rendering and antialiasing settings system-wide > and it works great, but still my KDE is using 8pt fonts, gnome apps by > default are 9 or 10, and java apps are 11 or 12. I''d like to configure > those settings system-wide...In recent distros I''ve used, KDE4''s default and menu font size is 9pt. I''ve never run across 8pt as default, but 10pt used to be common. Something to check is whether everything is running the same DPI. I don''t use Gnome, but under KDE it''s possible for some apps to operate under a different DPI than others. You should check whether DPI is forced anywhere. I suppose Gnome might be forcing 96 using a method that KDE apps don''t see. Some environments and distros set Xft.dpi, while others don''t, and those that do don''t all set it the same way. http://fm.no-ip.com/Auth/Font/fonts-ptdemo.html may be of some assistance in assessing DPI, in addition to xdpyinfo and xrdb. Generally if DPI needs to be forced it''s more effective/uniform overall to set it via DisplaySize in /etc/X11/xorg.conf or a monitor.conf file in /etc/X11/xorg.conf.d/ than it is using a DTE-specific config method. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/