2008-06-25

Firefox fonts

Its huge subject, including font rendering in system (in my case its Xorg in Ubuntu). It starts from font installing, the topic I found quite though. I try to update this post from time to time.

Font families and sizes


In Firefox I still have problems with font sizes and many times, when I change font properties in Edit -> Preferences I get a mess on some web pages.
To unify all setiings without crawling thru all properties, I close Firefox, open preferences file, for exampl
e

~/.mozilla/firefox/w6mr5ny9.default/prefs.js

where only the profile name (w6mr5ny9.default) can be confusing, and I change all settings according to my nee
ds. By now its:

user_pref("font.language.group", "x-western");
user_pref("font.minimum-size.x-central-euro", 12);
user_pref("font.minimum-size.x-unicode", 12);
user_pref("font.minimum-size.x-user-def", 12);
user_pref("font.minimum-size.x-western", 12);
user_pref("font.name.monospace.x-central-euro", "Inconsolata");
user_pref("font.name.monospace.x-unicode", "Inconsolata");
user_pref("font.name.monospace.x-user-def", "Inconsolata");
user_pref("font.name.monospace.x-western", "Inconsolata");
user_pref("font.name.sans-serif.x-central-euro", "DejaVu Sans");
user_pref("font.name.sans-serif.x-unicode", "DejaVu Sans");
user_pref("font.name.sans-serif.x-user-def", "DejaVu Sans");
user_pref("font.name.sans-serif.x-western", "DejaVu Sans");
user_pref("font.name.serif.x-central-euro", "DejaVu Serif");
user_pref("font.name.serif.x-unicode", "DejaVu Serif");
user_pref("font.name.serif.x-user-def", "DejaVu Serif");
user_pref("font.name.serif.x-western", "DejaVu Serif");
user_pref("font.size.fixed.x-central-euro", 16);
user_pref("font.size.fixed.x-unicode", 16);
user_pref("font.size.fixed.x-user-def", 16);
user_pref("font.size.fixed.x-western", 16);


I always try to set the same font name and size for all 4 language groups I use (Central European, Unicode, Western and User Defined).

Its possible to change it on about:config page directly in Firefox.

The other problem in Firefox is its lack of connection to systems font settings. Firefox doesn't antialiases fonts even its set in system. To turn it on create ~/.fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" 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>false</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintnone</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

No comments: