-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving text rendering #45
Comments
@tdewolff you may also be interested in checking out github.com/npillmayer/gotype/engine/text/textshaping for text rendering using HarfBuzz. In general, I think both you and @npillmayer are working on a similar set of problems (check out https://github.com/npillmayer/gotype) and you may consider getting in touch and discuss how to best collaborate your efforts, where applicable. I feel really happy and grateful to have stumbled on both your work today Taco, and the work of Norbert. You are both a huge source of inspiration as I'm just starting to get into type-setting and reading up on this domain with excitement. Wish you a great start of the summer! With kindness, |
Hi Robin,
hi Taco,
I am well aware of Taco’s great work and integrating Canvas is on my todo-list. I have a quick-and-dirty canvas type in place, which was to be replaced as soon as someone would take it on him/her to implement some Cairo-style functionality in Go. Taco’s project is actually far more comprehensive than I could hope to find.
The Harfbuzz-adapter I wrote is a quick shot, done and „tested“ in a couple of hours. I just wanted to prove that using HB from Go is doable, and it turned out to be fairly straightforward. If someone would be willing to create a standalone module, i.e. a generic HB interface in Go, I think that would be something to benefit the whole Golang community. I know it’s always a hard decision to include non-Go code, but HB is such a well established standard and solves such a huge amount of challenges for more exotic languages, that rolling your one is not really a feasible option. LuaTeX does it (while XeTeX relies on HB), and it’s… complex. There’s a project by grisha (https://github.com/grisha/hbshape) as a possible starting point.
Currently I’m not working on the output layer, but rather concentrate on the higher abstraction layers: HTML/CSS layout, Unicode annexes / text layout, etc. I’ll re-visit the output layer later this year, I guess.
That said, thanks for pointing me to Taco and Canvas, Robin! You’re right, canvas and gotype (not the final name) are complementing projects. Taco is obviously high-energy on his OpenSource projects, while I’m pursuing a more chilled out stop-and-go approach, but nevertheless I am looking forward to rebase my output layer onto Canvas.
All the best,
—Norbert
… Am 24.05.2020 um 01:25 schrieb Robin Eklind ***@***.***>:
Instead of reinventing the wheel, we should be using existing solutions. Especially important to me is using HarfBuzz for text shaping (rendering glyphs correctly in all languages, such as direction, accents, kerning, etc.). See https://github.com/grisha/hbshape for an example of a port.
@tdewolff you may also be interested in checking out github.com/npillmayer/gotype/engine/text/textshaping for text rendering using HarfBuzz.
In general, I think both you and @npillmayer are working on a similar set of problems and you may consider getting in touch and discuss how to best collaborate your efforts, where applicable. I feel really happy and grateful to have stumbled on both your work today Taco, and the work of Norbert. You are both a huge source of inspiration as I'm just starting to get into type-setting and reading up on this domain with excitement.
Wish you a great start of the summer!
With kindness,
Robin Eklind
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@mewmew Thank you for bringing this up! The @npillmayer Nice work on I might seem high-energy on my open source projects, but I'm pretty much balancing between a job and relationship too ;-), though the quarantaine has given me extra time I'd otherwise spend socializing haha. Though I really need more hands on Keep it up! |
More than happy to :)
@tdewolff, for bidi you may also look into golang.org/x/text/unicode/bidi. It seems bidi.ReverseString could be used in place of the |
I've gone ahead and implemented bindings for HarfBuzz and FriBidi, based on the implementation from @npillmayer, thanks a lot! It's currently in the |
Very exciting to follow this development! Glad you both continue to facilitate and build upon each others work :) |
Instead of reinventing the wheel, we should be using existing solutions. Especially important to me is using HarfBuzz for text shaping (rendering glyphs correctly in all languages, such as direction, accents, kerning, etc.). See https://github.com/grisha/hbshape for an example of a port.
See https://harfbuzz.github.io/ch01s03.html for what HarfBuzz does, and https://harfbuzz.github.io/what-harfbuzz-doesnt-do.html for what it doesn't do. The latter is what we need to implement here:
For an example see https://github.com/anoek/ex-sdl-cairo-freetype-harfbuzz/. (NB: they don't use FreeType for rasterization?)
Additionally, but with less priority, I'd like to support the TCC file format (how does that pan out with
fc-match
?). And finally I'd like to support OpenGL rendering using Blinn and Loop algorithm or something similar (see https://lambdacube3d.wordpress.com/2014/11/12/playing-around-with-font-rendering/ as well). This needs proper tesselation of paths which is not that trivial. Low priority.The text was updated successfully, but these errors were encountered: