Around 22 o'clock on Jun 3, Jon Smirl wrote:

> I meant that Mozilla has implemented code similar to
> fontconfig, not that it used fontconfig. Another case
> of this is the MiniXFT driver in Pango.

MiniXFT was implemented for the bare FreeType2 backend in pango -- done 
before fontconfig was split out from Xft and made into a separate 
X-indepdent library.

I'm busy ripping MiniXFT out of Pango this evening.

> The Windows code uses the loca table to compute the
> data when the font file is first opened. It is then
> cached in memory. It is fast enough that I can only
> even notice it when I load Unicode Arial.

Hmm.  Given the performance difference, I may check into adding loca table 
support to FreeType and using that instead.  Fontconfig automatically 
invalidates the caches when the directory changes, so you'll have a delay
whenever you add fonts and forget to rebuild the cache manually.

I still need to cache font information; I need to do matching based on
information found in the font files, and I'd prefer to do that without
opening every font in the system.  I have about 5000 fonts installed,
loading each of those even without computing character coverage takes a
long time.

One thing I did do last week was reduce the memory consumed by the 
character coverage maps -- fontconfig consumes around 100KB of 
memory to store the complete Unicode coverage for my 5000 font sample.

> How does fontconfig interact with CSS rules for font
> selection? 

Fontconfig provides both font configuration and font selection mechanisms; 
applications are free to use a different selection mechanism if they 
choose, but the one built into fontconfig provides something similar, but 
not identical to CSS2.  Once I thought about it for half a second, it 
seemed obvious to me that having a matching system that was unnecessarily 
different from a known standard was not reasonable; the goal is to replace 
the current matching algorithm with a CSS2 compliant one.  The API for 
matching is already sufficient for CSS2, the only task is to rip out the 
current low level matching function with a new one.

> How close is the fontconfig patch to being ready?
> After Mozilla 1.0 is out it should be easier to add
> code that isn't 100% stable.

There are probably hundreds of people using Mozilla with Xft support right 
now, and I haven't heard of any stability problems for several months now.

There are two known deficiencies -- the CSS2 matching support in 
fontconfig and MathML support.  

I'd like someone with a real understanding of how MathML is supposed to
work to lead me through how Xft and fontconfig could help Mozilla display
MathML pages better.  The current non-Xft MathML support is far from
perfect; it "knows" the encoding of a select set of fonts and if you have
different ones, you get incorrect glyphs on the screen.  Displaying the
wrong glyph is never reasonable, I'd like to figure out how to make it
either display the right glyph or let the user know that no such glyph is
available.

A separate issue that I have is how Mozilla configuration and Fontconfig
should be integrated.  Fontconfig can completely replace the Mozilla font
configuration database; it has the ability to specify default fonts for the
various CSS2 generic names along with language tags.  In a perfect world,
the users existing font configuration would be used by Mozilla and the
Mozilla font customization UI could be used to edit the fontconfig
configuration database.

Until this code is landed in the standard Mozilla build, we're not likely 
to see testing at the level needed to uncover all of the ugly corner 
cases; it does completely replace the font matching mechansism in Mozilla 
and hence undoubtably will come up with some unexpected results for 
unusual web pages.  Given that most of the web uses the MS web fonts, 
and given that many current Xft users have downloaded those fonts, it's 
likely that the hard parts of font substitution haven't really been 
excercised all that hard yet.

Of course, having help from CSS2 experts in getting the matching code 
right in fontconfig would be a big help; the essential operation is to 
provide a metric which measures the distance from the application-provided 
font matching pattern to each font in the database.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab


_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts

Reply via email to