Sharp fonts for Fedora How-To?

Discussion in 'HOWTO-Related Questions' started by markg85, Apr 7, 2007.

  1. markg85

    markg85 New Member

    Hey,

    i just saw the how to fir the sharp fonts on ubuntu but it doesn`t really work on fedora.. i`m getting close though.
    the only problem i still have is that the fonts are looking good and sharp in the windows but text that is being displayed isn`t looking good at all.

    with some parts it looks like they are still aliased..

    i hope you (falko?) can make the tutorial for fedora as well.
    thanx in favor.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    In which applications? This works only with GNOME applications.
     
  3. markg85

    markg85 New Member

    does firefox count as a gnome application ;)
    but gnome itself is also not looking the same like in your screenshots.. so a howto for fedora would be nice.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    No, Firefox is no GNOME application. The same goes for OpenOffice and lots of other applications. :(
     
  5. markg85

    markg85 New Member

    sorry.. i thought you meant the language that gnome was written in.
    however i`ve meda a little progress in the fonts. it turns out that the fonts are getting ugly when i use: "Subpixel smoothing (LCDs)" and are looking better when i use: ""Best shapes" and i do have a LCD monitor!!

    but i have no idea how to do those font hints that you describe in the howto.. that doesn`t work the same in fedora as in Ubuntu.. same with the fonts.conf file.. i can`t even adjust it because X won`t start when i do adjust it.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    X doesn't start when you modify ~/.fonts.conf? Maybe there's a syntax error in your file?
     
  7. markg85

    markg85 New Member

    yea.. and the file had the exact same contents as in your howto.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Strange... :confused:
     
  9. markg85

    markg85 New Member

    i now have it all in a good looking way. i didn`t even used the fonts config stuff.
    this is what i did:

    1. install ALL microsofts fonts
    2. go to gnome`s font preferences and ONLY change the fonts.. no other changes at all. so only change all fonts to Tomoha and your done

    i also "tweaked" firefox.
    here is how you can get good looking fonts in firefox:
    1. boot in windows, start Firefox, open the preferences, open all the font settings and make a screenshot of it.
    2. send the screenshot to your mail (unless you can mount your drive)
    3. boot in linux
    4. enter the exact same font settings of that screenshot in linux.

    i now have normal looking fonts.. it all seems to be a little fatter than windows but that`s probably just the way fedora/linux renders fonts.

    now i would like to know how i can apply this in fedora:
    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
    
    and how i can apply this:
    Code:
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
    
    <!-- Give all fonts light hinting and subpixel smoothing -->
    <!--
    <match target="font">
        <edit mode="assign" name="rgba">
            <const>rgb</const>
        </edit>
        <edit mode="assign" name="hinting">
            <bool>true</bool>
        </edit>
        <edit mode="assign" name="hintstyle">
            <const>hintslight</const>
        </edit>
        <edit mode="assign" name="antialias">
            <bool>true</bool>
        </edit>
    </match>
    -->
    
    <!--
         <match target="font">
            <test qual="all" name="rgba"><const>unknown</const></test>
               <edit name="rgba" mode="assign"><const>rgb</const></edit>
         </match>
    -->
    
    <!--  Do not smooth Fixedsys  -->
    <match target="font">
        <test name="family">
            <string>FixedsysTTF</string>
        </test>
        <edit name="antialias">
            <bool>false</bool>
        </edit>
    </match>
    
    <!--  Do not smooth Tahoma 8pt and under  -->
    <match target="font">
        <test name="family">
            <string>Tahoma</string>
        </test>
        <test compare="less" name="size" qual="any">
            <double>9</double>
        </test>
        <edit name="antialias">
            <bool>false</bool>
        </edit>
    </match>
    
    <!--  Do not smooth Times New Roman or Courier New for 12pt and under  -->
    <match target="font">
        <test name="family">
            <string>Times New Roman</string>
        </test>
        <test compare="less" name="size" qual="any">
            <double>13</double>
        </test>
        <edit name="antialias">
            <bool>false</bool>
        </edit>
    </match>
    
    <match target="font">
        <test name="family">
            <string>Courier</string>
            <string>Courier New</string>
            <string>Courier 10 Pitch</string>
        </test>
        <test compare="less" name="size" qual="any">
            <double>11</double>
        </test>
        <edit name="antialias">
            <bool>false</bool>
        </edit>
    </match>
    
    <!-- Do not autohint Courier New, Fixedsys, Tahoma, or Times New Roman -->
    <match target="font">
        <test name="family">
            <string>Courier New</string>
            <string>Times New Roman</string>
            <string>Tahoma</string>
            <string>FixedsysTTF</string>
        </test>
        <edit mode="assign" name="hintstyle">
            <const>hintslight</const>
        </edit>
        <edit mode="assign" name="autohint">
            <bool>false</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>
    
    EDIT:://
    the fonts.conf edits belong in /etc/fonts/local.conf on fedora.
    i`m now having "sharp" fonts though i still have aliased fonts in firefox!!

    the sharp fonts look good in most parts but less good in tabs and address bars..
    look:
    [​IMG]
     
    Last edited: Apr 11, 2007
  10. sardaukar

    sardaukar New Member

    A more general note?

    Hello!

    Your guide rocks, but alas it is too Tahoma-centric. Can one create the hinting files for other fonts? I rather like the default Gnome font, but I would like to see it sharper too.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Why don't you just replace "Tahoma" with the font you'd like to use in the tutorial?
     
  12. sardaukar

    sardaukar New Member

    I don't know if the hinting metrics are the same. Are they?
     
  13. falko

    falko Super Moderator Howtoforge Staff

    I don't know. Just try it out.
     

Share This Page