-
Notifications
You must be signed in to change notification settings - Fork 45
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
Harfbuzz #224
Comments
Is it possible to integrate with our crengine repository? |
I suspect that we haven't really touched the affected parts of lvfntman.cpp/h but I haven't checked yet. See #122 (comment) for how to do that in a couple of minutes. However, in our case it would require more involved changes in the koreader-base repo as well for it to actually build. But with any luck those commits will just integrate with no or minimal effort. |
I did a bit in https://github.com/koreader/crengine/pull/212/files#diff-39c6d98ff2d0122472cff214e1510f8b . So that handling of soft-hyphens would need to be removed and put back after that patch. Is that stuff all about and only kerning? That kind of ffff or ligature stuff? Anyway, the most fun will be for you FOC (Friends of Cmake) (I can of course help with the crengine parts). |
Much of the time that crengine looks a bit blah, as if you were looking at something on a computer screen even though E Ink can look as good as cheap newspaper, it's kerning and spacing related. So I'm inclined to think it could be potentially huge in the short term. In the potential long term, Harfbuzz (or something like it) is what you need for RTL. |
A few notes, things met while trying to understand what harfbuzz is. https://harfbuzz.github.io/hello-harfbuzz.html simple usage and what it doesn't do https://sourceforge.net/projects/freetype/files/freetype2/2.5.3/ https://github.com/ArtifexSoftware/mupdf/blob/master/source/fitz/harfbuzz.c |
I love this ligature thing so much :) It's good for "readability" |
Also needs buggins/coolreader#29 |
I had a try with upstream 24+29, which applied almost ok, but we'll have to make it a toggable. Font Bitter, No Harfbuzz, with Font hinting auto: Font Bitter, No Harfbuzz, with Font hinting off (nearly the same with native): Bigger font size, Font Bitter, No Harfbuzz, with Font hinting auto: Bigger font size, Font Bitter, No Harfbuzz, with Font hinting off: I'm personally not really sensitive to font rendering details. But I just felt it got worse with harfbuzz than without when using font hinting auto. Had to switch to font hinting off (or native) to get something correct. Anyway, that was some home made build. In
So, if there's some interest for this harfbuzz rendering (that I can't appreciate :), it would be nice if @NiLuJe or @Frenzie could take over the base build of harfbuzz, because I don't want to start hating CMake as much as you do :) |
FT itself can use HB to do... stuff... with it for the auto-hinter. I'm not quite sure to what extent, and if that even applies to Latin scripts at all.
Which gets tricky because there's a circular dependency: HB unconditionally needs FT to build, and FT optionally needs HB ;). Quick question about your tests: does Bitter actually have decent GPOS kerning tables? |
No idea :| (but I was using the .otf versions). Tried a few others (Noto, FreeSerif, Caecilia) and saw nothing much more striking, so went back to a font I'm confortable with. |
@poire-z could you share your homemade built ? |
Dunno if it will work if you just drop them in your |
tx ! |
The other repo has a ticket about the performance thing you noticed now:
|
Hi everyone. When enabling it I come across a lot of "concatenated" words (some words are displayed glued together); did some of you experienced this issue ? |
Yes, side-effect of using unhinted metrics with non-unhinted rendering. Unfortunately, doing it "right" (or something resembling right) is hard & expensive. Currently, the only way you might get typographically sane results is when combining it with disabled font hinting, too. Results vary heavily depending on the exact font, font size & DPI. Sometimes doing it wrong looks appealing ;). |
Could I get it right by editing the font ? |
Nope. |
Do. Want.
(not spamming the other repo)
It looks amazingly uninvolved at a quick glance. (The PR is gigantic, but most of that is just harfbuzz itself.)
The text was updated successfully, but these errors were encountered: