forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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}
- Loading branch information
Showing
9 changed files
with
159 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
declare_args() { | ||
# Blink needs a recent and properly build-configured FreeType version to | ||
# support OpenType variations, color emoji and avoid security bugs. By default | ||
# we ship and link such a version as part of Chrome. For distributions that | ||
# prefer to keep linking to the version the system, FreeType must be newer | ||
# than version 2.7.1 and have color bitmap support compiled in. WARNING: | ||
# System FreeType configurations other than as described WILL INTRODUCE TEXT | ||
# RENDERING AND SECURITY REGRESSIONS. | ||
use_system_freetype = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
declare_args() { | ||
# Blink uses a cutting-edge version of Harfbuzz; most Linux distros do not | ||
# contain a new enough version of the code to work correctly. However, | ||
# ChromeOS chroots (i.e, real ChromeOS builds for devices) do contain a | ||
# new enough version of the library, and so this variable exists so that | ||
# ChromeOS can build against the system lib and keep binary sizes smaller. | ||
use_system_harfbuzz = false | ||
} |