Note: the discussion below applies to work in progress that might show up in Firefox 3.7. It does not describe features in Firefox 3.6.

This post is from Jonathan Kew and John Daggett. He’s supplied a 5 minute video that shows some of the features on the fly. If you’re a total font nerd and you enjoy a soothing British accent, you might want to watch it.

Using @font-face allows web designers a wide palette of font choices and with commercial font vendors supporting the WOFF font format, the set of font choices should improve even more. So the next step is clearly to try and make better use of features available in these fonts.

For many years, “smart” font formats such as OpenType and AAT have provided font designers ways of including a rich set of variations in their fonts, from ligatures and swashes to small caps and tabular figures. The OpenType specification describes these features, identifying each with a unique feature tag. But these have typically only been available to those using professional publishing applications such as Adobe InDesign. Firefox currently renders using font defaults; it would be much more interesting to provide web authors with a way of controlling these font features via CSS.

Håkon Wium Lie of Opera, based on discussions with Tal Leming and Adam Twardoch, proposed extending the CSS ‘font-variant’ property to include values for font features. Mozilla is actively working on a new proposal along these lines. This is a fairly big addition to CSS, so it will most likely involve some complex discussions about how best to support these features.

Experimental Implementation

As part of this effort, Jonathan Kew has been working on porting a portion of the Pango library for use with handling complex scripts and to enable the use of font features on all supported platforms. He currently has an experimental build that uses a special CSS property to associate a list of OpenType features with specific elements in a page. This is not the proposed format, it simply provides a better way of discussing possible sets of font-variant properties and the OpenType feature settings to which they should map.

.altstyles {
  /* format: feature-tag=[0,1] with 0 to disable, 1 to enable */
  -moz-font-feature-opentype: "dlig=1,ss01=1";
}

The feature setting string above implies rendering with discretionary ligatures (dlig) and the first set of stylistic alternates (ss01). An example using Jack Usine’s MEgalopolis Extra:

This font makes extensive use of OpenType features; the homepage of the font contains a sample rendering that uses many of these features. Below is a rendering of the same sample written in HTML with OpenType features enabled:

Tabular Figures for Numerical Alignment

OpenType features also enable better control over alignment. When numbers are listed in tabular form, proportional forms often result in the misalignment of digits across rows, making the list harder to scan. With tabular alignment enabled, individual digits are rendered using a fixed width so that digits align across rows:

Automatic Fractions

Automatic fractions are also possible with OpenType features, note the inline use of fractional forms in the recipe ingredient list below:

Language Sensitivity

OpenType also includes support for features on a per-language basis. This is important for rendering text correctly in some languages. For example, Turkish uses both a dotted-i and a dotless-i, so the distinction needs to be preserved when rendering ligatures or small caps. Below is the same text in English and Turkish, with both default and language-sensitive renderings shown for the Turkish text:

Historical Text

The way text is rendered constantly evolves; glyphs once in common use often morph into other forms, making the historical forms distinct from their modern forms. Below is the text of an old Massachusetts Bay Colony law, taken from a book in the Daniel R. Coquillette Rare Book Room of the Boston College Law Library.

Original scanned image:

Below is the same text rendered in HTML using the Fell Types revival fonts by Igino Marini with OpenType features enabled. Note the ‘ct’ ligature and the contextual form of the ‘s’:

More resources

Font feature support in CSS proposal
OpenType font feature list
Fell Types revival fonts by Igino Marini

61 comments

Post a comment
  1. Tjobbe wrote on October 21st, 2009 at 9:29 am:

    Very good, but the accent sounds pretty much Australian to me!

    Reply

  2. Pingback from font_dragr: a drag and drop preview tool for fonts at hacks.mozilla.org on October 21st, 2009 at 10:01 am:

    [...] About « after Firefox 3.6 – new font control features for designers [...]

    Reply

  3. Greg wrote on October 21st, 2009 at 10:09 am:

    Just a heads-up, the line “It’s your a total font nerd and you enjoy a soothing British accent, you might want to watch it.” should read:

    “If you’re a total font nerd and you enjoy a soothing British accent, you might want to watch it.”

    You understand that I simply can’t bear to see it in the same sentence as “British”…

    Reply

  4. Pingback from Dunwich Type Founders » Blog Archive » Lots of font love from Firefox! on October 21st, 2009 at 10:20 am:

    [...] Firefox 3.7 will not only support WOFF, but will begin supporting more OpenType features. Control of the features via CSS is in the works. Christopher Blizzard and Jonathan Kew elaborate. [...]

    Reply

  5. cuz84d wrote on October 21st, 2009 at 10:26 am:

    Looking forward to the day we see some pretty sweet websites.. I know if you want to look at another language on the web, currently we have to setup the OS to use specific keyboard and language packs.. but this will be cool to see once web developers get a hold of this..

    Reply

  6. Christopher Blizzard wrote on October 21st, 2009 at 10:27 am:

    @Greg – Yeah, sorry about the typo there. I fixed it. :)

    @Tjobbe – Pretty sure he’s in the UK and he’s from there! But I’ll double check. (We’re a global project so it’s hard to know where people are from sometimes.)

    Reply

  7. @F1LT3R wrote on October 21st, 2009 at 10:34 am:

    The old font looks really beautiful. It’s mind boggling to think how different a place the web will be in five years with all the work that is currently going on.

    Reply

  8. Jakub Pawlowicz wrote on October 21st, 2009 at 1:23 pm:

    This is really, really good!! Thanks to this we may see some REAL typography inside browsers soon.

    @F1LT3R – In five years we could have that supported in all major browsers – I wish Explorer wouldn’t be one at that time…

    Reply

  9. Hans Pinckaers wrote on October 21st, 2009 at 1:46 pm:

    Wow, that’s amazing. Would be so cool if every browser was compatible with it. But we’re not so far yet.

    Btw, beautiful accent sir.

    Reply

  10. John Faulds wrote on October 21st, 2009 at 2:11 pm:

    Wow, some really cool features being discussed here. Look forward to being able to use them soon.

    @Tjobbe: I’m Australian and I can tell you that Jonathan Kew’s accent is definitely English.

    Reply

  11. skierpage wrote on October 21st, 2009 at 3:22 pm:

    Can’t wait sor this majeftically beautiful typography in nightlies, Firefox is the beft! :-) I hope many page owners will buy advanced fonts licensed for the web to take advantage of these features.

    Reply

  12. Nathan Myers wrote on October 21st, 2009 at 5:55 pm:

    This might be very nice for web designers, particularly the ones avoiding real work. What can you do for the people who have to look at the painfully unreadable web pages that will certainly result? What of those obliged to try to read them anyway?

    I have had to jimmy my environment to force my browsers to use Linux Libertine in place of all these ugly fonts specified by hipster website designers. It was easy enough on current Firefox — although it sometimes failed — but for Webkit browsers and to handle those failures, I had to edit fontconfig’s XML to force the substitutions. That heavy-handed approach is certain to lead to other problems. In order to get the “st” and “ct” historical [sic] ligatures in Libertine to display by default, I had to edit the font file itself, with fontforge, to copy them into the standard ligatures set.

    It’s still not satisfactory; most pages render with too-small point sizes, and I have to “zoom” most pages.

    It’s fun to put whizzy fonts in web pages. It’s not fun to try to read anything other than “lorem ipsum” rendered with most of them.

    Reply

  13. John Daggett wrote on October 21st, 2009 at 6:13 pm:

    @skierpage
    Keep in mind that most users already have fonts which include some of these features!! Why tabular figures are not already available on the web is a deep mystery to me…

    Reply

  14. Pingback from Jonas Dees » Blog Archive » New Font Control on October 21st, 2009 at 9:24 pm:

    [...] Font Control for Designers [...]

    Reply

  15. WalterGR wrote on October 21st, 2009 at 10:27 pm:

    Given that Firefox is all about web standards, could you let me know the standards body that approved this spec?

    Thanks,

    Walter

    Reply

  16. tom wrote on October 21st, 2009 at 11:04 pm:

    jonathan kew is english, see: http://www.tug.org/interviews/interview-files/jonathan-kew.html

    Reply

  17. Richard Le Poidevin wrote on October 22nd, 2009 at 1:22 am:

    I’m in love, this will be fantastic!

    Reply

  18. Pingback from LS graphic design » Miscellanea // Week mix on October 22nd, 2009 at 2:53 am:

    [...] you’re a total font nerd and you enjoy a soothing British accent, you might want to watch this video» about future firefox features (sorry for the [...]

    Reply

  19. Zéfling wrote on October 22nd, 2009 at 2:54 am:

    And support for Ruby (HTML and CSS3) is still planned?

    Reply

  20. Pingback from » Foxy fonts of the future My Green Life on October 22nd, 2009 at 8:41 am:

    [...] you’ve got an interest in fonts on the web you really do owe it to yourself to take a look at this page to get an idea of where things are heading. Although this is experimental work in Firefox, [...]

    Reply

  21. James John Malcolm wrote on October 22nd, 2009 at 8:47 am:

    This is fantastic work!

    I hope that “font-variant: do-numbers-in-tabular-style;” (and other extensions) won’t just be supported in the @font-face, but also everywhere else. Being able to do “#mytable td:nth-one(2n) {font-variant: do-numbers-in-tabular-style;}” would be such a boon. [1]

    Also, is “font-variant:small-caps;” going to be kept separate from “font-variant:real-opentype-small-caps;” in the final implementation? I don’t think that would be wise.

    [1] Excuse the pig-latin-css

    Reply

  22. John Daggett wrote on October 23rd, 2009 at 3:26 pm:

    @WalterGR
    As the article describes, this is work in development, it is not an existing standard. The initial proposal was posted on the www-style mailing list and the discussions will take place there, on the www-font mailing list, and within the W3C CSS Working Group.

    Reply

  23. Pingback from Weekly Round-up ~ Oct 23, 09 Edition | ClearType Press - Building a Better Government Web on October 23rd, 2009 at 8:44 pm:

    [...] After Firefox 3.6 – New Font Control Features for Designers [...]

    Reply

  24. Phil Ricketts wrote on October 24th, 2009 at 2:29 am:

    This is very interesting, these features are long overdue. The web needs better typography, and slowly, we’re getting it. Though really, what will change things is seeing IE implement some standard for font control such as this.

    This chap sounds like Salad Fingers (David Firth). I actually felt quite dirty after listening to this.

    Reply

  25. Pingback from Sex, lies, & type | i love typography, the typography and fonts blog on October 24th, 2009 at 1:25 pm:

    [...] future holds, and how browsers will one day begin to take full advantage of OpenType features: read After Firefox 3.6 – new font control features for designers and be sure to watch the [...]

    Reply

  26. Pingback from Davros reveals future: FireFox font control « The Pimpformation Architect on October 24th, 2009 at 4:46 pm:

    [...] today, Dan Klyn tweeted a link to a blog post describing new FireFox font features. The distinctive voice of the man in the video reminded me of someone… Soon we will be able [...]

    Reply

  27. Pingback from Notional Slurry » links for 2009-10-24 on October 24th, 2009 at 11:01 pm:

    [...] after Firefox 3.6 – new font control features for designers at hacks.mozilla.org "Below is the same text rendered in HTML using the Fell Types revival fonts by Igino Marini with OpenType features enabled. Note the ‘ct’ ligature and the contextual form of the ‘s’:…" (tags: typography opentype design graphic-design HTML browsers rendering) [...]

    Reply

  28. dfthdfhdfh wrote on October 25th, 2009 at 7:45 am:

    What about svgfonts?
    Are they usable in wott.
    Because they have benefits because they’re vector based.

    Reply

  29. Pingback from Barker Design | Graphic & Web Development » Blog Archive » Sex, lies, & type on October 25th, 2009 at 12:49 pm:

    [...] future holds, and how browsers will one day begin to take full advantage of OpenType features: read After Firefox 3.6 – new font control features for designers and be sure to watch the [...]

    Reply

  30. Pingback from Sex, lies, & type | More On Design on October 25th, 2009 at 3:22 pm:

    [...] future holds, and how browsers will one day begin to take full advantage of OpenType features: read After Firefox 3.6 – new font control features for designers and be sure to watch the [...]

    Reply

  31. Pingback from Sex, lies, & type - WEMAKECHANGES on October 26th, 2009 at 12:04 pm:

    [...] future holds, and how browsers will one day begin to take full advantage of OpenType features: read After Firefox 3.6 – new font control features for designers and be sure to watch the [...]

    Reply

  32. Pingback from Three Advances In Screen Typography on October 27th, 2009 at 10:27 am:

    [...] New Font Control Features For Designers [...]

    Reply

  33. Tjobbe wrote on October 27th, 2009 at 2:02 pm:

    @John Faulds – I’m English (can’t you tell from my name?), I don’t *think* he has a very English accent, it sounds it, but there’s something quite un-English about it, it really has a twang!

    Back on topic, seriously excited to the n’th degree with where fonts for the web are going and are going to go, exciting times ahead, the death of Arial? You read it here first ;o)

    Reply

  34. Pingback from @font-face kullanımı / Fatih Hayrioğlu'nun not defteri on October 29th, 2009 at 10:18 am:

    [...] http://hacks.mozilla.org/2009/10/font-control-for-designers/ (Firefox 3.6 ile yeni font tipi desteği) [...]

    Reply

  35. Dogan Weber wrote on November 7th, 2009 at 6:31 am:

    Beautiful!

    I am looking forward finding this features implemented in further firefox-builds. Open source is changing computing day by day. Keep on rockin’.

    Reply

  36. Pingback from 谋智社区 » Blog Archives » 火狐五周岁──记录互联网变化的五年 on November 9th, 2009 at 4:32 am:

    [...] 我们把在Mozilla的工作都设定在这个前提下。我们第一个使提速JavaScript成为可能,CORS(跨域XHR请求),混合使用HTML和SVG,最先提出的基于Canvas3D的WebGL,支持硬件设备的地理定位和重力感应。我们正在帮助实现和标准化一些全新的CSS规则,这些规则可能被其他浏览器实现;我们带领互联网朝着现代的字体系统前进;我们提供互联网网站作者和用户更多的安全工具。我们的工作就是帮助保证互联网变得更加丰富多彩并勇往直前──这也是我们公司公共利益使命中非常重要的一条。这是五年中Firefox提供给我们的机遇。 [...]

    Reply

  37. Mozilla User wrote on November 10th, 2009 at 11:55 am:

    I looove it! Way more useful than WOFF. Can you pleeaase make a Linux build? I can’t wait until FF 3.7!

    Reply

  38. Pingback from Sex, lies, & type | i love typography, the typography and fonts blog on November 13th, 2009 at 10:22 am:

    [...] future holds, and how browsers will one day begin to take full advantage of OpenType features: read After Firefox 3.6 – new font control features for designers and be sure to watch the video.WOFF sample page — you will need the latest development version of [...]

    Reply

  39. Pingback from Print Design to Web Design: Comparative Analogies Ajax Help W3C Tag on November 14th, 2009 at 6:13 am:

    [...] with the situation getting better on the web (hey, we’re even getting ligatures!), the control is still going to be pretty bad for a long time. Print designers are masters of [...]

    Reply

  40. Pingback from jjgod / blog - 闲聊文本渲染技术的近期发展 on November 17th, 2009 at 10:48 pm:

    [...] XeTeX 的作者 Jonathan Kew 虽然仍然在开发 TeXworks,但工作的重心已经放到了 Mozilla Firefox 3.6 的 WOFF 格式和 OpenType 复杂排版支持上,最近的一个视频里 Jonathan 提供了一个很棒的概览,有这样的一些特性之后,在浏览器里做一些认真的文本排版才可能成为现实 — 可惜浏览器仍然缺乏好的断行算法实现。这部分工作其实就是基于 harfbuzz-ng 的。而 WebKit-GTK 版本也开始了基于 harfbuzz-ng 的实现。 [...]

    Reply

  41. Pingback from IE9 will have rounded corners (and a bunch of other stuff) | The Accidental Businessman on November 19th, 2009 at 6:45 am:

    [...] interesting features, like better font rendering and control (something that other browsers have placed a lot of emphasis on lately), higher speed and much more. Share and [...]

    Reply

  42. Pingback from Print Design to Web Design: Comparative Analogies | E Marketing, Web Design, Web Develop, SEO and SEM Egypt Blog on November 19th, 2009 at 8:54 am:

    [...] with the situation getting better on the web (hey, we’re even getting ligatures!), the control is still going to be pretty bad for a long time. Print designers are masters of [...]

    Reply

  43. Patrick Chuprina wrote on November 25th, 2009 at 8:03 pm:

    Hi,

    I can’t seem to find : gfx.text_layout.harfbuzz to change either in firefox 3.6beta or 3.7 landmine(pc version) what am I missing? Any help would be appreciated.

    Patrick Chuprina

    Reply

  44. Pingback from Rex's blah blah blah » Firefox 3.6 的開放網頁字型格式 on December 1st, 2009 at 3:19 am:

    [...] backed by Mozilla, type foundries,介紹了 WOFF 中的一些規格演繹與技術說明。在 after Firefox 3.6 – new font control features for designers [...]

    Reply

  45. Pingback from The history of Web fonts – Centation Blog on December 8th, 2009 at 5:29 am:

    [...] All these methods act as a stop-gap whilst we wait for all browsers to allow embedding of custom fonts through @font-face (hint: we’re mainly waiting on Microsoft Internet Explorer), and for a look at what will soon be possible you can watch a great video from Mozilla titled new font control features for designers. [...]

    Reply

  46. Christian wrote on December 14th, 2009 at 4:02 pm:

    There are already special character entities for the one-quarter, one-half, and three-quarters fractions but I’ve wondered before why they didn’t have them for at least one-thirds and two-thirds.

    http://developer.cmzmedia.com/?p=32

    Really looking forward to being able to use ligatures and alternates, etc.

    Reply

  47. hurr wrote on December 22nd, 2009 at 1:01 pm:

    As Mr. Kew comes from SIL– are there any plans to support Graphite fonts in Firefox? He said in August[1] that WOFF would allow any sfnt font, but the draft WOFF spec only mentions “TrueType, OpenType and Open Font Format fonts”. I also found the sila project at mozdev[2] but it seems to be long defunct.

    [1] http://lists.w3.org/Archives/Public/www-font/2009JulSep/1279.html (WebOTF is what is now called WOFF)
    [2] http://sila.mozdev.org

    Reply

    1. John Daggett wrote on January 6th, 2010 at 7:30 pm:

      No plans currently for Graphite support but anything’s possible. As always, patches welcome!

      Reply

  48. Pingback from 5 years of Firefox ✩ hacks.mozilla.org on December 28th, 2009 at 7:16 pm:

    [...] to standardize and implement some new CSS capabilities that are being developed in other browsers, we’re leading the web towards a modern font system and giving web authors and users more security tools. Our job is to help keep the web rich and [...]

    Reply

  49. Pingback from Mike Beltzner comments on next Firefox, Lorentz - Mozilla Links on January 15th, 2010 at 11:10 pm:

    [...] start up their web browser and it will be better. Maybe it will crash less, maybe it will be improve typography support on the [...]

    Reply

  50. Pingback from Kommande IT-standarder « śaivaśākta on January 21st, 2010 at 2:19 pm:

    [...] och stöd i vävläsare (Firefox), typsättningsprogram (XeLaTeX) och program för att skapa typsnitt [...]

    Reply

1 2

Add your comment

  1.