Wait, so the idea is in the future, fonts will contain arbitrary full-color vector and bitmap images, they will contain Web Assembly code that needs to be run, and they will be streamed over the network? I’m probably missing a few other proposals, as I only skimmed.
Did anyone stop to consider if this is really necessary? The author makes it sound like he has used his influence steadily over the years to make fonts more complicated. “In year X, I proposed that fonts be able to do Y, because why not?” I get that text shaping is so complex, that in terms of open source, there is just Harfbuzz. I’m not an expert in this area. But I don’t think it’s a good thing if “font standards” are constantly getting new features, like web standards, and font renderers are like mini browser engines, where the sheer scope and number of features and rate of new features keeps everyone using the same codebases.
Well, we started this journey with bitmap fonts that wouldn't scale up, then most computers have been Western-oriented and didn't include full character sets for most of the people living on this planet. Then it turned out to be useful to be able to render languages and glyphs from dead ancient languages. And most languages other than English use all sorts of weird combining systems and accenting. When you type English it looks just like the keys you press. But type Arabic, especially with vowels, and it looks nothing like the keys you're hitting due to all the joining.
But the real kicker was emojis which threw a real spanner in the works. Prior to this text rendering had been universally mono, but we really had to add color then.
It's really about being inclusive. Writing (historically) was always something very analog, varying wildly between people, with all sorts of unbelievably arcane rules. Tech is just finally catching up with 5,000 years of history.
> Moreover, the fontations platform, which is the Rust framework Oxidize is producing, will unify font compilation and consumption, reducing the number of places new font-format features need to be implemented from three (FontTools, FreeType, and HarfBuzz) to one (Fontations), which would reduce development cost and overhead.
Will FreeType and HarfBuzz remain supported as C/C++ projects long-term, I wonder? Asking as someone who depends on these and doesn't want to introduce a dependency on a Rust compiler :)
Anecdotally, I notice a lot of game developers avoid FreeType and Harfbuzz entirely, instead opting for much worse text rendering in the form of stb_truetype.h only (Dear Imgui uses this, for example) - which 'is nice because it is a single header C file' but sucks with international languages; many people use SDFs for similar reasons.
I think the proposed move to WASM fonts, if done right, could make it easier to reduce the amount of code people need to render fonts (if the WASM font does the heavy lifting, and a small C program could render it) and alleviate this trend of people not using a good text rendering stack
I wouldn't worry about it. I don't see evidence that these Rust libraries have the kind of uptake that is alleged in the article. I think we'll be stuck with Freetype and HarfBuzz for a long time.
I have been hacking on a Rust program recently and I am using Freetype and Harfbuzz via FFI because the Rust packages he names don't appear to be mature yet.
> [It is ironic indeed, that a text about text rendering, is presented in such an inaccessible and badly-typed environment. This is a Google Docs Preview page. I am still yet to find a solution that provides the same features (collaboration, commenting, live edits) and is presented better. Suggestions are appreciated.]
Have you tried Observable? Their online notebook has live team editing built in, and the option to comment on cells, as well as fork and merge notebooks with suggested edits. However, it uses markdown instead of a WYSIWYG editor (although I did create some tagged template wrappers for djot and markdeep as possible alternatives). On the plus side it's really easy to write interactive demos!
They're kind of pivoting their product at the moment though, so I'm not sure how easy it is to get into the notebook part these days.
This is a lovely write up, but oh boy... when I see:
> Finally, I proposed that the future of font shaping and drawing/ painting will involve a fully-programmable paradigm.
> Two tongue-in-cheek mis-uses of the HarfBuzz Wasm shaper appeared recently: the Bad Apple font, and llama.ttf. Check them out!
See... the thing about solving problems is that, eventually you realize that any kind of problem can be solved by simply making a platform that can execute arbitrary code.
...and you see it again and again.
Declarative compile definition in make? Why not just make it code and use cmake?
Declarative infra in terraform? Why not just make it code and use pulumi?
Declarative ui? Why not just make it code and use javascript?
Database that holds data? Why not just use stored procedures and do it in code?
The list just goes on and on, and every time you have to roll back to a few important questions:
- Is the domain so complicated you really need arbitrary code execution?
- Are you inventing a new programming language for it?
- How will people program and test for the target?
- How will you manage the security sandbox around it?
It's just such a persuasive idea; can't figure out how to deal with the complexity in configuration? Make it code and push the problem to the user instead!
Sometimes it makes sense. Sometimes it works out.
To be fair, I get it, yes, font layouts are harder than they look, and yes, using WASM as a target solves some of those issues, but I look at llama.ttf and I really have to pause and go...
...really? Does my font need to be able to implement a LLM?
I don't really think it does.
...and even if the problem is really so complex that rendering glyphs requires arbitrary code (I'm not convinced, but I can see the argument), I think you should be doing this in shaders, which already exist, already have a security sandbox and already have an ecosystem of tooling around it.
I think inventing a new programmable font thing is basically inventing a new less functional form of shaders, and it's a decision that everyone involved will come to regret...
I don't disagree. But I have kind of the opposite take.
I can't count how many times I've seen simple code get turned into a hideously complex declarative language that has serious gaps.
Simple UI library code? Turn it into a custom declarative syntax that is now limited!
Simple build system that works and is debuggable? Turn it into a declarative syntax that can't be debugged and can't handle all the edge cases!
And so on and so forth.
I will admit that the idea of a font programming language sounds genuinely awful to me. So I don't really disagree with your premise. But I'm increasingly annoyed with declarative system when vanilla code is often simpler, more flexible, and more powerful (by necessity). :)
You are missing the point. Finally, it'll be possible to exploit side-channel attacks without using Javascript in the browser. Static HTML+CSS+Fonts websites won't be safe anymore. Yippieee! Finally, there is no reason to allow disabling Javascript anymore.
And you could add backdoors to hacked fonts that are activated by magic spells. Isn't it great.
I really have to install an old system with the Infinality patches again, I remember them to be quite excellent, but that was a few years, monitors and contact lense upgrades ago…
Maybe I'll put RiscOS on a Raspberry Pi at the same time, which (IIRC) had one of the first antialiased font rendering engines ever.
(I do have some old Macs running currently, and weirdly enough still prefer some of the old "blurry" font renderings to a lot of modern ones, at least on regular displays)
RustyBuzz is quite limited when compared with HarfBuzz. The Rust fonts scene also seems to lack the necessary momentum to drive things through.
I’m not sure whether it’s because the Rust community is mostly interested in webtech or whether Rust itself makes it hard to solve such complex problems. But I don’t see the sands shifting in less than 10 years to come.
>RustyBuzz is quite limited when compared with HarfBuzz.
As the main author of rustybuzz I'm surprised to hear this. If you need a text shaper, rustybuzz is mostly a drop-in replacement for harfbuzz.
Text shaping and TrueType parsing are hard problems, but Rust does not make them more complicated. Quite the opposite. In fact, rustybuzz is written in 100% safe Rust.
I would even go further and say that Rust is the only sane option for solving text-related tasks.
I can't quite see why Rust would make it harder, it's always a breeze compared to working on C++ projects, especially as the project matures. The compiler catches a lot of issues early, which otherwise slow down C++ projects as they accumulate silently, because they should have fixed all warnings,
should have used ASan, TSan, MSan, religiously, and should have agreed on a manageable subset of C++, ... but of course didn't.
But I think the power of legacy and a bigger community is not to be underestimated.
Servo is tagged as dead but the revival seems to have somewhat worked. I guess nto nearly as many full time people than when it's was under Mozilla umbrella but not dead. And by the look of it neither is Pathfinder the rasteriser.
> An experimental engine Servo originally launched by Mozilla as a successor to Gecko, is implemented in Rust. It was eventually abandoned by Mozilla when Mozilla Corporation announced laying off a quarter of its staff in 2020 and transferred to The Linux Foundation, then in 2023 to TLF Europe. While still experimental, it has been under active development again since 2023. Servo currently uses Rust bindings to Harfbuzz.
I'd say Servo is going pretty well. The git is fairly active and monthly updates on their blog paint a positive picture of the rate of progress. I try the engine out roughly monthly after the blog posts drop and when I last did a few days ago I was impressed to see a lot of my most used websites being displayed correctly. At this rate, I think it could become viable much sooner than we think. However, the project is still critically underfunded, currently only getting a monthly $2229USD according to their website.
To everybody complaining about the awful text rendering, it's literally in the first paragraph
> [It is ironic indeed, that a text about text rendering, is presented in such an inaccessible and badly-typed environment. This is a Google Docs Preview page. I am still yet to find a solution that provides the same features (collaboration, commenting, live edits) and is presented better. Suggestions are appreciated.]
Acknowledging the irony doesn't remove it. It's yet another case of putting developer convenience over end user experience. Which for something provided for free is more than you paid for but still a subpar result that can be criticized.
Why do you need those features for a published long document? Do the editing and collaboration in an ugly platform, but publish in something more readable?
I'm not sure how this gets rendered, but the lack of hinting makes it a strain to read. What irony that an article about progress in text rendering has such awful rendering quality.
PS: That is in Firefox. In Chrome it uses what appears to be a bitmap font, which is much worse.
I think the author could've used "Publish to web" instead of preview mode, for a more accessible article view with better font rendering and keyboard control (though it changes image size and breaks right-aligned text).
I believe this is a Google doc preview. On my iPad it had terrible scrolling performance, and the shortcut to scroll to the top of the page (tap the top edge of the screen) doesn't work :(
For me in Chromium, I got the error message "Some fonts could not be loaded" and the body text was in an actually readable font, unlike in Firefox.
I got annoyed that the page hijacked right click and key navigation, so I wanted to print to PDF — which didn't work. Chrome printed a single blank page. Firefox managed to print, but also only a single page, and when zoomed in the font got interpolated (= blurry), instead of being more readable.
Nice article but sometimes I don’t know what’s worse - the state of linux audio drivers, or the state of linux text rendering.
It’s very easy to see when FreeType is used because it just looks off in a few, but significant ways. I’ve used it with and without Harf. DirectWrite has been a joy by comparison.
I never had particular issues with Linux or Windows, but I have to say that I was surprised at how bad my MacBook looks when connected to an external 1080p monitor. I know Apple wants you to buy one of their fancy high resolution monitors or whatever, but it was so odd that one with a 1920x1080 resolution would look so bad. Even toggling the hi-dpi setting in BetterDisplay didn't help much.
I’m resigned to the fact that I’ll be dead before Linux fonts look good. That’s true of many Linux features, actually. “Public” software is the quality of most public infrastructure, sadly, and smells vaguely of piss.
making your article force a tiny, fixed, unchangeable font size seems like a good way to convince people that you should be nowhere near text rendering infrastructure
dgreensp|1 year ago
Did anyone stop to consider if this is really necessary? The author makes it sound like he has used his influence steadily over the years to make fonts more complicated. “In year X, I proposed that fonts be able to do Y, because why not?” I get that text shaping is so complex, that in terms of open source, there is just Harfbuzz. I’m not an expert in this area. But I don’t think it’s a good thing if “font standards” are constantly getting new features, like web standards, and font renderers are like mini browser engines, where the sheer scope and number of features and rate of new features keeps everyone using the same codebases.
qingcharles|1 year ago
But the real kicker was emojis which threw a real spanner in the works. Prior to this text rendering had been universally mono, but we really had to add color then.
It's really about being inclusive. Writing (historically) was always something very analog, varying wildly between people, with all sorts of unbelievably arcane rules. Tech is just finally catching up with 5,000 years of history.
sambazi|1 year ago
slimsag|1 year ago
Will FreeType and HarfBuzz remain supported as C/C++ projects long-term, I wonder? Asking as someone who depends on these and doesn't want to introduce a dependency on a Rust compiler :)
Anecdotally, I notice a lot of game developers avoid FreeType and Harfbuzz entirely, instead opting for much worse text rendering in the form of stb_truetype.h only (Dear Imgui uses this, for example) - which 'is nice because it is a single header C file' but sucks with international languages; many people use SDFs for similar reasons.
I think the proposed move to WASM fonts, if done right, could make it easier to reduce the amount of code people need to render fonts (if the WASM font does the heavy lifting, and a small C program could render it) and alleviate this trend of people not using a good text rendering stack
chrchr|1 year ago
I have been hacking on a Rust program recently and I am using Freetype and Harfbuzz via FFI because the Rust packages he names don't appear to be mature yet.
SSLy|1 year ago
you can link against pre-built .dll/.so/.dylib from your C++ code base.
jpc0|1 year ago
vanderZwan|1 year ago
Have you tried Observable? Their online notebook has live team editing built in, and the option to comment on cells, as well as fork and merge notebooks with suggested edits. However, it uses markdown instead of a WYSIWYG editor (although I did create some tagged template wrappers for djot and markdeep as possible alternatives). On the plus side it's really easy to write interactive demos!
They're kind of pivoting their product at the moment though, so I'm not sure how easy it is to get into the notebook part these days.
[0] https://observablehq.com/@jobleonard/djot
[1] https://observablehq.com/@jobleonard/wrapping-markdeep-into-...
bbkane|1 year ago
wokwokwok|1 year ago
> Finally, I proposed that the future of font shaping and drawing/ painting will involve a fully-programmable paradigm.
> Two tongue-in-cheek mis-uses of the HarfBuzz Wasm shaper appeared recently: the Bad Apple font, and llama.ttf. Check them out!
See... the thing about solving problems is that, eventually you realize that any kind of problem can be solved by simply making a platform that can execute arbitrary code.
...and you see it again and again.
Declarative compile definition in make? Why not just make it code and use cmake?
Declarative infra in terraform? Why not just make it code and use pulumi?
Declarative ui? Why not just make it code and use javascript?
Database that holds data? Why not just use stored procedures and do it in code?
The list just goes on and on, and every time you have to roll back to a few important questions:
- Is the domain so complicated you really need arbitrary code execution?
- Are you inventing a new programming language for it?
- How will people program and test for the target?
- How will you manage the security sandbox around it?
It's just such a persuasive idea; can't figure out how to deal with the complexity in configuration? Make it code and push the problem to the user instead!
Sometimes it makes sense. Sometimes it works out.
To be fair, I get it, yes, font layouts are harder than they look, and yes, using WASM as a target solves some of those issues, but I look at llama.ttf and I really have to pause and go...
...really? Does my font need to be able to implement a LLM?
I don't really think it does.
...and even if the problem is really so complex that rendering glyphs requires arbitrary code (I'm not convinced, but I can see the argument), I think you should be doing this in shaders, which already exist, already have a security sandbox and already have an ecosystem of tooling around it.
I think inventing a new programmable font thing is basically inventing a new less functional form of shaders, and it's a decision that everyone involved will come to regret...
forrestthewoods|1 year ago
I can't count how many times I've seen simple code get turned into a hideously complex declarative language that has serious gaps.
Simple UI library code? Turn it into a custom declarative syntax that is now limited!
Simple build system that works and is debuggable? Turn it into a declarative syntax that can't be debugged and can't handle all the edge cases!
And so on and so forth.
I will admit that the idea of a font programming language sounds genuinely awful to me. So I don't really disagree with your premise. But I'm increasingly annoyed with declarative system when vanilla code is often simpler, more flexible, and more powerful (by necessity). :)
moonchild|1 year ago
funcDropShadow|1 year ago
And you could add backdoors to hacked fonts that are activated by magic spells. Isn't it great.
nineteen999|1 year ago
mhd|1 year ago
Maybe I'll put RiscOS on a Raspberry Pi at the same time, which (IIRC) had one of the first antialiased font rendering engines ever.
(I do have some old Macs running currently, and weirdly enough still prefer some of the old "blurry" font renderings to a lot of modern ones, at least on regular displays)
alchemio|1 year ago
RazrFalcon|1 year ago
As the main author of rustybuzz I'm surprised to hear this. If you need a text shaper, rustybuzz is mostly a drop-in replacement for harfbuzz.
Text shaping and TrueType parsing are hard problems, but Rust does not make them more complicated. Quite the opposite. In fact, rustybuzz is written in 100% safe Rust. I would even go further and say that Rust is the only sane option for solving text-related tasks.
carlmr|1 year ago
But I think the power of legacy and a bigger community is not to be underestimated.
brohee|1 year ago
lcouturi|1 year ago
> An experimental engine Servo originally launched by Mozilla as a successor to Gecko, is implemented in Rust. It was eventually abandoned by Mozilla when Mozilla Corporation announced laying off a quarter of its staff in 2020 and transferred to The Linux Foundation, then in 2023 to TLF Europe. While still experimental, it has been under active development again since 2023. Servo currently uses Rust bindings to Harfbuzz.
I'd say Servo is going pretty well. The git is fairly active and monthly updates on their blog paint a positive picture of the rate of progress. I try the engine out roughly monthly after the blog posts drop and when I last did a few days ago I was impressed to see a lot of my most used websites being displayed correctly. At this rate, I think it could become viable much sooner than we think. However, the project is still critically underfunded, currently only getting a monthly $2229USD according to their website.
pineapple_sauce|1 year ago
unknown|1 year ago
[deleted]
unknown|1 year ago
[deleted]
compressedgas|1 year ago
techn00|1 year ago
> [It is ironic indeed, that a text about text rendering, is presented in such an inaccessible and badly-typed environment. This is a Google Docs Preview page. I am still yet to find a solution that provides the same features (collaboration, commenting, live edits) and is presented better. Suggestions are appreciated.]
account42|1 year ago
eviks|1 year ago
unknown|1 year ago
[deleted]
heftig|1 year ago
PS: That is in Firefox. In Chrome it uses what appears to be a bitmap font, which is much worse.
nyanpasu64|1 year ago
maxwindiff|1 year ago
Findecanor|1 year ago
I got annoyed that the page hijacked right click and key navigation, so I wanted to print to PDF — which didn't work. Chrome printed a single blank page. Firefox managed to print, but also only a single page, and when zoomed in the font got interpolated (= blurry), instead of being more readable.
Lammy|1 year ago
FreeFull|1 year ago
unknown|1 year ago
[deleted]
hi_dang_|1 year ago
It’s very easy to see when FreeType is used because it just looks off in a few, but significant ways. I’ve used it with and without Harf. DirectWrite has been a joy by comparison.
KronisLV|1 year ago
Here's a quick picture from a few days ago: https://imgur.com/a/GLohlj1
7e|1 year ago
unknown|1 year ago
[deleted]
unknown|1 year ago
[deleted]
florence023|1 year ago
[deleted]
KerrAvon|1 year ago
umanwizard|1 year ago
unknown|1 year ago
[deleted]
behdad|1 year ago
johnny22|1 year ago
andsoitis|1 year ago
[deleted]