Slashdot Mirror


Prettier Fonts in X?

routecoder asks: "X11 is great, but one of its significant disadvantages is its treatment of fonts. Netscape in X11 is frankly ugly, fonts are chunky, they scale poorly making some sites are hard to read. Are there any good tools available to make X prettier? If not, what would it take to build more asthetically pleasing font support?" This has always been one of the largest complaints about X11 that I've heard from many Microsoft supporters. Is XFree86 v4 going to address any of these issues? How substantial would changes need to be to make font support in X comparable to or better than that which is in Windows.

24 comments

  1. TrueType Fonts by Anonymous Coward · · Score: 1
    Some Linux distributions (eg. Red Hat) already include support for TrueType fonts, though it's not well documented (Try "xset fp+ /path/to/truetype/fonts", I think this will work). If TrueType fonts aren't supported, you can download xfstt (try searching FreshMeat.net) or FreeType (www.freetype.org) which will allow you to use these fonts. I added my Windows font directory to the fontpath, now I can use TrueType fonts under Netscape (or any X11 app).

    I think TrueType font support will be included in XFree86 4.0, along with anti-aliasing support.

    1. Re:TrueType Fonts by Anonymous Coward · · Score: 0

      Here is some more information about setting up TrueType fonts on Red Hat.

    2. Re:TrueType Fonts by Kyobu · · Score: 1

      I am a happy user of xfstt, but unfortunately WordPerfect needs Type 1 fonts. I know about ttf2pt1, but it won't compile, and the only binaries I can find are so old they don't have Type 1 support, only Type 3. Can anyone help me on this?

      --
      Switch the . and the @ to email me.
    3. Re:TrueType Fonts by YellowBook · · Score: 1

      Try this patch:

      *** t1asm.c Sun May 23 13:36:48 1999
      --- t1asm.c.new Tue Sep 14 11:10:11 1999
      ***************
      *** 85,92 ****
      typedef unsigned char byte;

      /* must be visible from outside */
      ! FILE *ifp = stdin;
      ! FILE *ofp = stdout;

      /* flags */
      static int pfb = 0;
      --- 85,92 ----
      typedef unsigned char byte;

      /* must be visible from outside */
      ! FILE *ifp; /* = stdin; */
      ! FILE *ofp; /* = stdout; */

      /* flags */
      static int pfb = 0;


      --
      The scalloped tatters of the King in Yellow must cover
      Yhtill forever. (R. W. Chambers, the King in Yellow)

      --
      The scalloped tatters of the King in Yellow must cover
      Yhtill forever. (R. W. Chambers, the King in Yellow
  2. tried xfstt? by Elvii · · Score: 1

    After a fun day programming radios (what? They're not working? no wonder... erm, they're programmable, yes.. WHAT!! WHO changed all the channels to different frequencies?? Where's the book to reprogram them?!?! etc, end rant. ) I decided to see if xfstt's true type fonts could help x look better... still in the process oif installing it, but apt-get install xfstt makes life a lot easier after a unfun day..

    erm, try xfstt. then you can use truetype fonts... I assume you've not tried that yet.

    Sorry for the rant, long day. :)

    p.s. How long has the "Post Anonymously" checkbox been there?

    --
    This sig left intentionally blank.
  3. Microsoft true type fonts by Anonymous Coward · · Score: 1

    I know you can download MS's ttf fontpack from http://www.microsoft.com/typography/fontpack/defau lt.htm, but how do I install the fonts from the .exes under GNU/Linux? They're not self extracting zip files, and wine doesn't cooperate with them. Any hints?

    1. Re:Microsoft true type fonts by Firefalcon · · Score: 2

      Rather than download a self-extracting exe, you can FTP and get loads in .ttf or .fon format. See http://ftpsearch.lycos.com/ and search for "Fonts".

      I downloaded 1,500 fonts from somewhere on that list (I think that was my search term...)

    2. Re:Microsoft true type fonts by Firefalcon · · Score: 2

      I've just been point to a URL by a friend:
      http://www.fontfreak.com
      It has fonts in .zip format, but none of them is fonts found as standard in Windows. Maybe a friend running windows could extract it for you?

    3. Re:Microsoft true type fonts by blue · · Score: 1

      I'm M2'ing and since you're an AC you might not see this, but if it's the 16-bit EXEs you can actually use 'unzip' to do the trick (you know, the free Info-Zip one). Hope that helps, if you're still reading...

  4. URW fonts by yorkie · · Score: 1

    Try downloading the URW fonts - there's a link somewhere on the Gimp website. These fonts are a scalable set of the common Postscript fonts.

    Another common problem is that some X configurations have FontPath references to the 75 and 100 dpi directories without the unscaled keyword, typically at the end of the list of fontpaths. This leads to X scaling any 75 or 100 dpi font to fit if an exact match or scalable font is not found. Commenting out these lines should prevent this from happening. Netscape uses some odd sizes for the Times Roman font which doesn't help.

    It may be a good idea to install the Gnome font viewer, part of the Gnome utilities. This will inidicate which fonts are currently installed, and if they are scaled or exact size matches.

  5. Warning on installing fonts for Mandrake by Paul+Carver · · Score: 1

    Be careful if you install True Type fonts for Mandrake (and probably Red Hat 6.0 too). I found detailed step-by-step instructions for font installation that basically disabled my computer. There are programs ttmkfdir and makefontdir (or something similar) which you need to run to add fonts. When I added new fonts and ran them according to the instructions they gave no error messages and seemed to work correctly. When I restarted X the font server crashed. Since Mandrake is configured to get all fonts from the font server this caused the X server to go into a continuous crashing loop. If this happens to you you will need to boot into runlevel 3 or telnet in from another machine and put the old fontdir file back.

    It certainly hasn't reached the drag-n-drop simplicity of Windows just yet.

    1. Re:Warning on installing fonts for Mandrake by pOrATa+paTima · · Score: 1

      It happened to me. The reason was that the complete path for the font directory was wrong in the XF86Config file. They are working great after I fixed the path

  6. Fantastic Mini-How-To by Ratface · · Score: 1
    Here:

    http://www.sfu.ca/~yzhang/linux /truetype/index.html

    This got me up and running with True Type Fonts in no time at all.

    Also, for a great source of more "way out" TTF's take a look at http://www.acidcool.com

    --

    A little planning goes a long way...
    1. Re:Fantastic Mini-How-To by dlc · · Score: 1

      This site was fantastic for TTF info. Thanks!

      --
      (darren)
  7. Antialiasing idea by divbyzero · · Score: 2

    In an email conversation which followed the last Slashdot discussion about adding antialiased font support to X, I came up with the following [probably unoriginal] idea:

    Why not create a hand-antialiased font by building it up out of multiple standard monochrome BDF fonts, which you overlay in the same location using different colors (greys)?

    For instance, to get a simple antialiased "a":

    BDF 1, drawn with color black:

    . # # # .
    . . . . #
    . # # . #
    # . . # .
    . # # . #

    BDF 2, drawn with color 50% grey:

    # . . . #
    . . . . .
    # . . # .
    . . . . #
    # . . # .

    The combined output:

    x # # # x
    . . . . #
    x # # x #
    # . . # x
    x # # x #

    The advantage of this is that it can be done entirely with the existing font drawing mechanism (just invoked multiple times).

    Think this'll fly?
    Div.


    But my grandest creation, as history will tell,
    --
    But my grandest creation, as history will tell,
    Was Firefrorefiddle, the Fiend of the Fell.
    1. Re:Antialiasing idea by Anonymous Coward · · Score: 0

      It should. However, this is better fixed in the font server, I think. After all, the high-end catalog layout systems use this approach. They usually use Display Post-Script as a seperate process for real-time antialiasing. Better performance, better quality. Compare a MSWord document and a nice anti-aliased PostScript® document. Huge difference. I don't think TTF are the best way to go. Esp with the legal issues with TTFs. I remember seeing something about Display Postscript in X on the gnustep page. http://www.gnustep.org You might look them up and see if anything is ready. I know the NextStep platform had this built in and so does Solaris and AIX.

    2. Re:Antialiasing idea by Anonymous Coward · · Score: 0

      > Think this'll fly?

      Hmm, replace the 50% Gray with 50% transparent/50% black (like an alpha channel) and it will even work on patterned backgrounds. A little more work rendering the text, tho. -Rollo, posting from home

  8. Another option by Anonymous Coward · · Score: 0

    You might want to just convert the truetype fonts to type 1.

    http://quadrant.netspace.net.au/ttf2pt1/

  9. Some helpfull sites by Anonymous Coward · · Score: 1

    here are some sites that I have found helpfull:
    XFree86 Font Deuglification Mini HOW-TO
    The Redhat White Paper explaining the font system in rh6.0

    ...thats all I can remember right now, the redhat page gives good instructions on getting ttf fonts setup under rh6.0
    good luck

  10. What about Postscript? by Anonymous Coward · · Score: 0

    All these messages about TrueType fonts, but what about Postscript fonts? I got a whole bunch of nice Type 1 fonts on my Corel 3 CD. How do I make use of them under Linux?

  11. Type1 Fonts HOWTO by Anonymous Coward · · Score: 0

    Here are step-by-step instructions on how to 'install' type1 ('PostScript') fonts for use with X (and GhostScript, as well...).
    You need a package called type1inst (get it from you favorite distro/ftp site).

    1. You have to be root to perform all of these actions.

    2. Install type1inst.

    3. Make a directory in which to put the fonts:

      mkdirhier /usr/local/share/fonts/corel

      (you are free to choose a decent name :-)).

    4. cd to the directory:

      cd /usr/local/share/fonts/corel

    5. to generate the fonts.dir for X and Fontmap for GhostScript do:

      type1inst

    6. if you want to use the fonts with GhostScript you need to append the newly generated Fontmap to you global Fontmap file. Supposing the global Fontmap file is /etc/gs.Fontmap do:

      cat /usr/local/share/fonts/corel/Fontmap >> /etc/gs.Fontmap

      (note the double '>' sign. Using a single '>' would overwrite the old /etc/gs.Fontmap file!).
      You may as well use a text editor to do the job.

    7. now edit /etc/X11/XF86Config. Find the lines with "FontPath" in them, then add the line with your newly created font dir:

      FontPath "/usr/local/share/fonts/corel"

    8. if you want to be able to see the fonts without restarting X, do:

      xset fp+ /usr/local/share/fonts/corel
      xset fp rehash



    Now squeeze the hell out of the GIMP logo scripts!


    Debian: pure GNU. Pure thrill.


    -- bond (bondnumerica.it)
  12. Scaled and unscaled instances of fonts by Anonymous Coward · · Score: 1

    Regarding the scaled bitmap fonts stuff:
    the correct order for the FontPaths in /etc/X11/XF86Config is the following:
    1. All the unscaled pixmap fonts (e.g. FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"

    2. All the scalable fonts (e.g. FontPath "/usr/X11R6/lib/X11/fonts/Type1/")

    3. All the scaled instances of the pixmap fonts (e.g. FontPath "/usr/X11R6/lib/X11/fonts/75dpi/")

    Why this?

    Because this way X serves the the unscaled font first (which is faster than the scalable one), but only if the exact size required is available.

    Else, X looks for the scalable font of the same name and serves it.

    BUT, if the scalable font can't be found and there is a bitmap font with the right name and not the right size, then X scales the bitmap font of the closest size to the one requested and serves it.

    Il's always better than a blank window! ;-)


    -- bond (bond-AT-numerica.it)

  13. A Possible Solution by Peale · · Score: 1

    Somtimes compress executable archives can be unzipped using the zip command. Try: unzip filename.exe and see what happens.

    I'm sorry. What I meant to say was 'please excuse me.'
    what came out of my mouth was 'Move or I'll kill you!'

  14. X11 is not at fault by Anonymous Coward · · Score: 0
    I should like to point out that X11 has nothing to do with the way fonts look in XFree86. XFree is just one implementation of the X11 protocol. X11 and the X Font Server protocol fully support antialiased fonts, scaled fonts, bidirectional fonts, etc. However, they don't require them. Much like other enhanced X features such as backing store, antialiasing of fonts is possible with X but not implemented in XFree86, which happens to be the most common X server in the Linux world.

    I am tired of people knocking X because of XFree86's performance! X is an excellent protocol, and it supports A Lot More Than You Think(tm) ... But it doesn't require all that it supports, in order to support lower-end machines; therefore some X servers, such as XFree, don't make X look as good as it really is. Don't get me wrong, I'm not knocking XFree--but since they have to spend all their time supporting new video cards, they can't really make an X server as good as, say, HP's.