Restrict supported font formats in Chrome context
authordrott <drott@chromium.org>
Fri, 26 Aug 2016 17:08:45 +0000 (10:08 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Aug 2016 17:08:45 +0000 (10:08 -0700)
commit358f93de3d16bd3fe5b0d043ea15b59ebc994e86
treed9b8dd7c431ac069aeda9869eff8322a4f27b691
parent55713afb7a531bbb6a345a42b5a25ad709d8fd19
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

Review-Url: https://codereview.chromium.org/2280053002
src/ports/SkFontConfigInterface_direct.cpp