Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Antialiased fonts patch.
Date: Tue, 26 Jan 2010 10:11:01 +0100	[thread overview]
Message-ID: <4B5EB1A5.5040200@gmail.com> (raw)
In-Reply-To: <1264160815.29881.61.camel@EK>

[-- Attachment #1: Type: text/plain, Size: 2371 bytes --]

Evgeny Kolesnikov wrote:
> Here is the path for anti-aliased fonts.
>
>   
At first I was completely against antialiasing support because of
performance impact. But it being optional decreases the later. However
there is one problem: your patch relies on text_layer to be RGBA8888
which was a mistake. RGBA8888 for text layer is vastly inefficient
especially on 16-bit framebuffer and CPUs with small cache. I had plans
to switch it to indexed color. Do you really need 8bits and 4 aren't
enough? If 4 are enough we could make text_layer IA44 (indexed-4 bits,
alpha 4 bits) if you need 8 bits we can do IA88. I'm not sure which one
is faster: firs one is more cache-efficient, second one requires less
ALU. Are you interested in implementing this?
> 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.
>
>   
And by default grub-mkfont should generate not antialiased font for
performance reasons. But user or theme creator can choose to use
antialiased fonts if they wish.
> 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.
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

  parent reply	other threads:[~2010-01-26  9:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 13:19 grub-mkfont and DejaVu font problems Evgeny K
2010-01-21 13:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-01-22 11:46   ` Antialiased fonts patch Evgeny Kolesnikov
2010-01-22 12:53     ` BVK Chaitanya
2010-01-22 13:22       ` Evgeny Kolesnikov
2010-01-26  9:11     ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-01-26 10:04       ` Evgeny Kolesnikov
2010-01-26 11:59         ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-01-26 19:44           ` Carles Pina i Estany
2010-02-11  2:58         ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]           ` <1265957146.2292.11.camel@EK>
2010-02-12  9:50             ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-02-11 13:30         ` Michal Suchanek
2010-02-12  6:21           ` richardvoigt
2010-02-12  6:48             ` Evgeny Kolesnikov
2010-02-12  7:08           ` Evgeny Kolesnikov
2010-02-12  7:20             ` Bruce Dubbs
2010-02-12  7:52               ` Evgeny Kolesnikov
2010-02-12  9:15               ` Michal Suchanek
2010-02-12  9:55               ` Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B5EB1A5.5040200@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox