TrueType/scalable fonts in X... - Xwindows

This is a discussion on TrueType/scalable fonts in X... - Xwindows ; How do I use scalable fonts in X? I've been playing with XLoadQueryFont() all day and it just fails if I don't provide a size that it likes. XListFonts() lists a set of sizes for each font as if they're ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: TrueType/scalable fonts in X...

  1. TrueType/scalable fonts in X...

    How do I use scalable fonts in X?

    I've been playing with XLoadQueryFont() all day
    and it just fails if I don't provide a size that
    it likes.

    XListFonts() lists a set of sizes for each font
    as if they're the only available sizes. Is that
    true?

    Some of the fonts are listed with size of "0".
    What's that all about? Are these the scalable
    fonts?


    --
    <\___/>
    / O O \
    \_____/ FTB. For email, remove my socks.

    In science it often happens that scientists say, 'You know
    that's a really good argument; my position is mistaken,'
    and then they actually change their minds and you never
    hear that old view from them again. They really do it.
    It doesn't happen as often as it should, because scientists
    are human and change is sometimes painful. But it happens
    every day. I cannot recall the last time something like
    that happened in politics or religion.

    - Carl Sagan, 1987 CSICOP keynote address


  2. Re: TrueType/scalable fonts in X...

    fungus wrote:
    > How do I use scalable fonts in X?
    >
    > I've been playing with XLoadQueryFont() all day
    > and it just fails if I don't provide a size that
    > it likes.
    >
    > XListFonts() lists a set of sizes for each font
    > as if they're the only available sizes. Is that
    > true?
    >
    > Some of the fonts are listed with size of "0".
    > What's that all about? Are these the scalable
    > fonts?


    Read the section "Finding Scalable Fonts":

    http://www.ac3.edu.au/SGI_Developer/...ml#S1-1002-A-3

  3. Re: TrueType/scalable fonts in X...

    Russell Shaw wrote:
    > fungus wrote:
    >> How do I use scalable fonts in X?
    >>

    >
    > Read the section "Finding Scalable Fonts":
    >
    > http://www.ac3.edu.au/SGI_Developer/...ml#S1-1002-A-3
    >


    Yes, I figured it out. You have to be a lot more
    specific in the font name - no wildcards.

    Thanks!


    --
    <\___/>
    / O O \
    \_____/ FTB. For email, remove my socks.

    In science it often happens that scientists say, 'You know
    that's a really good argument; my position is mistaken,'
    and then they actually change their minds and you never
    hear that old view from them again. They really do it.
    It doesn't happen as often as it should, because scientists
    are human and change is sometimes painful. But it happens
    every day. I cannot recall the last time something like
    that happened in politics or religion.

    - Carl Sagan, 1987 CSICOP keynote address


  4. Re: TrueType/scalable fonts in X...

    fungus writes in comp.windows.x:
    |How do I use scalable fonts in X?
    |
    |I've been playing with XLoadQueryFont() all day
    |and it just fails if I don't provide a size that
    |it likes.

    You might find the Xft & fontconfig API's are a bit easier to manage -
    they're what most new apps use these days when doing direct fonts.
    (Most real apps use a higher level toolkit like Qt or GTK that hides
    all these details from the app behind higher level API's.)

    --
    Alan Coopersmith * alanc@alum.calberkeley.org * Alan.Coopersmith@Sun.COM
    http://blogs.sun.com/alanc/ * http://people.freedesktop.org/~alanc/
    http://del.icio.us/alanc/ * http://www.csua.berkeley.edu/~alanc/
    Working for, but definitely not speaking for, Sun Microsystems, Inc.

  5. Re: TrueType/scalable fonts in X...

    Alan Coopersmith wrote:
    > fungus writes in comp.windows.x:
    > |How do I use scalable fonts in X?
    > |
    > |I've been playing with XLoadQueryFont() all day
    > |and it just fails if I don't provide a size that
    > |it likes.


    > You might find the Xft & fontconfig API's are a bit easier to manage -
    > they're what most new apps use these days when doing direct fonts.
    > (Most real apps use a higher level toolkit like Qt or GTK that hides
    > all these details from the app behind higher level API's.)


    One advantage of the older APIs is that they have something that
    resembles documentation. That's not true of Xft, etc.

    (we could also digress over the lack of stable interfaces in Xft ;-)

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  6. Re: TrueType/scalable fonts in X...

    Thomas Dickey wrote:
    > Alan Coopersmith wrote:
    >
    >>fungus writes in comp.windows.x:
    >>|How do I use scalable fonts in X?
    >>|
    >>|I've been playing with XLoadQueryFont() all day
    >>|and it just fails if I don't provide a size that
    >>|it likes.

    >
    >>You might find the Xft & fontconfig API's are a bit easier to manage -
    >>they're what most new apps use these days when doing direct fonts.
    >>(Most real apps use a higher level toolkit like Qt or GTK that hides
    >> all these details from the app behind higher level API's.)

    >
    > One advantage of the older APIs is that they have something that
    > resembles documentation. That's not true of Xft, etc.
    >
    > (we could also digress over the lack of stable interfaces in Xft ;-)


    STSF (http://stsf.sourceforge.net/about.html) has been unmaintained for a couple
    of years, but is being resurrected with a recent patch or two. It does server-side
    rendering and unicode.

    http://developers.sun.com/dev/gadc/t...iuc22-stsf.pdf

    Another way is to manually use freetype2 and Xrender.

+ Reply to Thread