Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Issue 2280053002: Restrict supported font formats in Chrome context (Closed)

Created:
4 years, 3 months ago by drott
Modified:
4 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://chromium.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Restrict supported font formats in Chrome context Chrome's complex text path uses HarfBuzz OpenType glyph lookup functions. These do not support glyph lookup in Type 1 / Postscript fonts and we do not wish to support those in Chrome any longer. In order to avoid matching fonts against Type 1 fonts possible present on Linux installations and exposed through fontconfig, this CL filters those out in Skia's font matching code. This change might not be desirable for all context in which Skia is used, hence making it conditional on a Chrome context define. BUG=skia:5685 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2280053002 Committed: https://skia.googlesource.com/skia/+/358f93de3d16bd3fe5b0d043ea15b59ebc994e86

Patch Set 1 #

Total comments: 4

Patch Set 2 : bungeman@'s review comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
M src/ports/SkFontConfigInterface_direct.cpp View 1 3 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (17 generated)
drott
4 years, 3 months ago (2016-08-26 12:12:56 UTC) #6
bungeman-skia
https://codereview.chromium.org/2280053002/diff/1/gyp/skia_for_chromium_defines.gypi File gyp/skia_for_chromium_defines.gypi (right): https://codereview.chromium.org/2280053002/diff/1/gyp/skia_for_chromium_defines.gypi#newcode17 gyp/skia_for_chromium_defines.gypi:17: 'SK_RESTRICT_FONT_FORMATS_OPENTYPE' This define should live in <chromium>/src/skia/config/SkUserConfig.h or <chromium>/src/skia/BUILD.gn:skia_library_config ...
4 years, 3 months ago (2016-08-26 15:52:37 UTC) #10
drott
Thanks for the review, CL updated. https://codereview.chromium.org/2280053002/diff/1/gyp/skia_for_chromium_defines.gypi File gyp/skia_for_chromium_defines.gypi (right): https://codereview.chromium.org/2280053002/diff/1/gyp/skia_for_chromium_defines.gypi#newcode17 gyp/skia_for_chromium_defines.gypi:17: 'SK_RESTRICT_FONT_FORMATS_OPENTYPE' Define renamed ...
4 years, 3 months ago (2016-08-26 16:19:04 UTC) #16
drott
Could you please add it to the commit queue if it looks okay to you? ...
4 years, 3 months ago (2016-08-26 16:19:46 UTC) #17
bungeman-skia
I can't say that the prospect of artificially limiting the fonts used by Chromium thrills ...
4 years, 3 months ago (2016-08-26 17:07:18 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2280053002/40001
4 years, 3 months ago (2016-08-26 17:07:52 UTC) #22
commit-bot: I haz the power
Committed patchset #2 (id:40001) as https://skia.googlesource.com/skia/+/358f93de3d16bd3fe5b0d043ea15b59ebc994e86
4 years, 3 months ago (2016-08-26 17:08:47 UTC) #24
behdad
lgtm
4 years, 3 months ago (2016-08-31 22:54:53 UTC) #25
drott
4 years, 3 months ago (2016-09-01 07:18:50 UTC) #26
Message was sent while issue was closed.
On 2016/08/26 at 17:07:18, bungeman wrote:
> I can't say that the prospect of artificially limiting the fonts used by
Chromium thrills me, but this code lgtm.

Perhaps some explanations on this. In our code in Chrome in HarfBuzzFace.cpp we
were able to reduce memory consumption quite significantly, we removed an extra
cache and HarfBuzz access the font blob through a zero-copy access now. This
comes at the cost of sacrificing Type 1 fonts, which do not play an important
role in a web context. That's why I feel we're on the right track restricting
font formats. I wouldn't call it artificial, but consciously doing it for the
benefits of lower memory consumption and better maintainability of the Chrome
side code.

Powered by Google App Engine
This is Rietveld 408576698