Chromium Code Reviews| Index: build/config/freetype/BUILD.gn |
| diff --git a/build/config/freetype/BUILD.gn b/build/config/freetype/BUILD.gn |
| index 976661a7cb84a80ee949f141fc95efdf711a20d1..95c8d7bf80d98470cfdd012609c85c9b01fe0a05 100644 |
| --- a/build/config/freetype/BUILD.gn |
| +++ b/build/config/freetype/BUILD.gn |
| @@ -3,24 +3,38 @@ |
| # found in the LICENSE file. |
| import("//build/config/features.gni") |
| +import("//build/config/freetype/freetype.gni") |
| +import("//build/config/ui.gni") |
| +import("//build/config/ui.gni") |
|
bungeman-chromium
2017/05/10 16:45:33
This line is here twice?
|
| +import("//third_party/harfbuzz-ng/harfbuzz.gni") |
| -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 |
| +# Only to be used as an intermediate target to resolve the cyclic dependency |
| +# between FreeType and Harfbuzz in HarfBuzz' BUILD.gn |
| +group("freetype-without-harfbuzz") { |
| + if (use_system_freetype) { |
| + public_configs = [ "//build/linux:freetype_from_pkgconfig" ] |
| + } else { |
| + public_deps = [ |
| + "//third_party/freetype", |
| + ] |
| + } |
| } |
| +# Maybe switch name and reduce diff-size by calling the previous target |
| +# something like freetype2-intermediate or so, and this one - as before - |
| +# freetype2. |
| group("freetype") { |
| if (use_system_freetype) { |
| public_configs = [ "//build/linux:freetype_from_pkgconfig" ] |
| } else { |
| public_deps = [ |
| - "//third_party/freetype", |
| + # HarfBuzz dependency needed in order for FreeType autohinting to detect |
| + # ligatures and other OpenType mappings. |
| + ":freetype-without-harfbuzz", |
| + "//third_party/harfbuzz-ng:harfbuzz-ng", |
| ] |
| + if (is_linux && use_pango && !use_system_harfbuzz) { |
| + public_deps += [ "//third_party/harfbuzz-ng:harfbuzz-ng-ft" ] |
| + } |
| } |
| } |