[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xfree-i18n
Subject:    Re: [I18n]mb/wc Xft API (Re: ISO 10646 Fonts and XFontSet question)
From:       Brian Stell <bstell () ix ! netcom ! com>
Date:       2001-08-31 20:36:38
[Download RAW message or body]



Keith Packard wrote:
> ...
> Xft already provides an API for determining whether a font
> supports a particular glyph, ... My intention is to *also* 
> provide the list of glyphs a font supports as a part of the 
> XftPattern associated with a particular font instance.

For the Mozilla glyph fill-in code the difference between
checking for "a" glyph and knowing all the available chars has
a big performance impact.

There is a font list for each unique font specification on a 
page. For example: one font spec could be regular and another
could be bold, one could be 12 pixel and another could be
16 pixel.

For *every* character that is drawn the code scans the 
appropriate font list char maps for the first font that can 
display the char. Because this is in the tightest "text 
display loop" this is done in a single subroutine. An extra 
subroutine call would measurably slow down the process. Only 
when the fonts already loaded in a particular list do not 
support a char does the code do a subroutine call. To allow 
this to work the code needs the full list of available chars 
when it first loads the font.

-- 
Brian Stell
mailto:bstell@ix.netcom.com
_______________________________________________
I18n mailing list
I18n@XFree86.Org
http://XFree86.Org/mailman/listinfo/i18n

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic