Page 1 of 18 12311 ... LastLast
Results 1 to 10 of 179

Thread: HOWTO: Hoary ClearType-like fonts

  1. #1
    Join Date
    Mar 2005
    Location
    Detroit, MI, USA
    Beans
    9

    HOWTO: Hoary ClearType-like fonts

    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
    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
    sudo gedit /etc/X11/xorg.conf
    Locate Section "Monitor" and add the following lines before EndSection:
    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
    Uncomment the line corresponding to your current resolution.

    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:
    Code:
    xdpyinfo | grep dimensions
    xdpyinfo | grep resolution
    If the resolution is not 96x96 dots per inch slightly adjust the DisplaySize values until correct.

    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.
    Code:
    sudo mkdir /usr/share/fonts/truetype/custom
    Copy tahomabd.ttf and tahoma.ttf into /usr/share/fonts/truetype/custom/
    Create Tahoma hints:
    Code:
    sudo gedit /etc/defoma/hints/custom.hints
    Paste this:
    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
    Register Tahoma:
    Code:
    sudo /usr/bin/defoma-font -v register-all /etc/defoma/hints/custom.hints
    Step 3. Configure system-wide fontconfig rendering method
    Code:
    sudo dpkg-reconfigure fontconfig
    Select Bytecode interpreter or Subpixel rendering

    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.
    Code:
    gedit ~/.fonts.conf
    Paste this:
    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>
    Log out of Gnome and log back in.

    Step 6. OPTIONAL - Configure GTK1 applications to use Tahoma
    Code:
    gedit ~/.gtkrc.mine
    Paste this:
    Code:
    style "user-font"
    {
      fontset="-microsoft-tahoma-medium-r-normal-*-10-*-*-*-p-*-*"
    }
    widget_class "*" style "user-font"
    Substitute with Verdana or other font as desired.

    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>
    Last edited by deelerious; March 20th, 2005 at 07:00 AM. Reason: Shortened intro blurb

  2. #2
    Join Date
    Mar 2005
    Location
    Detroit, MI, USA
    Beans
    9

    Re: HOWTO: Hoary ClearType-like fonts

    I reached the limit of screenshots in the original post, so here is another comparison to Windows, this time with antialias turned off. Using the same steps and the .fonts.conf in the end note.

    Windows:


    Hoary:

  3. #3
    Join Date
    Oct 2004
    Beans
    165

    Re: HOWTO: Hoary ClearType-like fonts

    Great Howto! What I've been doing until now is just disable antialiasing for all fonts smaller than a certain size. I use Tahoma 8 as app. font so it looks exactly like windows. In firefox it works perfectly because it looks like in windows (I'm used to it ).
    The only problem is that some apps will still use antialiased fonts (like Openoffice) so they become unreadable. I'd have to set a higher font size as the "antialiasing limit", which will turn off AA in some big font sizes depending on the application.
    It's as if not the size of fonts wasn't the same for all applications.

    Is the same problem present with your method? I guess I can disable AA for Tahoma in all its sizes and turn it off on the other fonts for small font sizes...
    Last edited by Julius; March 21st, 2005 at 12:26 PM.

  4. #4
    Join Date
    Nov 2004
    Location
    Sundsvall, Sweden
    Beans
    98

    Re: HOWTO: Hoary ClearType-like fonts

    Are you guys crazy? Why don't you install windows instead? Who would want their ubuntu installation to look like windows?

    I think ubuntu works GREAT as it is (read my signature).
    Last edited by basse1989; March 20th, 2005 at 10:42 PM.
    I love my ubuntu.

  5. #5
    Join Date
    Dec 2004
    Location
    Braga-Portugal
    Beans
    251

    Re: HOWTO: Hoary ClearType-like fonts

    Just one question... can i do this for a different resolution? I'm currently using 1280x800 with an ATI driver.
    Linux user #383892

    (\ /)
    (O.o)
    (> <)

    This is Bunny. Copy Bunny into your signature to help him on his way to world domination.

  6. #6
    Join Date
    Oct 2004
    Beans
    165

    Re: HOWTO: Hoary ClearType-like fonts

    Quote Originally Posted by basse1989
    Are you guys crazy? Why don't you install windows instead? Who would want their ubuntu installation to look like windows?

    I think ubuntu works GREAT as it is (read my signature).
    I've been using the same fonts for the past 13 years or something, so that's why I want my fonts to look the same. I like Linux, and I think Linux fonts are more 'powerful' than TrueType. THe thing is that most of websites have been designed using true type fonts, so many of them would look really ugly. If there's a way to make them look the same as they do in other operative systems, why not?

  7. #7
    Join Date
    Mar 2005
    Location
    Detroit, MI, USA
    Beans
    9

    Re: HOWTO: Hoary ClearType-like fonts

    Quote Originally Posted by Julius
    The only problem is that some apps will still use antialiased fonts (like Openoffice) so they become unreadable. I'd have to set a higher font size as the "antialiasing limit", which will turn off AA in some big font sizes depending on the application.
    It's as if not the size of fonts wasn't the same for all applications.

    Is the same problem present with your method? I guess I can disable AA for Tahoma in all its sizes and turn it off on the other fonts for small font sizes...
    For OpenOffice, see the post at the bottom of this page.

  8. #8
    Join Date
    Mar 2005
    Location
    Detroit, MI, USA
    Beans
    9

    Re: HOWTO: Hoary ClearType-like fonts

    Quote Originally Posted by telmo
    Just one question... can i do this for a different resolution? I'm currently using 1280x800 with an ATI driver.
    To get other values, use the following formula:
    displaysize = <pixelsize>/96*25.4

    In your case:
    1280/96*25.4 = approx 338
    800/96*25.4 = approx 211

    So, in xorg.conf use this:
    DisplaySize 338 211 # 1280x800 96dpi

    After restarting X, use xdpyinfo | grep resolution as shown above to make sure the dpi is 96 and, if needed, tweak the displaysize values until you get 96x96.

  9. #9
    Join Date
    Feb 2005
    Beans
    Hidden!

    Re: HOWTO: Hoary ClearType-like fonts

    Wicked, awsome .

  10. #10
    Join Date
    Mar 2005
    Location
    Spain
    Beans
    39

    Re: HOWTO: Hoary ClearType-like fonts

    Can I get this with Warty? I'm having problems with my resolution and with fonts.

    Is a good idea migrating to Hoary?

Page 1 of 18 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •