Announcement

Collapse
No announcement yet.

Font settings in Kubuntu 8.10

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Font settings in Kubuntu 8.10

    Hi,

    I have noticed that the font rendering in Kubuntu is quite below par. In particular there is a problem regarding Firefox.

    I have been playing around with the fonts and have not yet found anything that really hit the spot.
    There seem to be a lot of half solutions in various forums, but i have not seen anything specific for 8.10.

    Firefox is my killer app and if it can't work with the OS, then the OS gotta go. Despite that, I would like to give Kubuntu a fair shot, but I understand why it has so little appeal to the average user who don't want to spend 2 days trying to get a decent font rendering in Firefox.

    Does anyone have any suggestions regarding the system font settings and the Firefox font settings?



    #2
    Re: Font settings in Kubuntu 8.10

    Firefox is a bit Gnome-biased seeing as it's based on the GTK framework (read: GNOME). That said, I managed to get it quite agreeable, even gorgeous. I've done this on several machines, all with LCD screens and prepared for Japanese bitmap font display. If you're using a CRT screen, your mileage may vary; sub-pixel rendering can cause weird colours around fonts on those.

    Call it a ritual performed early after each installation, so it's assuming you have the default fonts set up. Do note that this will install non-free software (msttcorefonts and *-naga10 font packages). I'll throw in some instructions for qtcurve, as well.

    I wrote this for KDE 4.2 beta 2, but everything should work for the version 4.1.3 that's in the official repositories.

    The whole procedure: (argh @ kubuntuforums' list syntax)
    • Terminal: $ sudo aptitude install gtk2-engines-qtcurve
    • Open up Settings Manager -> Appearance section
      • GTK Styles and Fonts
        • GTK Styles, Use Another Style: Qtcurve (if it's not there, log out and back in, or go back to this step later after having done so)
        • GTK Fonts, Use my KDE fonts in GTK applications
      • Fonts
        • Antialiasing: Enabled, and click Configure
          • Use sub-pixel rendering: RGB
          • Hinting style: Full.
        • Force fonts DPI: 96 DPI
        • Adjust all fonts: DejaVu Sans (excepting the Monotype font, which you could set to DejaVu Mono if you wish).
    • Terminal:
      • $ sudo dpkg-reconfigure fontconfig-config
        • Native
        • Always
        • Yes
      • $ sudo dpkg-reconfigure fontconfig
      • $ sudo aptitude install msttcorefonts ttf-kochi-gothic-naga10 ttf-kochi-mincho-naga10 ttf-sazanami-gothic ttf-sazanami-mincho
    • Run box (Alt+F2): qtconfig -> Font tab
      • Default Font
        • Family: [b]DejaVu Sans
        • Style: Normal
        • Point Size: 9
      • Font substitution
        • Family: Verdana (may be several Verdana entries, one at the bottom in lower case)
        • Substitutes in order:
          • DejaVu Sans
          • Kochi Gothic
          • Sazanami Gothic
      • File -> Save
    • Backup any potentially preexisting ~/.fonts.conf file and replace the contents with the following. Use any text editor; kate, kwrite, gedit, mousepad, etc.

    Code:
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    
    <fontconfig>
    	<alias>
    		<family>serif</family>
    		<prefer>
    			<family>Times New Roman</family>
    			<family>DejaVu Serif</family>
    			<family>Kochi Mincho</family>
    			<family>Sazanami Mincho</family>
    		</prefer>
    	</alias>
    	<alias>
    		<family>sans-serif</family>
    		<prefer>
    			<family>DejaVu Sans</family>
    			<family>Kochi Gothic</family>
    			<family>Sazanami Gothic</family>
    		</prefer>
    	</alias>
    	<alias>
    		<family>monospace</family>
    		<prefer>
    			<!-- <family>Courier New</family> -->
    			<family>DejaVu Sans Mono</family>
    			<family>Kochi Gothic</family>
    			<family>Sazanami Gothic</family>
    		</prefer>
    	</alias>
    
    	<match target="font" >
    		<edit mode="assign" name="embeddedbitmap">
    			<bool>true</bool>
    		</edit>
    	</match>
    
    	<match target="font" >
    		<edit mode="assign" name="rgba">
    			<const>rgb</const>
    		</edit>
    	</match>
    
        <match target="font" >
            <edit mode="assign" name="autohint">
                <bool>false</bool>
            </edit>
        </match>
    
    	<match target="font" >
    		<edit mode="assign" name="hinting">
    			<bool>true</bool>
    		</edit>
    	</match>
    
    	<match target="font" >
    		<edit mode="assign" name="hintstyle">
    			<const>hintfull</const>
    		</edit>
    	</match>
    
    	<match target="font" >
    		<edit mode="assign" name="antialias">
    			<bool>true</bool>
    		</edit>
    	</match>
    
    	<!-- Disable autohint for bold fonts
    	<match target="font">
    		<test name="weight" compare="more">
    			<const>medium</const>
    		</test>
    		<edit name="autohint" mode="assign">
    			<bool>false</bool>
    		</edit>
    	</match> -->
    
    	<!-- Font Replacement -->
    	<match target="pattern" name="family" >
    		<test name="family" qual="any" >
    			<string>Verdana</string>
    		</test>
    		<edit mode="assign" name="family" >
    			<string>DejaVu Sans</string>
    		</edit>
    	</match>
    	<match target="pattern" name="family" >
    		<test name="family" qual="any" >
    			<string>Helvetica</string>
    		</test>
    		<edit mode="assign" name="family" >
    			<string>DejaVu Sans</string>
    		</edit>
    	</match>
    	<match target="pattern" name="family" >
    		<test name="family" qual="any" >
    			<string>Lucida Grande</string>
    		</test>
    		<edit mode="assign" name="family" >
    			<string>DejaVu Sans</string>
    		</edit>
    	</match>
    
    	<!-- Location of local fonts 
    	<dir>~/.fonts</dir> -->
    
    </fontconfig>
    • Terminal: $ sudo fc-cache -fv (for good measure)
    • Log out and back in to apply all changes so far
    • Open up a new Firefox and note changes. Make sure that the default font is set to Serif, in Preferences -> Content -> Default font
    • Head over to http://ramonantonio.net/kde-firefox/ and install the KDE4 Firefox 3 theme; takes care of most graphical glitches.


    If you get it right, GTK apps should look virtually identical to Qt4 apps. If you don't like the looks, experiment with the font order, particularly in ~/.fonts.conf (for GTK programs). Perhaps you like Arial more than DejaVu Sans as the top priority font for sans, etc. Just keep it consistent, with the same fonts defined in ~/.fonts.conf as in System Settings and qtconfig. You needn't log out and back in to have the changes take effect; just close all Firefox windows and start it up again. (Just needed to do it once there at the end to have GTK Styles etc sink in.)
    KDE, I heart thee.

    Comment


      #3
      Re: Font settings in Kubuntu 8.10

      Hi Zorael,

      Thanks for taking the time to walk me through this setup.

      I will try asap.

      I already configured the Antialiased bit and seem to see some difference.

      I will report back when the whole setup is complete.

      Comment


        #4
        Re: Font settings in Kubuntu 8.10

        Ok, I have used your suggestion and its a big improvement.

        The question is: should this be necessary?

        K/Ubuntu is marketed as out-of an the-box linux solution, but with the quality of the fonts, I think many people will turn away. Nobody wants to look at something ugly, even if its free.

        Comment


          #5
          Re: Font settings in Kubuntu 8.10

          That's a very custom setup that I worked my way towards with trial and error, mostly in pursuit of getting nice Japanese fonts with great help from ryukent. The problem still lies in Firefox not being based on the same window framework as KDE itself is, KDE being Qt4 and Firefox GTK; GNOME's framework. There is a project to port Firefox to Qt though it's supposedly in the stages of "starts, menus work, severe graphical errors", etc. While hardly being the industry de-facto standard, the KDE bundle still comes with Konqueror as its "own" browser.

          You could make an argument that Kubuntu should supply a .fonts.conf file in its default settings package (kubuntu-default-settings), I guess. If you ever plan to wipe your home directory, make a backup of it to speed things up afterwards. :3
          KDE, I heart thee.

          Comment


            #6
            Re: Font settings in Kubuntu 8.10

            Okay, when people say that fonts in Kubuntu are ugly, they generally mean in comparison to Windows.

            You can overcome that by doing the following (all within system settings/appearance):

            Installing some of the windows fonts (or something approaching them). For example, my default font for Kubuntu is Arial.

            You can tell the system to anti-alias fonts

            Force it to display them at 96dpi. That single thing will make a dramatic difference in how things look.

            Ian

            Comment


              #7
              Re: Font settings in Kubuntu 8.10

              Hi

              Today I upgraded my kubuntu to Jaunty, since the upgradation I'm not able to see the "GTK Styles and Fonts" in System Settings -> Appearance -> GTK Styles and Fonts, not able to access kcontrol.

              Does it option changed to somewhere or did I missed anything?

              Thanks
              Fenzik

              Comment

              Working...
              X