Ligatures cause baseline shift with Roboto Slab |
|||||||||||
Issue descriptionUse a contenteditable with Robot Slab on Linux, type in a ligature, such as "fi". Expected: Ligature should have same baseline as surrounding text. Actual: Ligature shifts slightly below.
,
Jun 3 2016
Screenshot?
,
Jun 3 2016
Might be that the FreeType in use is not built with HarfBuzz, so does not detect ligatures for the purpose of autohinting.
,
Jun 6 2016
Screenshot and video attached.
,
Jun 10 2016
Perhaps related to issue 550523 where the crossbars of T's do not line up?
,
Jun 10 2016
Yeah, looks like what I said: FreeType compiled without HarfBuzz support enabled.
,
Jun 13 2016
Not reproducible on Mac. So this probably means that we should statically link Freetype, in that sense related to issue 555855 (Freetype linkage issues). What is the interface that Freetype provides and which is affecting this positioning issue? Could you explain a bit more? Thanks.
,
Jun 13 2016
Dominik: FreeType's autohinter adjusts glyph outlines to be pixel-aligned, to achieve higher contrast. When compiled without harfbuzz support, freetype will only detect the default glyphs for Latin characters as belonging to the Latin writing system, and it will only autohint those according to the Latin rules. When compiled *with* harfbuzz, FreeType will also detect ligatures made from Latin glyphs as being Latin themselves, and as such will adjust those glyphs as well. Now, a question I cannot seem to answer is why is the baseline not pixel-aligned to begin with. Is Skia trying to do subpixel-positioning in the y direction? If yes, we probably should turn that off.
,
Jul 6 2016
,
Dec 20 2016
,
Jan 27 2017
I believe I have found a way to fix our linking dependencies so that I can activate "FT_CONFIG_OPTION_USE_HARFBUZZ" and solve this. Work in progress together with issue 274030 .
,
Jan 27 2017
,
May 8 2017
Issue 550523 has been merged into this issue.
,
May 10 2017
Fix proposal up in https://codereview.chromium.org/2872333002
,
May 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a377e3e1fa4f44a58f70abb2402e6cc79e210945 commit a377e3e1fa4f44a58f70abb2402e6cc79e210945 Author: drott <drott@chromium.org> Date: Fri May 12 11:51:13 2017 Build FreeType with HarfBuzz support FreeType's autohinter uses HarfBuzz API to collect additional GSUB and GPOS mappings to detect ligatures that should be aligned by the autohinter. Previously we were not able to build FreeType with HarfBuzz support because of the cyclic dependency. This CL resolves the cyclic dependency by building a bootstrap FreeType in order to build HarfBuzz' hb_ft_* functions as a static library called harfbuzz-ng-ft. Then we build harfbuzz-ng separately (which does not depend on FreeType), then we build FreeType depending on harfbuzz-ng and harfbuzz-ng-ft. This resolves issues with fi and ffi ligatures in Roboto looking like they were shifted to a different baseline. I tried developing a pixel test for this, which works if I force usage of the FreeType autohinter through SkPaint::kSlight_Hinting, however we are currently unable to automatically test this since our Linux layout tests do not exercise the autohinting code and do not set this hinting mode, probably due to the special fontconfig settings that we are using for the layout tests. Manually verifying the Roboto ligatures however confirms that this works. BUG= 617168 Review-Url: https://codereview.chromium.org/2871133004 Cr-Commit-Position: refs/heads/master@{#471277} [modify] https://crrev.com/a377e3e1fa4f44a58f70abb2402e6cc79e210945/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/a377e3e1fa4f44a58f70abb2402e6cc79e210945/third_party/freetype/BUILD.gn [modify] https://crrev.com/a377e3e1fa4f44a58f70abb2402e6cc79e210945/third_party/freetype/include/freetype-custom-config/ftoption.h [modify] https://crrev.com/a377e3e1fa4f44a58f70abb2402e6cc79e210945/third_party/harfbuzz-ng/BUILD.gn [add] https://crrev.com/a377e3e1fa4f44a58f70abb2402e6cc79e210945/third_party/harfbuzz-ng/harfbuzz.gni
,
May 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1cb9dbb9320b482a1f9774a579d5d85e0b146a47 commit 1cb9dbb9320b482a1f9774a579d5d85e0b146a47 Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org> Date: Fri May 12 13:31:12 2017 Auto-rebaseline for r471277 Build: https://build.chromium.org/p/chromium.infra.cron/builders/rebaseline-o-matic/builds/688905 https://chromium.googlesource.com/chromium/src/+/a377e3e1fa4f4 BUG= 617168 TBR=drott@chromium.org Review-Url: https://codereview.chromium.org/2877803004 . Cr-Commit-Position: refs/heads/master@{#471295} [modify] https://crrev.com/1cb9dbb9320b482a1f9774a579d5d85e0b146a47/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/1cb9dbb9320b482a1f9774a579d5d85e0b146a47/third_party/WebKit/LayoutTests/platform/linux/fast/text/shaping/same-script-different-lang-expected.png
,
May 12 2017
For Linux, this is now fixed, and as the bug report was about Linux, I'll close it. There is probably a remaining issue on ChromeOS on low resolution displays, filed that as issue 721750 . But this would need to be fixed on the ChromeOS side as it has its own system for building FreeType and HarfBuzz as system libraries through emerge.
,
May 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/149eb6a66fc6ff7d67627cf8305f833ae50b9b66 commit 149eb6a66fc6ff7d67627cf8305f833ae50b9b66 Author: drott <drott@chromium.org> Date: Fri May 12 14:50:51 2017 Revert of Build FreeType with HarfBuzz support (patchset #7 id:110001 of https://codereview.chromium.org/2871133004/ ) Reason for revert: Speculative revert for possibly fixing Linux builder compile failure which lead to tree closure https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Linux%20x64/builds/17727 Original issue's description: > Build FreeType with HarfBuzz support > > FreeType's autohinter uses HarfBuzz API to collect additional GSUB and > GPOS mappings to detect ligatures that should be aligned by the > autohinter. Previously we were not able to build FreeType with HarfBuzz > support because of the cyclic dependency. This CL resolves the cyclic > dependency by building a bootstrap FreeType in order to build HarfBuzz' > hb_ft_* functions as a static library called harfbuzz-ng-ft. Then we > build harfbuzz-ng separately (which does not depend on FreeType), then > we build FreeType depending on harfbuzz-ng and harfbuzz-ng-ft. > > This resolves issues with fi and ffi ligatures in Roboto looking like > they were shifted to a different baseline. > > I tried developing a pixel test for this, which works if I force usage > of the FreeType autohinter through SkPaint::kSlight_Hinting, however we > are currently unable to automatically test this since our Linux layout > tests do not exercise the autohinting code and do not set this hinting > mode, probably due to the special fontconfig settings that we are using > for the layout tests. Manually verifying the Roboto ligatures however > confirms that this works. > > BUG= 617168 > > Review-Url: https://codereview.chromium.org/2871133004 > Cr-Commit-Position: refs/heads/master@{#471277} > Committed: https://chromium.googlesource.com/chromium/src/+/a377e3e1fa4f44a58f70abb2402e6cc79e210945 TBR=behdad@chromium.org,dpranke@chromium.org,peter@chromium.org,machenbach@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 617168 Review-Url: https://codereview.chromium.org/2879843003 Cr-Commit-Position: refs/heads/master@{#471298} [modify] https://crrev.com/149eb6a66fc6ff7d67627cf8305f833ae50b9b66/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/149eb6a66fc6ff7d67627cf8305f833ae50b9b66/third_party/freetype/BUILD.gn [modify] https://crrev.com/149eb6a66fc6ff7d67627cf8305f833ae50b9b66/third_party/freetype/include/freetype-custom-config/ftoption.h [modify] https://crrev.com/149eb6a66fc6ff7d67627cf8305f833ae50b9b66/third_party/harfbuzz-ng/BUILD.gn [delete] https://crrev.com/a66d812aa78debb856c1938f439e98feabeaeada/third_party/harfbuzz-ng/harfbuzz.gni
,
May 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d8f5db6000c89da2f5d06ef091f5431bd5ef1216 commit d8f5db6000c89da2f5d06ef091f5431bd5ef1216 Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org> Date: Fri May 12 16:07:21 2017 Auto-rebaseline for r471298 Build: https://build.chromium.org/p/chromium.infra.cron/builders/rebaseline-o-matic/builds/689004 https://chromium.googlesource.com/chromium/src/+/149eb6a66fc6f BUG= 617168 TBR=drott@chromium.org Review-Url: https://codereview.chromium.org/2882483003 . Cr-Commit-Position: refs/heads/master@{#471323} [modify] https://crrev.com/d8f5db6000c89da2f5d06ef091f5431bd5ef1216/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/d8f5db6000c89da2f5d06ef091f5431bd5ef1216/third_party/WebKit/LayoutTests/platform/linux/fast/text/shaping/same-script-different-lang-expected.png
,
May 16 2017
Reopening due to the revert, new CL up for review in https://codereview.chromium.org/2880223002
,
May 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fbec38011870753cffb3cb2ff98aa0c00c63b25c commit fbec38011870753cffb3cb2ff98aa0c00c63b25c Author: drott <drott@chromium.org> Date: Wed May 17 10:49:03 2017 Reland: Compile FreeType with HarfBuzz support FreeType's autohinter uses HarfBuzz API to collect additional GSUB and GPOS mappings to detect ligatures that should be aligned by the autohinter. Previously we were not able to build FreeType with HarfBuzz support because of the cyclic dependency. This CL resolves the cyclic dependency by building a bootstrap FreeType in order to build HarfBuzz' hb_ft_* functions as a static library called harfbuzz-ng-ft. Then we build harfbuzz-ng separately (which does not depend on FreeType), then we build FreeType depending on harfbuzz-ng and harfbuzz-ng-ft. This CL also removes the previous pangoft2 link hack since the :harfbuzz-ng target now brings all symbols required by pangoft2. This resolves issues with fi and ffi ligatures in Roboto looking like they were shifted to a different baseline. I tried developing a pixel test for this, which works if I force usage of the FreeType autohinter through SkPaint::kSlight_Hinting, however we are currently unable to automatically test this since our Linux layout tests do not exercise the autohinting code and do not set this hinting mode, probably due to the special fontconfig settings that we are using for the layout tests. Manually verifying the Roboto ligatures however confirms that this works. Reland after revert in https://codereview.chromium.org/2879843003/ BUG= 617168 Review-Url: https://codereview.chromium.org/2880223002 Cr-Commit-Position: refs/heads/master@{#472413} [modify] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/build/config/freetype/BUILD.gn [add] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/build/config/freetype/freetype.gni [modify] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/chrome/browser/ui/libgtkui/BUILD.gn [modify] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/remoting/host/it2me/BUILD.gn [modify] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/third_party/freetype/BUILD.gn [modify] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/third_party/freetype/include/freetype-custom-config/ftoption.h [modify] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/third_party/harfbuzz-ng/BUILD.gn [add] https://crrev.com/fbec38011870753cffb3cb2ff98aa0c00c63b25c/third_party/harfbuzz-ng/harfbuzz.gni
,
May 17 2017
,
May 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9f7c63b2876bc23a75c29c107dba98ba61e23fd0 commit 9f7c63b2876bc23a75c29c107dba98ba61e23fd0 Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org> Date: Wed May 17 12:41:01 2017 Auto-rebaseline for r472413 Build: https://build.chromium.org/p/chromium.infra.cron/builders/rebaseline-o-matic/builds/693399 https://chromium.googlesource.com/chromium/src/+/fbec380118707 BUG= 617168 TBR=drott@chromium.org Review-Url: https://codereview.chromium.org/2887803003 . Cr-Commit-Position: refs/heads/master@{#472432} [modify] https://crrev.com/9f7c63b2876bc23a75c29c107dba98ba61e23fd0/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/9f7c63b2876bc23a75c29c107dba98ba61e23fd0/third_party/WebKit/LayoutTests/platform/linux/fast/text/shaping/same-script-different-lang-expected.png |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by drott@chromium.org
, Jun 3 2016Labels: OS-All
Status: Available (was: Untriaged)