[AD] New font types

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

As a small project, I have developed some new font types for Allegro. 
Please see the attached text file for a more thorough description. 
Although this would sit alright as an addon, it would require me to 
distribute patched versions of grabber, dat2c and Allegro itself, so I 
would like to ask for your comments on merging it into Allegro.

On the plus side:
 - Anti-aliased and truecolor rendering.
 - (Should be) faster for mono and 8-bit fonts.
 - Easier to write assembler optimisations for it.

On the minus side:
 - More code.
 - The font creation tool would have to be shipped as a separate 
   package, since it will be quite large once it is written (probably
   almost as large as the grabber).

If you are really interested, then you can grab the package from 
(temporarily):
  http://www.lwithers.demon.co.uk/exfont.tar.bz2

There is still some stuff to be done (the font creation tool, drawing 
onto planar bitmaps, drawing partially-x-clipped characters).

Bye for now,
- -- 
Laurence Withers,  lwithers@xxxxxxxxxx
(GnuPG 04A646EA) http://www.lwithers.demon.co.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9h6mXUdhclgSmRuoRAuHHAJ9QT4ndcSTpKX2GMZ5NZfAF5YFUSwCgqNeZ
396Rco+zHaGCWFDzGr8vC3w=
=c5rs
-----END PGP SIGNATURE-----
exfont/doc/types.txt
=========================================================================
                                                            Types of font

Introduction to exfonts
-----------------------

Exfonts contain one or more actual bitmapped fonts. They are 
differentiated between based on size (pixel height). It is therefore
possible to emulate 'scaling' of fonts, by providing enough bitmaps. Each
sub-font can be of a different type.

The several types of exfonts cover a range of different features. The
font that ships with Allegro is a plain monochrome font. However, to
improve appearance, anti-aliased fonts can be used. This is especially
important at very small and very large pixel sizes.

Sometimes, color fonts may be required - fonts in which the designer has
set the color of each pixel to be drawn. Allegro allows only 8-bit fonts,
drawn using the current palette. Exfont allows 8-bit fonts as well, but
it also allows truecolor fonts, and you can also anti-alias them.



Usage description
-----------------

Type                Anti-aliased    Color   Palette
----                ------------    -----   -------
mono                no              no
mono/aa             yes             no
8-bit               no              yes     Allegro current
24-bit              no              yes     Truecolor
24-bit/aa           yes             yes     Truecolor
indexed             no              yes     Supplied with font



Detailed type description
-------------------------

mono

    This is the most basic kind of font, and is similar to the one used
    in Allegro. Monochrome exfonts should draw faster than Allegro fonts.

    As an extension to what is possible with Allegro fonts, if you
    specify a fg color of -1 and a solid bg color, then the font will be
    drawn in reverse (ie. the characters will be translucent but the bg
    will be solid).

mono/aa

    An antialiased font. These have the advantage of being much nicer to
    look at (and therefore are more readable), but the cost is slower
    drawing as the screen needs to be read back. You can circumvent this
    limitation by drawing solid color onto a solid bg.

    As an extension to what is possible with Allegro fonts, if you
    specify a fg color of -1 and a solid bg color, then the font will be
    drawn in reverse (ie. the characters will be translucent but the bg
    will be solid).

8-bit

    These are the same as Allegro's color fonts. They will be drawn in
    the current palette, so if you change the palette you will also
    change the font color. 8-bit exfonts should draw faster than Allegro
    color fonts.

24-bit

    A truecolor font. These are fonts in which you specify the color of
    each pixel in each glyph. There is no limitation on how many colors
    you can use, and the font won't be affected by the current palette.

24-bit/aa

    An antialiased truecolor font. Much nicer to look at.
    
indexed

    An optimised truecolor font. Once again, the color of every pixel is
    specified, but only 256 different colors can be used (excluding bg).
    indexed fonts are faster to draw and use less memory than 24-bit
    fonts, but there is no antialiased version.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/