diff options
author | bungeman <bungeman@google.com> | 2014-10-23 07:08:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-23 07:08:06 -0700 |
commit | c20386e3937d3d398ac9b35f9c7d997e972ade98 (patch) | |
tree | a8c66e05bad1508b43b2689edf3773b2b9f34595 /gm/fontmgr.cpp | |
parent | 7fdffe41494cbd78a8ee2a6ef0509e46ec77039f (diff) |
Update fontMgr to take list of bcp47 language tags.
This will enable clients to pass more than one bcp47 tag to ensure
that the most appropriate font is selected.
BUG=chromium:422180
Review URL: https://codereview.chromium.org/670243002
Diffstat (limited to 'gm/fontmgr.cpp')
-rw-r--r-- | gm/fontmgr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp index a1e7ff2a68..be2b11a272 100644 --- a/gm/fontmgr.cpp +++ b/gm/fontmgr.cpp @@ -38,7 +38,11 @@ static SkScalar drawCharacter(SkCanvas* canvas, uint32_t character, SkScalar x, // find typeface containing the requested character and draw it SkString ch; ch.appendUnichar(character); +#ifdef SK_FM_NEW_MATCH_FAMILY_STYLE_CHARACTER + SkTypeface* typeface = fm->matchFamilyStyleCharacter(fontName, fontStyle, &bpc47, 1, character); +#else SkTypeface* typeface = fm->matchFamilyStyleCharacter(fontName, fontStyle, bpc47, character); +#endif SkSafeUnref(paint.setTypeface(typeface)); x = drawString(canvas, ch, x, y, paint) + 20; |