freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] font catalog


From: Brian Stell
Subject: Re: [Freetype] font catalog
Date: Tue, 07 Aug 2001 09:08:59 -0700

Michael Jansson wrote:
> ...
> I am a bit puzzled by your comments below. Why would Mozilla need to know
> whether any of the pixels of a glyph is turned on or not?

If a Unicode character is not a blank (there are several blank 
characters) then users expect Mozilla to draw a readable character. 
Mozilla has a large amount of code that checks if the primary font has 
the character/glyph and if the character/glyph is missing them Mozilla 
finds another font to fill in the character/glyph from. The goal is to 
1) draw the character/glyph using the primary font, 2) if the primary 
font is missing the character/glyph then draw something that at least 
is readable.

Sadly, TrueType fonts often have cmaps that have indicated they have
a glyph (non-zero glyph index) for a readable character (non space
character) but the glyph has no contours and is blank. Drawing a 
line of text with blanks for some of the characters that should be 
readable would be a bug. Thus Mozilla needs to know if the glyphs are 
blank or not.

> Also, your comment seems to suggest that you are really looking for 
> missing glyphs so see if a font is suitable for use in a particular 
> language (missing glyphs are typically not blank btw)? 

I am really looking to see if the glyph is blank for a non-space
character. Missing characters, cmap entries where the glyph index is 
zero, are managed by the same glyph fill in code. But, this only 
works if Mozilla character map is accurate.

To get a language hint I'm using the OS/2 CodePageRange bits. 
Knowing which characters have glyph indexes only gives a very weak
hint as to which lanugages a font is suitable for. It also suffers
from the Han dis-ambiguation problem.

> I would not want to install fonts specially for Mozilla on X. 

Most likely, this code will use the already install (in public
locationx) TrueType fonts.

Would automatically downloaded fonts be interesting to you?

> Web page either don't use fonts (not counting the profound use of 
> Times and Arial/Helvetica), 

One of my driving goals is to provide an opportunity for the open
software community to start using/building more outline technology
fonts.

> or they use fonts I don't have. 

This is part of my effort to change that.

> I would not want my browser to be slower or bigger to support a 
> feature that never would be used.

If you want you can turn it off. I suppose that eventually when the
X server can deliver an accurate character map Mozilla could add
support for server side large charset rendering. Currently, figuring 
out an accurate cmap on a big font like Cyberbit using XLoadQueryFont
involves a huge amount of transfer between the X server and the 
client. That really IS unbearably slow. Without an accurate cmap
a font is of no value to Mozilla.

Client side TrueType support will be used by many-many Mozilla 
Linux/Unix users. Xft is client side TrueType rendering. 

X needs an API to get the language groups that a font is 
suitable for. Tagging a font as 10646 leaves the app stuck with Han 
dis-ambiguation which is no simple task. Tagging a font with a 
standard X encodings prevents large character set fonts. This is why 
we see utilities to break up a big TrueType font into little character 
sets (iso8859-1, is08859-4, iso8859-6, etc). Having done this Mozilla 
is then stuck with having to go to a great amount of effort to try and 
re-assemble that data (and it is real easy to get it wrong).

As for size, if one wants a small / fast but feature poor browser
the Mozilla is not the best choice. The amount of code added for this
client side TrueType font support is very small and will be used by 
many people. I think many people would weep if they knew the code bloat 
Mozilla has for features that *really* are never used.

> I talked to Erik before about the lack of support for dynamic fonts 
> in Mozilla. Has this changed? 

Sadly, Erik no longer works at Netscape.

Automatic font download is something we are interested in.

> If so, then are there thoughts on letting third parties provide 
> support for new font file formats?  Now *that* would be a great 
> leap forward!

Any particular font technology other than TrueType/OpenType in 
mind?

You seem to have some ideas, would you like to contribute to 
Mozilla?

If so, go to the Mozilla web site, sign up as a developer, download 
the Mozilla source and have at it. It is an open source app. Everyone 
with better ideas is encouraged to try their design and code.

-- 
Brian Stell
mailto:address@hidden



reply via email to

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