State of Text Rendering 2024
Hin-Tak Leung
htl10 at users.sourceforge.net
Thu Jul 11 20:52:10 UTC 2024
Thanks, Behdad, for a very thorough if somewhat subjective and at times incomplete survey.
I'll try to make 4 short comments, then expand on them. Please feel free to TL;DR, at any point.
1. The mini "font war 2.0", between Google/Chrome and Webkit/Safari, on COLRv1 vs OT-SVG. There is a 10-year old "won't fix" https://issues.chromium.org/40336440 on Chrome's SVG in OpenType support, despite Google actually added OT-SVG support in m103 about two years ago, but left it disabled. Webkit/Safari folks has a couple of public statements stating they won't implement COLRv1, last I heard.
2. Skia/Chrome being the reference/practical implementation of COLRv1, coverage of various skia-related resources are perhaps lacking. For example, you mentioned HarfBuzzSharp being part of dot net API, but you did not mention that SkiaSharp pre-dates HarfBuzzSharp, and are AFAIK, maintained together by the same team: https://github.com/mono/SkiaSharp-API-docs (this contains the HarfBuzzSharp API docs also), and https://docs.microsoft.com/dotnet/api/skiasharp . I'll tell you more below, since I have been co-maintaining skia-python for about a year now, and in fact the person who released the monthly update to skia-python, tracking skia's monthly releases, for the last 10+ releases, after it having been somewhat dormant at m87 for three years.
3. On font editors, there was a discussion between me and Georg of Glyphs, and some initial investigation of the possibility of porting Glyphs to windows via Microsoft's WinOBJC, and to Linux via OpenStep (the open-source clone of NeXT, what Mac OS X started with two decades ago). Likewise, MS is not oppose to open-sourcing the whole of Visual Truetype GUI (minus the Apple/Microsoft font scaler code), and I have approached Apple folks about the first truetype font editor, RoyalT, from 35 years ago. Some of it depends on FontVal-RX (https://github.com/FontVal-extras/FontVal-RX ), and what's possibly the beginning of FreeType 3. FontVal-RX was supposed to happen two years ago, except I got really ill and was hospitalized for a bit, and during my recuperation, distracted by skia-python.
4. another 10-year-and-still counting issue: https://github.com/fontforge/fontforge/issues/1534 - that fontforge cannot be used to manipulate Google Noto / Adobe Source CJK fonts. I think it is worth mentioning, considering the role of fontforge and Google Noto / Adobe Source fonts.
People who want to stop reading, should stop now... anyway. Further.
1. I submitted the one-line patch to qt - https://bugreports.qt.io/browse/QTBUG-120543 - to switch on OT-SVG support in qt-webengine (a folk of the chromium code). qt 6.7 was about 6 months behind at m118, the upcoming 6.8 is still m118-based like 6.7. Current chrome is m127, although the QT folk seems to have a m122 based qt-webengine backend in dev, which means it is still about 6 months behind chome's.
skia and chrome version numbering are in sync, and has a 4/6 weeks release cycle, for those people who don't know. so m118 and m127 is roughly about 9 months to just over a year apart, without looking at precise dates.
The way I see it, Google folk likely will spend time adding COLRv1 as a patch, and submit that to the webkit folks. Whether they will take it, is another matter.
The one-line patch to enable OT-SVG is included in recent releases of skia-python, since I co-maintain it. I can put random stuff in myself, within reasons. BTW, I have left instruction to the project owner that if I disappear for extended time, and the COLRv1 addition to skia-python gets bit-rotten, please just remove it.
2. SkiaSharp is at m116, which is after m98 (the COLRv1 entry point) and m103 (the disabled OT-SVG support in skia/chrome).
https://github.com/HinTak/skia-building-fun/ is a shell-script plus some patches, to build current skia on linux in about 20 minutes using about 300MB total disk requirement. The default / official instruction requires about 9GB of disk spaces.
https://github.com:HinTak/freetype2-demos-skia/ is a modification of freetype2-demos to use skia in addtion to cairo/rsvg (switching by a launch switch between the two) for OT-SVG rendering. There is a not-yet-public addition on top of that to add COLRv1 viewing support to ft2-demos too. I consider the COLRv1 addtion a bit too ugly to be posted at the moment, but the additional COLRv1 patch is used to build https://github.com/FontVal-extras/binary-archive , the rpms of freetype demos and the modified freetype on my own system. Grab both and set LD_LIBRARY_PATH etc to see it, if you want to. I'll add some notes, instructions at some point.
TODO: submit one-line patch to SkiaSharp to enable OT-SVG support.
3. and 4. After working on FontVal for almost a decade now, I have come to the realization that it is using the editor-like APIs in Apple/Microsoft's font scaler (which does not exist in FreeType, and I spent 3 years adding partial bits of). Despite Microsoft claiming otherwise, the font scaler API continue to be extremely similar - for example, it is possible to run FontVal with Apple's font scaler instead of MS's, without any noticeable code change, and Apple's libFontValidation (and Apple's FontTool suite) can likewise inter-op with Microsoft's font scaler. And I realise that the Apple font scaler having an accompanying font editor, RoyalT, since day one, was a very important part of its design.
One frequent complaint of the current incarnation of FontVal is that, however good it is, it does not reflect suitability of use for windows (or Mac OS X) - that's just a harsh reality: a font validation tool must use the platform's renderer, to have any authenticity of claiming suitability.
Likewise, font editors, at its final finishing stage, must use the platform's renderer for looking at the near-finished outcome.
FontVal-RX is the project to detach FreeType (and make it an optional backend), and re-enable the bridge to the Apple/Microsoft font-scaler. So I have closed off https://github.com/HinTak/Font-Validator/ a few months ago, but it should have happened about two years earlier.
The potential outcome of FontVal-RX, is bringing Visual Truetype to open-source (minus its fontscaler code), since it means making FreeType more Apple/Microsoft font-scaler interface-similar. Plus porting Apple's libFontValidation, and Glyphs, among other possibilities.
The original plan for FontVa-RX was an initial release about 18 months ago, and reaching its ending goal (a modified FreeType having Apple/MS font-scale like APIs) around 2028. That didn't happen because I have fallen ill, and now distracted by skia-python. Skia-python itself would basically push FontVal-RX's ending goal date by another two years, to 2030.
The time estimate is based on that fact that I can only justifiably spend x amount of my time, uncompensated, in any period, on "hobbyist" pursuits. So spending time on skia-python means not spending time on FontVal-RX. And, responding to flames, such as answering "why don't you do...." also cut into that time. So - please think before you comment, because responding to your comments also cut into that time share. Thanks for reading so far. And on the off-chance that somebody feel like funding me on portion of this, please get in touch.
On Tuesday 9 July 2024 at 03:05:15 BST, Behdad Esfahbod <behdad at behdad.org> wrote:
Hi,
I'd like to share with you the "State of Text Rendering 2024":
https://behdad.org/text2024/
Feedback and comments are most welcome.
Thanks,
behdad
http://behdad.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20240711/6d4a869a/attachment.htm>
More information about the cairo
mailing list