nanogui: Fonts revisited


Previous by date: 19 Jan 2000 12:07:30 -0000 Re: Using create structures., Greg Haerr
Next by date: 19 Jan 2000 12:07:30 -0000 Re: Fonts revisited, Vidar Hokstad
Previous in thread:
Next in thread: 19 Jan 2000 12:07:30 -0000 Re: Fonts revisited, Vidar Hokstad

Subject: Fonts revisited
From: "Vidar Hokstad" ####@####.####
Date: 19 Jan 2000 12:07:30 -0000
Message-Id: <20000119120830.21932.qmail@mail.relight.com>

I've started hacking support for T1lib into MicroWindows/Nano-X now.

First and foremost, my reason for ending up with T1lib instead of Freetype 
is:

  - FreeType may have patent problems (ref: www.freetype.org)
  - When searching for fonts, I found tons of redistributable (as part of
     a commercial package) Type1 fonts, but mostly highly restricted Truetype
     fonts (free for personal use only, etc.), and the few really free Truetype
     fonts I found were fonts intended for logo design - that is, no "classic"
     fonts...
  - T1lib supports ligatures and proper kerning directly.

However, I encountered a problem:

The low level screen device font functions has a *way* to constrained interface
to do proper text handling.

Some of the problems include:

    - GetTextBits() doesn't support returning ascent or descent values.
    - No support (or easy way of faking) kerning or ligatures.
    - No support for drawing multiple characters at a time for font renderers
       that support it.
    - No easy way of adding features like anti-aliasing.
    - GdText() is constrained to narrow fonts (less than 16 pixels wide?)
    - No support for requesting font widths for scalable fonts.

Possible solution:

I suggest to add two calls modelled after GdText() and GdTextSize() to the
screen driver, and only use the generic GdText() and GdTextSize() for bitmap
fonts...

At the same time, being able to set a flag to determine whether or not you
want antialiasing *if provided* by the font renderer would be nice :-) It
is trivial to implement basic antialiasing with T1lib (allthough it will
probably be slow ;)

It would be nice to support setting other flags too, like requested font size,
slanting, modes (italics, bold, underline, overline, strikethrough). Whether or
not the renderer or font supports the misc. modes could be indicated via
a query functions (which will *not* be something I write until I've got the
actual rendering with T1lib working).

I'm ready to write it, including an implementation that uses T1lib instead
of bitmap fonts, but I'd like some feedback first ;) I'll provide compile
time options to turn all of the T1lib support off, of course.

Any suggestions?

Regards,
Vidar Hokstad
Screen Media

Previous by date: 19 Jan 2000 12:07:30 -0000 Re: Using create structures., Greg Haerr
Next by date: 19 Jan 2000 12:07:30 -0000 Re: Fonts revisited, Vidar Hokstad
Previous in thread:
Next in thread: 19 Jan 2000 12:07:30 -0000 Re: Fonts revisited, Vidar Hokstad


Powered by ezmlm-browse 0.20.