| Sharp Fonts On A KDE Desktop |
| Tuesday, 15 May 2007 | ||
|
Updates: Added GTK font tweak 6/11/2007 Since there is already a guide to Sharp Fonts On A GNOME Desktop, I thought I would adapt it a bit for KDE (thanks goes to the author, as I have used some of his content here). This guide leans towards Kubuntu, as that is my distro of choice. This guide also tells how to get Swiftfox or Firefox to work with the ClearType fonts, which is something people have been trying to do for some time. Here we go! I have tested this on Ubuntu 7.04 (Feisty Fawn), but this should work for any KDE desktop. 1. Get the Microsoft Fonts If you have a Windows partition on your machine, or have a Windows machine you own, you may install the fonts by opening the systemsettings tool, going to the apperance section, and selecting the fonts installer. Then, click the add fonts button and navigate to the location of the Windows fonts (copy them from your other machine if Windows isn't on your Linux box) and select them all, hit enter, and you are done. As a side note, if you would like to install more fonts, you can download Automatix and use it to install the Microsoft core fonts (among other programs you may want). 2.Set up 96 DPI Fonts in X First we must configure X to use 96 dpi by modifying /etc/X11/xorg.conf. Open a terminal and run sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak Search for the monitor section (Section "Monitor"). Put the following lines at the end of that section: # DisplaySize 270 203 # 1024x768 96dpi
displaysize = (<pixelsize>/96)*25.4
Then uncomment the line that suits your screen resolution. If you have a resolution of 1024x768 pixels, the monitor section should look like this in the end:
Save the conf file, and reboot: sudo shutdown -r now After the system has come up again, open a terminal again and run the following commands: xdpyinfo | grep dimensions The output should display the correct screen resolution, like this: matt@matt-desktop:~$ xdpyinfo | grep dimensions xdpyinfo | grep resolution This should show that X is now using 96 dpi: matt@matt-desktop:~$ xdpyinfo | grep resolution 3. Tell KDE Which Fonts to Use All we have to do in the systemsettings tool now is to go to the Appearance section, and select Fonts. Choose the fonts that look the best to you. Personally, I have found that the following configuration works the best for me (click to enlarge): Make sure that under the GTK Styles and Fonts area that you have "Use my KDE style in GTK Applications" box checked! 4. Swiftfox/Firefox It takes a couple of extra things to get Swiftfox and/or Firefox to display fonts correctly. Open either of them up (depending on which one you use) and type about:config in the address bar. Then in the filter box, type "font.FreeType" and toggle the following to true (right click on entry->toggle): font.FreeType2.autohinted
These all should be true. Now, go to Edit->Preferences and click the
content button. Select your default font (I use Tahoma) and the default
size. Then, click advanced and set those settings to your heart's
desires as well. Make sure the box next to "Allow Pages to Choose their
Own Fonts" is checked, as well. Restart the browser, and everything
should be readable.font.FreeType2.enable font.FreeType2.printing leave font.FreeType2.unhinted as true, otherwise your fonts on the Swiftfox toolbar won't look right. 5. Some GTK Apps For some GTK apps, it is possible to make the fonts look nice. For example, without the next tweak, Automatix's fonts would look like garbage. Open a terminal and type "sudo vim ~/.gtkrc.mine" then hit the "I" key. Copy and paste the below text into the terminal: style "user-font" { fontset="-microsoft-tahoma-medium-r-normal-*-10--*-p-" } widget_class "*" style "user-font" Then, hit the "Esc" key, and type :wq (colon "w" "q"), and hit enter. All done! That's it! Again, I would like to thank the author of the GNOME guide, as I wouldn't have been able to figure this out without his instructions. You may repost this guide as long as you provide a link back to this page. |
||








