nanogui: Fonts revisited


Previous by date: 19 Jan 2000 13:06:11 -0000 Re: Fonts revisited, Vidar Hokstad
Next by date: 19 Jan 2000 13:06:11 -0000 Newbie problems, Manuel Teira Paz
Previous in thread: 19 Jan 2000 13:06:11 -0000 Re: Fonts revisited, Vidar Hokstad
Next in thread: 19 Jan 2000 13:06:11 -0000 Re: Fonts revisited, Vidar Hokstad

Subject: Re: Fonts revisited
From: Martin Jolicoeur ####@####.####
Date: 19 Jan 2000 13:06:11 -0000
Message-Id: <3885B485.7B6F61E7@visuaide.com>

Vidar Hokstad wrote:

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

I started looking at fonts too :-) (I'm full-time on this) But started to think
about freetype rather than t1lib mostly because:

- I wasn't correct in my previous E-mail saying that t1lib is smaller than
freetype, actually t1lib is ~360k and freetype is ~270k (these values are for libs
compiled with debugging symbols in, though)

- Freetype was coded mainly for embedded systems, so the code is as fast as
possible (it doesn't use floating point calculations, which is important for
processors without fpu, like  SA1100)

- Freetype 2 (which is beta but seems quite stable) supports adobe t1 fonts with a
new API that abstract the font type loaded (freetype 2 is bigger for this, though)

>
> 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.
>

I found a good number of truetype fonts on the net but didn't look at licenses ...
will do it now...

>
> 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).
>

Rotated fonts is a concern to me as well ... ;-)

>
> 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.
>

Send me what you have as soon as it renders, I might change my opinion on the libs
issue  .... Still have some doc to read by then ...

Martin Jolicoeur
GVT Project
####@####.####



Previous by date: 19 Jan 2000 13:06:11 -0000 Re: Fonts revisited, Vidar Hokstad
Next by date: 19 Jan 2000 13:06:11 -0000 Newbie problems, Manuel Teira Paz
Previous in thread: 19 Jan 2000 13:06:11 -0000 Re: Fonts revisited, Vidar Hokstad
Next in thread: 19 Jan 2000 13:06:11 -0000 Re: Fonts revisited, Vidar Hokstad


Powered by ezmlm-browse 0.20.