3 ms·
As a person who currently uses freetype: It's complicated, it's kinda slow, it's buggy, and it's unsafe. It's the most popular choice for good reason but there'
by kevingadd 7y ago
As a person who currently uses freetype: It's complicated, it's kinda slow, it's buggy, and it's unsafe. It's the most popular choice for good reason but there's definitely room for improvement. I have a couple TTF files here that cause off-the-shelf freetype to crash in release builds but not in debug builds...
Parts of it have aged poorly, as well - for example you might get the impression that it offers kerning support, and while that is technically true in practice it is not because most kerning data is not stored where FT thinks it is, so you'll ask it for kerning data and get nothing. IIRC the solution for kerning with freetype now is to have a shaper like harfbuzz do it for you since the shapers understand the new kerning data.
- Jasper_ 7y agoI've been happy with harfbuzz and stb_truetype
- kleiba 7y agoIt's a common gut reaction to jump to a "rewrite from scratch!" because it's more fun to start something new, but often times a serious refactoring is the more sane alternative.
- Moru 7y agoYes, and the reality often have a way of getting back at you sooner or later. Recreate bugs that were solved years ago in the original code and suddenly you end up with something that looks just as complicated as the original.
- Aeolun 7y agoThe problem with “a serious refactoring” in open source is that it’s extremely unlikely the maintainer will accept the fact that you rewrote his baby.
- kleiba 7y agoThat's why you shouldn't just rewrite it on your own devices. The better way is to get in touch with the maintainer and become part of the project. Maybe there are good reasons why refactoring some portion of the code in certain ways is perhaps not the best idea?
- Aeolun 7y agoIf you absolutely want to fix their codebase, you can do that I suppose. But trying to make friends with a stranger just to get your PR eventually accepted is not nearly as interesting as just saving yourself all that trouble by just implementing the thing from scratch.
- abainbridge 7y agoLibschrift is about 1000 lines of code. Freetype is about 200,000. I'm pretty sure these projects have different aims. It is possible that refactoring Freetype to make it meet the aims of Libschrift would be harder than starting again.
- kleiba 7y agoYes, but note that at some point Freetype was only 1000 lines of code, too.