Q: How can I make my fonts in Hoary more Windows like?
A: See immediately below for a ClearType look. See end note for non-antialiased look.
Note: Much of this can be simplified if not using Tahoma. It is included here since Tahoma is used extensively in XP.
For comparison, here's Windows with ClearType:
![]()
And here's Ubuntu showing the same page:
![]()
Many thanks to all the people who contributed to the links below, most of this is simply adapted to Ubuntu from there.
http://www.linuxquestions.org/questi...5&pagenumber=1
http://avi.alkalay.net/linux/docs/font-howto/Font.html
http://convexhull.com/mandrake_fonts.html
http://www.ubuntuforums.org/showthread.php?t=4456
Step 1. Configure X and Gnome to 96 dpi
Locate Section "Monitor" and add the following lines before EndSection:Code:sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak sudo gedit /etc/X11/xorg.conf
Uncomment the line corresponding to your current resolution.Code:# DisplaySize 270 203 # 1024x768 96dpi # DisplaySize 338 254 # 1280x960 96dpi # DisplaySize 338 270 # 1280x1024 96dpi # DisplaySize 370 277 # 1400x1050 96dpi # DisplaySize 423 370 # 1600x1400 96dpi
To get other values, use the following formula:
displaysize = <pixelsize>/96*25.4
Either restart X or reboot, after which verify the dpi setting is correct:
If the resolution is not 96x96 dots per inch slightly adjust the DisplaySize values until correct.Code:xdpyinfo | grep dimensions xdpyinfo | grep resolution
Configure Gnome to run at 96 dpi in System > Preferences > Font > Details
Step 2. Install Microsoft fonts
Install msttcorefonts package (Microsoft TrueType core fonts)
OPTIONAL - If you own a licensed copy of Windows you may also add Tahoma which is not present in msttcorefonts. You can install it in your home directory by simply copying it into ~/.fonts. If so, you're done, skip to the next step. Alternatively, you can follow the more involved steps below and install it system-wide, which has the advantage of making it available to GTK1 appplications.
NOTE: If there's a better way to do this please correct me. Thanks.
Copy tahomabd.ttf and tahoma.ttf into /usr/share/fonts/truetype/custom/Code:sudo mkdir /usr/share/fonts/truetype/custom
Create Tahoma hints:
Paste this:Code:sudo gedit /etc/defoma/hints/custom.hints
Register Tahoma:Code:category truetype begin /usr/share/fonts/truetype/custom/tahoma.ttf Family = Tahoma FontName = Tahoma-Regular Encoding = Unicode Location = Magyar Dutch Spanish Czech Russian English Catalan Slovak Italian Turkish Danish Slovenian Basque Portuguese German Polish Swedish Norwegian French Finnish Greek Charset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 ISO10646-1 UniCharset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 GeneralFamily = SansSerif Weight = Medium Width = Variable Shape = NoSerif Upright Foundry = Microsoft Priority = 20 end begin /usr/share/fonts/truetype/custom/tahomabd.ttf Family = Tahoma FontName = Tahoma-Bold Encoding = Unicode Location = Magyar Dutch Spanish Czech Russian English Catalan Slovak Italian Turkish Danish Slovenian Basque Portuguese German Polish Swedish Norwegian French Finnish Greek Charset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 ISO10646-1 UniCharset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 GeneralFamily = SansSerif Weight = Bold Width = Variable Shape = NoSerif Upright Foundry = Microsoft Priority = 20 end
Step 3. Configure system-wide fontconfig rendering methodCode:sudo /usr/bin/defoma-font -v register-all /etc/defoma/hints/custom.hints
Select Bytecode interpreter or Subpixel renderingCode:sudo dpkg-reconfigure fontconfig
Step 4. Configure Gnome font preferences to your liking. Example:
![]()
Step 5. Turn autohinting on for fonts larger than 12 pts (this will include the Firefox fonts) and perform font substitution for websites using Bitstream, Helvetica and Palatino fonts. Feel free to adjust these to your liking.
With autohinting on, Tahoma loses proper spacing and the letters mush together. Tweaking .fonts.conf turns off autohinting for smaller font sizes.
Paste this:Code:gedit ~/.fonts.conf
Log out of Gnome and log back in.Code:<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <test compare="more" name="pixelsize" qual="any"> <double>12</double> </test> <edit name="autohint" mode="assign" > <bool>true</bool> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Bitstream Vera Sans</string> </test> <edit name="family" mode="assign"> <string>Arial</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Helvetica</string> </test> <edit name="family" mode="assign"> <string>Arial</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Palatino</string> </test> <edit name="family" mode="assign"> <string>Georgia</string> </edit> </match> </fontconfig>
Step 6. OPTIONAL - Configure GTK1 applications to use Tahoma
Paste this:Code:gedit ~/.gtkrc.mine
Substitute with Verdana or other font as desired.Code:style "user-font" { fontset="-microsoft-tahoma-medium-r-normal-*-10-*-*-*-p-*-*" } widget_class "*" style "user-font"
Step 7. Configure Firefox fonts. Example:
END NOTE: This could also be used to turn anti-aliasing off alltogether for the smaller fonts that are used in the menus, dialog boxes, toolbar text, etc. I've seen that question asked a few times, so I'll address it below. Doing so will make Gnome look exactly like Windows without ClearType, while still antialiasing large fonts used for example in website titles and headings. Use this .fonts.conf in Step 5:
Code:<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <test compare="more" name="pixelsize" qual="any"> <double>0</double> </test> <test compare="less" name="pixelsize" qual="any"> <double>15</double> </test> <edit mode="assign" name="antialias"> <bool>false</bool> </edit> </match> <!-- UNCOMMENT THIS SECTION TO ENABLE ANTIALIAS FOR BOLD FONTS <match target="font"> <test name="weight"> <const>bold</const> <const>black</const> </test> <edit name="antialias" mode="assign"> <bool>true</bool> </edit> </match> --> <match target="pattern"> <test qual="any" name="family"> <string>Bitstream Vera Sans</string> </test> <edit name="family" mode="assign"> <string>Arial</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Helvetica</string> </test> <edit name="family" mode="assign"> <string>Arial</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>Palatino</string> </test> <edit name="family" mode="assign"> <string>Georgia</string> </edit> </match> </fontconfig>







Adv Reply







Bookmarks