[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Antialiased fonts patch.

From: Evgeny Kolesnikov
Subject: Antialiased fonts patch.
Date: Fri, 22 Jan 2010 17:46:55 +0600

Here is the path for anti-aliased fonts.

Everything my path does is:

1) Enriches grub-mkfont with ability to write (and debug with -vv) 
pff3 (as I call it now) font format. There are 2 differences between
pff2 and pff3 formats: FILE magic (PFF2 becomes PFF3) and DATA block
entires size multiples by 8 (1bit -> 8bit). In other words PFF3 stores
8-bit alpha channel instead of 1-bit.
And grub-mkfont will still be able to generate pff2, of course.

2) Adds pff3 format parsing and drawing ability to font.c.
And of course pff2 still there; actually as you can understand 95% of
code is reused because of such a little differences in formats.

Drawing itself implemented pretty straightforward: on each glyph
drawing A channel (from glyph) and foreground color are converted to
RGBA buffer and then blended in RGBA_8888 mode.

As far as I understand writing custom blitter for now will not worth it
in terms of efficiency.

When I test it I was unable to see performance difference between 1-bit
fonts and my version. They both flickers a little.

Files affected: /font/font.c and /util/grub-mkfont.c.

Attachment: font.c.diff
Description: Text Data

Attachment: grub-mkfont.c.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]