Behdad’s Story

February 1st, 2019
Friday February 1st, 2019 is my last day at Google. On Monday February 4, I start at Facebook, also in the Internationalization team, in Seattle. I intend to continue working on fonts and text rendering. I took this opportunity to reflect on the past twenty-eight years of my life to share with you how I ended up here.
I was born in 1982 in Northern Iran. My father was a printer, and so were his brother and their father. My mother and her sister were amateur Persian calligraphers. My brother, Behnam, and I grew up in the print shop, like my father and his brother did in their father’s. The print shop consisted mainly of a Heidelberg Windmill letterpress machine, which we had no problem operating.
In 1991 my father bought an IBM 286 PC with 40MB of hard-disk and 1MB of ram, a color and a black & white Epson dot-matrix printer to typeset Persian magazines. Behnam and I taught ourselves programming in QBasic on DOS 3.3, while learning English as a side-effect.
By the time we got to middle school, around 1994, we were spending summers as interns at family friends’ computer business. Our responsibilities included assembling PCs, formatting virus-infected drives, installing DOS, Norton Commander, Windows 3.1 and later 95, antivirus, and other applications, etc. There we got introduced to Mac computers, which had better graphics, beautiful fonts, and built-in Persian support, though we never got to play with them much. We also learned FoxPro, and taught ourselves Pascal by reading a “Pascal for Basic Programmers” book in Persian. To buy computer books, Behnam and I would take a bus to the neighboring city of Babol, shop at the bookstore across from the technical university, and take the bus back home.
By high-school I was studying for the IOI (International Olympiad in Informatics) competitions. That’s how I met Roozbeh Pournader, who had done the same competitions earlier and was a freshman at Sharif University of Technology in Tehran at the time. We became close friends soon after, and later in high-school I started hanging out at the university’s Computing Center where Roozbeh had recently started working. Before Computing Center, Roozbeh was involved with the FarsiTeX project, an Open Source Persian typesetting system based on LaTeX 2.09. I learned about TeX, Free Software, GNU Project, and Unicode from Roozbeh, and eventually joined him at the Computing Center in what became the FarsiWeb project, and later on Sharif FarsiWeb, Inc.
This was around 1999/2000, and Internet Explorer 5 was recently released. This was the first browser that was capable of rendering Unicode-encoded Arabic script properly, from right to left and with Arabic joining, using OpenType fonts. At the FarsiWeb project we were tasked to make available a legible Unicode+OpenType-compatible font to be used to read Persian on the web. This, of course, was years before webfonts were a thing. Back then we were happy to make a font available for users to install. Just anything better than Arial or Times New Roman, which shared an ugly Arabic glyph set, or worse, Tahoma, which had quite a Comic Sans of an Arabic glyph set. Netscape, the other common browser at the time, supported neither bidirectional text, nor Arabic shaping.
One of my first tasks at FarsiWeb, was to write a PHP library to render Arabic script text to images on the server, such that we can serve images to Netscape while serving text to Internet Explorer. I was heading home for the new year holidays and Roozbeh handed me a printout of the Unicode Bidirectional Algorithm. I remember I made many attempts at reading the 19-page document, but just couldn’t make sense of it at all. Slowly though, things started to sink in. We found a rough Open Source implementation of the bidi algorithm called FriBiDi, and I started improving that drastically to match the Unicode spec perfectly, and learned C in the process.
Ugliness was not the only problem with Microsoft fonts. The Windows core fonts had a buggy glyph shape for the medial form of the U+06CC ARABIC LETTER FARSI YEH, a letter used in writing Persian language, but not Arabic language. Being unable to fix this bug in the fonts or the rendering system, we turned our attention towards Open Source environments. I patched Persian rendering bugs in KDE, and that’s the environment we were studying and promoting for a while, but turns of events landed us on GNOME, so I continued fixing Persian text rendering bugs there, while Roozbeh formed a team to translate GNOME to Persian. Netscape, meanwhile, rebranded as Mozilla, and got a brand new bidi implementation thanks to IBM. I remember seeing Jungshik’s name around Mozilla Bugzilla back then.
At FarsiWeb we also got involved with the Iranian standardization body, writing two national standards: ISIRI 6219 on Unicode for Persian text interchange, and ISIRI 9147 on Persian keyboard layout.
I finished my bachelors degree in three years, even though I was skipping most classes and learning Linux and Free Software development on the internet instead. In the summer of 2003 I visited Ottawa to present an academic paper at a workshop in theoretical computer science. I noticed that the Ottawa Linux Symposium (OLS) is happening the week after my workshop, so I arranged to attend that. OLS was the most prominent Linux conference back in those days, before it lost relevance to linux.conf.au a few years later.
I moved to Toronto, Canada in September 2003 to pursue a masters degree in theoretical computer science. Just before moving, I bought my first laptop, wiped Windows and installed Red Hat Linux on it. This was a powerful Sony laptop with lots of bling hardware (DVD writer!), and for those of you old enough to remember, things did not work on Linux out of the box. Moreover, the GNOME 2 desktop of those days was also nothing like the smooth experience GNOME 3 is today. I made a decision to fix any bugs I encounter on my Linux desktop, so that’s how I spent the next two years, learning the ins and outs of GNOME, instead of reading papers and figuring out how to write.
In the summer of 2005, Google launched the Summer of Code program. By then, I was out of funding for my masters, and desperately looking for any income. I applied and got admitted to the Summer of Code program, to work on improving login performance of the Fedora Desktop. I came up with the idea for that project in a ten minute walk outside on a Saturday morning. When my Summer of Code project got accepted, a friend and fellow grad student asked me why don’t I make that my masters project. I laughed at the idea first, but the more I thought about it, the more it made sense, as the only viable path to finish the masters. I was already attending meetings of the Systems Software reading group at the department. I contacted one of the professors there, and she agreed that my idea is a exactly a masters-sized project. She agreed to become my co-supervisor.
But as I do, I ended up procrastinating most of the summer anyway, and implemented the whole thing, preload, in the last week before Summer of Code results were due. I presented my code and results to my supervisors, and they agreed I now can proceed to write my thesis. The deadline to submit thesis to graduate that semester was at the end of September, a month away. I declared I intend to meet that deadline. My supervisors very politely told me that that is not possible. So I was forced to register and pay for another semester. Let’s just say that no thesis was written until two whole semesters later. In the end, the writing only took two weeks.
During the second year of my masters, Google came to Toronto for on-campus interviews. I was one of the sixteen to be interviewed, and was invited for onsites after. This was Bush era and getting US visa for Iranians was not the most convenient process. I brushed it off as too much work and declined the interviews.
While out of funding as a grad student, a company showed interest in me finishing Arabic support in FriBidi. Another company showed interest in FriBidi as well, and that was Motorola. They offered me a job which I accepted, to work from Toronto with their team in Sunnyvale. To work on text rendering on their line of feature phones. Motorola’s background check process however was stalled, waiting for me to officially finish my masters before they would let me start.
Back in the GNOME hacking world. Owen Taylor was the GTK+ developer who ended up taking up the Unicode text rendering challenge, and wrote Pango. There exist discussions between Raph Levien, who was also a GNOME hacker back in the days, and Owen on the design of “GScript”, which was renamed Pango. By 2005 I was contributing to Pango semi-regularly. It just happened that Red Hat started a social network project (yes!) called Mugshot, and Owen was transferred to work on that. This left Pango unmaintained, and after a few months, I became the Pango maintainer. While waiting to finish my masters to start at Motorola, Red Hat offered me a job to continue doing what I was doing and get paid for it. It was too good to pass, so I ditched Motorola, finished masters, and joined Red Hat Desktop team, working remotely from the Toronto office.
Mailing list records suggest that I coined the name HarfBuzz in October 2005, exactly when I was supposed to be writing my master’s thesis. HarfBuzz was initially code salvaged from FreeType, Pango, and Qt. In the December 2006 holidays, I decided to rewrite HarfBuzz based on two simple premises: 1. To use a small subset of C++ (instead of C) to enforce const-correctness and transparently convert from big-endian integers to machine-endian, and 2. Instead of parsing font file tables into memory, just mmap the font file and map C++ structures onto the memory and use templates and operator overloading to traverse the object tree ergonomically. That rewrite is what was known as harfbuzz-ng for years, and is what we simply know as HarfBuzz these days.
Around the same time, GTK+ had switched to Cairo graphics library for its rendering platform, and I got involved in Cairo development and maintenance. Developed by Carl Worth based on design by Keith Packard, the primary goal of Cairo was to provide a user-friendly API to developers. Cairo was my entry to the field of API design and quality software maintenance. What I learned with Cairo I directly applied to my redesign of HarfBuzz API and implementation.
Working at Red Hat’s desktop team was amazing. It didn’t feel like work. I didn’t have to go to office. No one would care when I worked. I communicated with my tech lead, Matthias Clasen, and others, over IRC, like I used to before being a Red Hat employee. Once, when someone asked on IRC which time zone I am in, Matthias replied “nocturnal EST”. I would have a five minute phone call with my manager, Jonathan Blandford (hey, welcome to Google!) once a year when he’d give me my annual bonus.
The only problem with the Red Hat Desktop team was that it still was a product team. And as product teams do, Jonathan wanted me to also do something other than text rendering. Since I had background in login performance optimization, I was tasked to make GNOME login time faster. So I spent a good chunk of 2008 working on that. In April 2009 I told Jonathan that we need to talk, so he called. I told him “I wonder if I should quit and join Mozilla and finish HarfBuzz.” He said: “is that all you want, to work on HarfBuzz?” I said: “yes”. He said: “go work on HarfBuzz.” and that was it for that.
Mozilla / Firefox, as discussed, did not support rendering Arabic, or other complex text. Around 2005, Chris Blizzard at Red Hat had changed Mozilla to use Pango on Linux, so it would render complex text (Indic was a big market for Red Hat at the time). In the process however, that broke MathML rendering. When I joined Red Hat in 2006, Mozilla-Red Hat relationships were approaching a legal suit, as Red Hat was obliged to fix MathML rendering in their shipping Firefox or they were not allowed to use the trademark Firefox. My first task at Red Hat was to fix this, so I found the bug, and also fixed printing. So one could finally print Indic text and MathML. Progress.
Anyway. I was also working with Mozilla people on the Cairo side, as they also had embraced Cairo as their rendering model, and were rewriting their layout engine and had interest in using my new HarfBuzz. Once they asked me if I knew anyone good with text rendering that they can hire. I referred them to Jonathan Kew, of XeTeX fame, who they successfully hired. Jonathan and I have been working on HarfBuzz together since, over many weeklong hackfests, from various Red Hat, Mozilla, and Google offices around North America and Europe. So, going to Mozilla to continue working on HarfBuzz was a natural fit. But it didn’t get to that.
In 2009, I turned my attention to Fontconfig, which was also suffering from lack of maintainer attention. Keith Packard was busy with Xorg and had no time for Fontconfig. In what turned to be a friendly hostile takeover, I became Fontconfig maintainer. A role that I passed on to Akira TAGOH a few years later when I did not have time for it anymore.
Other events of 2009 relevant to this story are that 1. I learned that I’m significantly underpaid compared to my peers, and 2. The Iranian Green Movement happened. I got preoccupied by the latter, while losing motivation by the former. These combined led to my first major burnout, which lasted well into 2011.
In April 2010 I was contacted by an old Sharif university colleague who was at Google. She told me that davinci in the Google Waterloo office is wondering if I am interested in joining the Chrome team in Waterloo. I went to Waterloo to meet with Robert Kroeger. Robert told me that they have their director’s approval to let me work at least 50% of my time on HarfBuzz. I joined the team soon after, reporting to Alex Nicolaou.
The conversation with my Red Hat manager was quick. He said he thought I was AWOL because of the Green Movement. I acknowledged that I was for a while, and thanked him for his mindfulness. He asked if I like him to see if Red Hat can match my Google offer. I told him that even if Red hat could (which I doubt), I wouldn’t want to work for a company that would underpay me so much. So I left. Just before accepting the Google offer, I contacted Robert O’Callahan at Mozilla and told him that “another major browser-maker is offering me a job to work on HarfBuzz. Does Mozilla have anything for me?” After a couple weeks of back and forth, he told me: “If Google is going to pay you to do what we want you to do, go with Google!” So that was it, my second failed attempt to join Mozilla! :) Incidentally, if I had joined Motorola I would have ended up at Google later as well.
The Waterloo Chrome team was seven people packed in a single room (called the oven) when I joined. Initially, it was understood that I would stay in my Downtown Toronto apartment and take the Greyhound to the office once or twice a week. Over time, Alex asked if I can maybe show up more often. :) As the office expanded and there were a few of us commuting from Downtown Toronto, the office added a rental van that we could drive to work and back. We tried different commute times, to beat the traffic, to go before it, after it. If we went 90 miles an hour, it would take one hour each direction. Most days it would be more like 3.5 hours roundtrip. One snowy day we had to turn around and go back home after four hours of being stuck in the highway. One winter I remember as the dark days. I would have to leave my apartment at 6 when it was still dark outside, and would get back home at 6 which was dark again.
The Waterloo team was working on adding touchscreen support to Chrome. This was before the Pixel tablets were designed / announced. When I joined, Robert told me to go figure out how to better render text on the GPU. Remember I was burned out, and thought the change of company would help me get back on track. Instead, I spent two quarters reading papers on GPU approaches to graphics rendering. After two quarters, I didn’t have anything to show, and that turned into anxiety. Eventually I managed to get out of the dark phase and get back on hacking on HarfBuzz. When Pixel tablets were planned, with high-DPI displays, GPU-based text rendering became high-priority again, and with the help of two interns, I managed to design and implement GLyphy, a best-of-industry GPU-accelerated text rendering library / prototype at that time.
While this was happening, with the help of Mark Davis and Jungshik, we hired Roozbeh to Google’s Internationalization (i18n) engineering team. A year later, Roozbeh convinced me to join i18n as well. He went as far as telling Bob Jung, the i18n Director, that I want to talk to him. I posited to Bob that it makes more sense for me to report to him. He agreed, directors talked, and transfer happened. I ended up occupying a corner office at the otherwise-empty 11th floor of the Toronto office, walking distance from my apartment, and reporting to Mountain View while waiting for my US visa to kiss the Canada cold goodbye. That happened in 2014.
Chrome Linux was already using old HarfBuzz when I joined Google. Android also integrated old HarfBuzz soon after I joined, thanks to Clare and others on Bob’s team. In my first visit to Mountain View for i18n Summit in the fall of 2012, just after joining i18n, I sat down with Raph Levien, who was the tech-lead for Android text rendering now, and over two days we ported Android to new HarfBuzz. I worked with others in Chrome team to do the same. At the same time, with help from Roozbeh, and lots of pair-programming with Jonathan Kew, I managed to implement a new Indic shaper in HarfBuzz, from scratch, and get it to top-notch quality. Eventually, the Indic shaping correctness was good enough for Mozilla to switch Firefox shaping on all platforms to go through HarfBuzz, instead of platform-native solutions on Windows and Mac.
In the same 2012Q4 trip to Mountain View, I noticed that some of the other people in the i18n “Fonts” team have been talking about implementing support for color fonts, such that color emoji can be shipped as fonts in Android. Their plan was to design a solution in the next two quarters, and then contract Werner Lemberg, the FreeType maintainer, to implement it in FreeType. That night, in my GSuite, instead of sleeping, I started putting Python code together to stuff decoded PNG images into a font table. I used my proficiency with the Cairo and FreeType codebases to load the images on the other side and render on the screen. I had a live color font demo on Linux desktop the day after. Over the next months, I worked with violets on the Android team to ship color emoji on Android. I built the font, and oversaw an intern adding support for our color font tables to FontTools, a Python library for font manipulations. We announced our Open Source work in a blogpost on the Google Open Source Blog. Microsoft also announced their own color font extension to OpenType a month after our announcement. Apple already had color emoji support for a couple of years by then but had not published their spec. And last but not least, Mozilla+Adobe+W3C had been working on an SVG-based solution. That is how, we ended up with four different color font solutions in OpenType. All players involved agree this was a design and process failure, and we all made sure to not make the same mistake again.
On my visits to Mountain View and otherwise, I was also in contact with David Kuettel, the TL of the Google Fonts (formerly Google Webfonts) project. Google Fonts was in need of a full-fledged OpenType font subsetter, which they were lacking. In 2013, David invited me to a meeting with Monotype, where Monotype said they have developed such subsetting technology in Python, and that they are in the process of porting it to C++ and are interested in licensing the technology to Google Fonts. Based on my knowledge of the OpenType structure that I have had gained developing HarfBuzz, and the Python-based FontTools library that I was now more familiar with, I messaged David and told him that “what Monotype has I can develop in a weekend.” So I did; and over the next two weeks turned it into a full-fledged OpenType subsetter. When Rod Sheeter joined Google and Google Fonts team, as his first project, he shipped the subsetter in prod, running on Jython!
Around the same time, Emil Eklund on the Chrome team contacted me, to work out how to use the HarfBuzz shaper in Chrome on Windows. Apparently he was involved in porting Chrome Windows to Direct2D, which would have required writing a DirectWrite integration layer for text shaping. Since there already existed HarfBuzz integration, he thought he can wire up HarfBuzz in the meantime, until DirectWrite integration happens. After wiring up HarfBuzz in place of Uniscribe, he observed a 4x speedup in text layout performance. So HarfBuzz stayed the shaper on Chrome Windows and DirectWrite integration was obviated.
These three projects, color-emoji in Android, OpenType subsetter in Google Fonts, and HarfBuzz in Chrome Windows, put me in close working relationship with the three teams that could use my expertise best. I continue working with all three till this day. These experiences also gave me confidence to take on bigger projects and to keep a long-term horizon.
Around this time, Dominik Röttsches at Intel showed interest in porting Chrome Mac to use HarfBuzz as well. Emil and I went to Finland to work with him, and later convinced him to join Google. Since then, pair-programming with Dominik from various Google offices has been one of my most productive ongoing projects at Google. Thanks to Dominik’s work, Chrome text rendering is considered best of all browsers by many.
My approach to the rewritten Indic shaper in HarfBuzz was based on 1. Using the Ragel state-machine generator to generate parser code from a hand-written grammar, and 2. Using Unicode data files to drive the state-machine. Jonathan and I soon noticed that the same approach can be applied to the many South-East Asian scripts which did not have any shaping support in OpenType / Windows. As such, we developed such a “SEA” shaper in HarfBuzz. At this point, I decided to gather OpenType stakeholders around and see if we can work this out together. I organized a weeklong meeting at Google Seattle, to meet with Microsoft, Apple, Adobe, plus other experts. We brainstormed and agreed on general direction, and went home and each continued work in isolation again. In true Microsoft fashion, they announced the Universal Shaping Engine that fall at the Unicode Conference, based on the same ideas. We embraced the idea, implemented USE in HarfBuzz, and deprecated our made-up SEA shaper. Since this was a universal shaping engine, I declared HarfBuzz complete and released HarfBuzz 1.0.0 in July 2015, about ten years after I started working on HarfBuzz. But as we all know, software projects never complete. And so HarfBuzz development has continued.
As noted earlier, I was hacking on the Python-based FontTools library, adding a font subsetter among other things. FontTools was written around 1999/2000 by Just van Rossum, brother to Python creator Guido van Rossum. By the 2010s FontTools was widely used by font engineers but practically unmaintained. In 2013 when I tried to reach Just to contribute back our color-font patches, he was not answering to any of my emails. I plowed forward and published my fork of FontTools, which by now had accumulated over a thousand commits, more than the project had in the 13 years before me.
In September 2014 at the ATypI Barcelona conference I presented my work on FontTools, and declared that at Google we will be developing missing pieces needed to make FontTools into a full-fledged font compiler. At the time, the only other production-strength font compiler was the proprietary Adobe Font Development Kit for OpenType (AFDKO). After my talk, David Lemon, then type team manager at Adobe, approached me and said he has good news for me. Later at the conference, Adobe announced that they are Open Sourcing AFDKO. As part of that, they paid Erik van Blokland to also Open Source his MutatorMath library, a building block for font interpolation.
Font interpolation is a technique that font designers have been using for quite a few years by now. Essentially, they would design a Thin or Light master, a Regular, and a Bold or Black one, and then linearly interpolate between the shapes, to fill in Semi-Light, Demi-Bold, Extra-Bold, etc weights. Same concept can be applied to over variations, eg. font width, or any other variation.
I left that ATypI Barcelona, with two takeaways: 1. That it’s stupid to do font interpolation at compile time and ship the interpolated font binaries on mobile devices. We should instead ship the masters and do the interpolation at runtime, and 2. Now that the Adobe CFF autohinter is Open Sourced, we should just take it and plug it into FreeType, so we don’t have to ship the hinting data with CFF fonts. You can forget about the second one. The first one is what I focused on for the years after. Also happened at ATypI Barcelona was someone from one of the Monotype subsidiaries told me that they use my FontTools subsetter in their webfont serving infrastructure. Small wins.
Back in Mountain View, my immediate teammates were involved with the Noto font project. Noto is Google’s default font on Android and ChromeOS for scripts other than Latin / Greek / Cyrillic. Noto is considered the biggest font family ever developed. There are three components to Noto: 1. Noto Color Emoji is built using custom scripts I wrote and Doug Felt improved, from image assets provided by Android / emoji team designers, 2. Noto CJK (Chinese / Japanese / Korean) is developed by Adobe and the binaries licensed to us under the Open Font License, 3. The rest of Noto (all other scripts) are developed by Monotype Imaging for us as work for hire. Google retains copyright.
At that point in late 2014, the existing Noto contract with Monotype was running out and a new contract was being negotiated, for a total of $8M, to 1. Extend the coverage of Noto fonts to latest Unicode standard, and 2. to expand font family weight and width to provide wider range of font faces as popularized by Apple and later Material design.
The existing Noto fonts shipped to Google were binary .ttf files. Ie. there were no sources, even though we paid for the entire development. Indeed, the concept of source versus compiled binaries was not that clear in the font industry. With Roozbeh, we pitched to the team and Bob that we should get font sources from Monotype, and build a pipeline to compile the fonts ourselves. The insight behind this was that 1. We are better engineers than Monotype, so we can build fonts better optimized to our various use cases (Android, web, …), and 2. If we have sources, we can develop new technology to do the font interpolation at run-time, using the same sources. Roozbeh left i18n team at this point, to join Raph at Android.
Needless to say, Monotype was initially reluctant to commit to giving us sources (which would make us independent of them moving forward) as well as skeptical of my plans for both building a better font compilation pipeline from the ground up as well as fully-automated font interpolation. Still, I managed to convince them and the team, and we signed the Noto Phase III contract with sources as delivery material. I asked Bob for two engineers to build the pipeline. I hired James Godfrey-kittle, and later in April 2015, ran into Sascha Brawer when he was meeting with Bob. As it turns out, Sascha was on his way to retire from Google for the second time, to work on font technology as a hobby! It took less than two minutes to convince him to join me in building a font compiler pipeline and get paid for it. And that’s exactly what the three of us did over the next two years.
Indeed at this point what I have had noticed was that we controlled how people read, from the font face design, to building the binary font, to delivering it to Android / Chrome and rendering it on screen. The part we did not control was the OpenType standard itself, and it was clearly felt as the bottleneck. Having learned my lesson with color font extension, instead of inventing a solution in isolation, I studied Apple’s & Adobe’s separate failed attempts at the exact same problem from the 90s, picked the better one, and started work on expanding it to OpenType. At the same time I started pitching my design at meetings and conferences.
While Sascha, James, and I worked on our implementation, Microsoft formed a working group of them, us, Apple, and Adobe, or the Big Four as the group became to be known in the font industry. The group started officially but secretly working on adding runtime font interpolation to OpenType. My whitepaper formed the blueprint of the work. The group met face-to-face each month, and six months later, on September 14, 2016 at the ATypI conference in Warsaw, the four of us companies announced OpenType Font Variations as part of OpenType 1.8. The demo used during the presentation was based on my implementation in HarfBuzz and FreeType, and Dominik’s integration in Chrome, as well as Sascha’s demo fontview app.
Variable fonts, as they are called, became the hot new thing in the type industry. At the TYPO Labs 2017 conference in Berlin, half of the sessions were variable-font-related. The only software announcement at the conference though, was Dominik’s announcement that Chrome now supported variable fonts on ALL platforms, thanks to a hybrid architecture he devised, which allowed us to use FreeType on every platform when it was convenient. This gave us an advantage that Safari / Internet Explorer simply don’t have: they depend on their operating system version / APIs to support new features, whereas in Chrome we ship HarfBuzz+FreeType so we can support latest font technology advancements on old software, like Windows 7.
Marek Jeziorek took over program management for Noto, dealing with Monotype and Adobe on a day to day basis, while James was responsible for pulling the pipeline together. I managed to isolate myself to provide the technology underneath the pipeline, namely varLib, the canonical implementation of building variable fonts using FontTools. As it happens, Adobe, Microsoft, and Apple all use varLib to make their variable fonts now.
James left in January 2017 to pursue VR interests at a startup. Cosimo Lupo, an anthropologist turned font / software engineer at Dalton Maag stepped up to help maintain the pipeline we had built, which Dalton Maag has had embraced for building fonts. Cosimo’s work became so critical to Noto’s day-to-day operations, that at the TYPO Labs 2017 in Berlin I convinced Cosimo to join our team, initially as a contractor. We were afraid, without a formal CS background, he would not be able to please the hiring committee.
I met Cosimo at Google London on July 12, 2017 and he signed up as a contractor with us. It happened to be my seventh Googleversary that day. It immediately felt like my successor plannings has begun.
The i18n Font & Text Rendering team exchanged managers a few times, but landed under Peter Chen when Xiangye, our PM at the time, went on maternity leave. Peter helped streamline operations tremendously, resulting in a leaner, faster-moving Noto, which was now available as variable fonts with truly open sources, exactly as I envisioned back in 2014.
Back on the Google Fonts front, they have had taken on the big challenge of shipping CJK (Chinese / Japanese / Korean) webfonts. Those fonts, are YUGE. 16MB YUGE. The part that is relevant to this story is that the Python subsetter that I wrote and they were relying on, was simply too slow with these huge fonts. We carried on for years by optimizing the subsetter, switching from Jython to CPython, etc. But in the end, as I showed in my TYPO Labs 2018 talk, we hit the bare metal of what Python could provide performance-wise. So I set on designing a C++ substitute, codenamed Faster Horse, to be implemented in the HarfBuzz codebase. While that is work in progress, the first phase, subsetting TrueType fonts, was implemented by Garret Rieger and pushed to production (ahead of schedule!) and showed a 10,000x speedup in subsetting time compared to the Python subsetter. Sigh! Moreover, after my presentation at TYPO Labs, Adobe contacted us and offered to implement CFF and CFF2 subsetting part of the Faster Horse project, a promise they have delivered on since, and which has been the beginning of an ongoing hands-on collaboration between our engineers and their engineers. As it happens, the W3C Webfonts Working Group was looking for new work items, and I suggested and members agreed that font streaming will be the next logical work for the WG. A super-fast subsetter, as in Faster Horse, plus off-the-shelf binary-patching is the approach that Google Fonts team is pursuing and again driving the working group and the industry forward with.
On the Chrome land, one dependency we have been carrying was on Mac’s CoreText library, as it was necessary to correctly shape Mac’s system fonts. Apple for years had this alternative to OpenType technology, called Apple Advanced Typography (AAT). While Apple has embraced OpenType for all their new fonts, some of their system fonts still ship as AAT fonts, and so HarfBuzz was not able to shape them correctly. As such, we were relying on a bridge layer called hb-coretext, which made HarfBuzz internally call Apple’s CoreText library on Mac to get the job done. In 2018, Sascha and I implemented AAT shaping in HarfBuzz, and with major testing and integration help from Dominik, we finally switched Chrome away from hb-coretext and to fully HarfBuzz-implemented AAT support. Firefox is in the process of evaluating this technology as well, to switch to it later this year.
On the Android side, my collaboration has been slower, since both Raph and Roozbeh left the team. Raph left for Fuschia initially, while Roozbeh went to Google Fonts. Roozbeh then left company for WhatsApp i18n. His last day at Google was February 2nd, 2018. That was sadly followed by Raph’s early retirement in August 2018, partly on the basis of Maven / Dragonfly, but mostly based on Google’s clear lack of understanding / accommodation for his personal circumstances. Android text team is thriving, thanks to Seigo Nonaka and his colleagues. But, when you think of Android as the largest mobile software system in the world, the amount of resources afforded to text leaves a lot to be desired.
This past July 2018, Sascha retired from Google again, mostly on the basis of Maven / Dragonfly. He continues working on font technology as his hobby, as he had originally planned to. (So does Raph, for what it’s worth.) On the bright side, Cosimo will be starting as FTE, on February 4th, as I start as FTE at Facebook on the same day.
In other news for HarfBuzz, Oracle ported JDK to HarfBuzz over the past few years (do I need to talk about how slow of a process changing JDK is?!) Adobe finally decided to embrace HarfBuzz instead of their own “World-Ready Composer”. Photoshop and Illustrator 2018 shipped with HarfBuzz shaping, with InDesign coming later this year. Last but not least, late last year Microsoft announced that Edge will become a browser built on top of Chromium, which means will be using HarfBuzz for shaping as well, just like Chrome and Firefox do. One of the reasons I embraced Google employment in exchange for Red Hat was to leverage Google to push HarfBuzz to gain more market share, such that font designers will test their fonts against HarfBuzz before shipping. As Webkit engineer Myles Maxfield observed on Twitter recently, after that change, all major browsers other than Safari will be using HarfBuzz for shaping. Now that’s market share I can’t complain about :).
So, what’s next? As I casually mentioned above, I’ll be joining Facebook’s internationalization team, in Seattle. As for what I will be doing, I expect to continue on the same journey. The specifics are to be determined and figured out, but the what and why are largely the same as what I set out to do twenty years ago. I’m just taking my business elsewhere. A couple of things have come full-circle since those early days though:
Back in 1992 when playing with that first IBM 286 PC and color dot-matrix Epson printer, Behnam and I did not know how to program the printer to change colors. We were 9 / 10 years old and didn’t know English enough to understand the manual. Instead, we used to place little pieces of metal type from the print shop underneath the printer’s ribbon cartridge, physically lifting it up to expose a different color to the head. Twenty years later in 2012, I implemented color-font technology in Android, enabling colorful emoji rendering on billion+ devices.
Back in 1999, we did not have access to fix the Persian rendering bug in Internet Explorer, so we turned to fixing rendering in Open Source software. In 2019, Microsoft Edge will ship with Chromium, relying on HarfBuzz to render Persian and other text.