Wednesday, October 8, 2008

Font selection for web fonts on Linux

Mozilla uses Pango for font handling on Linux because it is the best library in existence for international text-shaping with OpenType fonts.

Currently Pango's PangoFcFontMap is used for font selection via pango_itemize() . These APIs provide font-selection through fontconfig from fonts installed on the system, including fonts specific to each user.

When adding support for document-specified automatically-downloaded fonts to a web browser, it is important that font families created for one document do not change the behavior of other documents. However, these existing font-selection APIs currently only support application-specific fonts if they are added to fontconfig's application-global default configuration. In a web browser, adding document fonts in this way would lead to them sometimes being used in other documents, potentially leading to the rendering of completely inappropriate glyphs.

So, to implement web fonts, font selection is being implemented within Mozilla in a way that retains the benefits of fontconfig. Because Pango's design is modular, its text-shaping abilities can still be exercised by implementing a PangoFcFont with which Pango's shapers know how to interact.

Text layout currently contributes to a large proportion of the resources used by the browser. The speed of text layout, including font selection, benefits from caching the data that is likely to be reused. This does come at a cost, however, as these caches can be memory-intensive.

Implementing font selection in Mozilla provides an opportunity to design and tune the caching for Mozilla's usage patterns. Work to-date has already reduced Firefox's memory use on Linux by 10%, but still something like 30% of memory is used for low-level font handling, so there's plenty of room for further improvements here.


bqi9ogevsl said...

Brand, extremely regarded as one of the premier leisure brands within the nation. In gaming, The Cordish Companies has developed among the many most successful on line casino lodge resorts on the planet including the Hard Rock Hotel & Casino Hollywood, Hard Rock Hotel & Casino Tampa and Live! Welcoming over 55 million visitors per yr, these developments are among the many highest profile 카지노사이트 eating, leisure, gaming, lodge and sports-anchored destinations within the nation.

fjxn5ntqdx said...

After World War II the machines got here into worldwide use as governments have been drawn by the prospect of tax revenue. Video slot machines, which simulate reels on a monitor, have been introduced in Las Vegas in 1975. One of the numerous differences between video slots and three-reel slots 솔카지노 with mechanical reels is that three-reel video games virtually always have an incentive within the pay table to bet maximum cash. On three-reel video games, a max-coins bet brings a disproportionate leap within the top jackpot, so betting the max brings the next payback percentage than betting much less. Slot machines are more popular than table video games for a purpose.