aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontHost_win.cpp
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-02-15 10:20:04 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-28 20:14:44 +0000
commit97182cc8f611dd8c05dad6fe99d0e073af10ac2e (patch)
treef21e02e5121728998e6cd13fbb7440936ad22aeb /src/ports/SkFontHost_win.cpp
parenta11bfe5a21af7fe5e92b88b76f533c74684f97d3 (diff)
Add color fonts.
BUG=skia:7624 Change-Id: I68a6bb4c6fa541ffad565d970438d93ff1bd8ed6 Reviewed-on: https://skia-review.googlesource.com/109521 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-on: https://skia-review.googlesource.com/116541 Reviewed-on: https://skia-review.googlesource.com/116984 Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkFontHost_win.cpp')
-rw-r--r--src/ports/SkFontHost_win.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index f0eb7b7d9b..abe1550a01 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -830,6 +830,13 @@ uint16_t SkScalerContext_GDI::generateCharToGlyph(SkUnichar utf32) {
HRZM(ScriptItemize(utf16, numWCHAR, maxItems, &sc, nullptr, si, &numItems),
"Could not itemize character.");
+ // Disable any attempt at shaping.
+ // Without this ScriptShape may return 0x80040200 (USP_E_SCRIPT_NOT_IN_FONT)
+ // when all that is desired here is a simple cmap lookup.
+ for (SCRIPT_ITEM& item : si) {
+ item.a.eScript = SCRIPT_UNDEFINED;
+ }
+
// Sometimes ScriptShape cannot find a glyph for a non-BMP and returns 2 space glyphs.
static const int maxGlyphs = 2;
SCRIPT_VISATTR vsa[maxGlyphs];