4 ms·
"Writing our own text layout manager… from scratch". I would be pessimistic of the magnitude of this statement. I do a significant amount of text engine work a
by mooman219 6y ago
"Writing our own text layout manager… from scratch". I would be pessimistic of the magnitude of this statement.
I do a significant amount of text engine work and I'm skeptical what they implied by this. The likely case is they glued together other solutions (Like HarfBuzz/FreeType/etc) and expose their own API on top of that. This is perfectly acceptable and even encouraged for accessibility reasons. It may be that CoreText isn't acceptable for their use case.
What I think this would be misinterpreted as them writing the whole stack from scratch. For example, shaping is part of layout and it would be monumental if they wrote their own shaper given even HarfBuzz, DirectWrite, and CoreText do not have complete coverage yet. Additionally, BiDi + line breaking + shaping has bugs even in Chrome on some edge cases.
- earthboundkid 6y agoFor a text editor, why not just drop BiDi? I guess it sucks if you use a BiDi language for your comments, but there’s nothing per se wrong in making a solution that doesn’t work for everyone around the world if it works better for a subset of people.
- monadic2 6y agoYou'd also want BiDi for general-purpose "text" documents like markdown. There are many aspects of text rendering that aren't necessarily relevant here (think: word- and line-breaking) but directionality strikes me as a major feature.
- csande17 6y agoFor what it's worth, I fired up BBEdit (another popular commerical Mac code editor) and pasted in some Arabic text. It didn't behave remotely correctly -- the text shifted around bizarrely as I moved the intertion point. I think it's entirely plausible that Panic also shipped a text-layout system without full bidi support -- maybe that's why theirs is faster and less buggy on LTR text. The left-to-right language market (English, Spanish, French, Russian, Chinese, Japanese, Korean...) is probably big enough to support a Mac app development studio on its own.
- earthboundkid 6y agoMajor feature for who? I don't think saying to Hebrew/Arabic programmers "sorry, this product isn't for you because it would require a large amount of effort and we can't support it" is an unreasonable thing for a small shop to do. Yes, Apple and Microsoft and Gnome should support RTL because it's important for someone to do it, but there's nothing wrong with saying "this product isn't designed to solve all problems in all languages".
- monadic2 6y agoLike you I immediately had disbelief. However to most people assembling a pipeline like the one you indicated is equivalent to a new layout engine.... it struck me as normal to use "from scratch" here.
- mooman219 6y agoThat's fair, the text rabbit hole goes fairly deep and most people aren't aware of the complexities at play. Implementing the glue on its own isn't a trivial task, so the work may have felt like doing it "from scratch". I only took issue with the wording and wanted to be a bit more precise with it on this thread.
- statictype 6y agoI don't think its that big a deal. Its a lot of work, for sure, but I think it's table stakes for writing a good text editor. I'm not sure how many good native text editors don't have their own text editing engine.