4 ms·
FreeType is a dinosaur that should be replaced regardless of Rust or not.
by Ono-Sendai 2y ago
FreeType is a dinosaur that should be replaced regardless of Rust or not.
- TheRealPomax 2y agoThe best libraries are libraries that have a clearly defined goal, hit that goal, and then don't change until the goalposts get moved. Something that happens only very slowly in font land. Its age is completely irrelevant other than as demonstration that it did what it set out to do, and still performs that job as intended for people who actually work on, and with fonts.
- Ono-Sendai 2y agoI don't think you understand how backwards it is. My patch that makes SDF rendering 4x faster was not accepted, presumably because floating point-maths is some strange new-fangled technology. Freetype uses antiquated fixed-point integer maths everywhere. See https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/347 https://gitlab.freedesktop.org/freetype/freetype/-/merge_req...
- TheRealPomax 2y agoI know how to read, and that MR comment sounds 100% reasonable to me. Normally you'd take a comment like that, go "oh, okay let me do some more investigations" and start a dialog instead of going "they rejected my MR on the first pass, they don't know what they're doing and their library is antiquated". Where's the follow-up, or did you just walk away?
- TheRealPomax 2y agoBecause to be a clear: a reviewer comment is the start of the conversation, if you don't respond then the bad actor is you, not them. Ask them why they don't want to use math.h, ask them if there are dev documents that explain what can and can't be used, and why. If you don't, this failure is on you, not them.
- Ono-Sendai 2y agoA more reasonable reply would be something like, "wow, that's cool that you got a 4x speedup. A 4x speedup is certainly enough to justify using floating point maths. And the code is simpler too!"
- kelnos 2y agoDid you check to see if Freetype supports platforms that don't have floating-point math, or where it's very slow? I agree that fixed-point math is unnecessary on modern hardware and architectures, but they may prioritize support for hardware you don't personally care about. Sure, a compile-time option to use one or the other might sound reasonable, but then that's two different code paths that need to be maintained and tested. Are you willing to do that maintenance on an ongoing basis? And can you be certain that switching to floating-point doesn't change the results of calculations in various ways that actually matter for rendering? Are you willing to put in the time to test that thoroughly? Instead of engaging with the developer, you just ignored them and moved on. I certainly wouldn't want to merge a patch into one of my projects if it came from someone with your attitude.
- Ono-Sendai 2y ago"Sure, a compile-time option to use one or the other might sound reasonable, but then that's two different code paths that need to be maintained and tested. Are you willing to do that maintenance on an ongoing basis?" No, that's why I will change to a better font rendering system when I get a chance.
- kiicia 2y agoIt already is replaced by HarfBuzz https://harfbuzz.github.io https://harfbuzz.github.io