From 82497f9300432375cb9fd0e0ceca011ea7dce847 Mon Sep 17 00:00:00 2001 From: kulshin Date: Fri, 15 Apr 2016 08:20:46 -0700 Subject: Add option to specify font fallback when creating the skia font manager This originally existed as https://codereview.chromium.org/1740533003/, but then got reverted for causing perf problems at startup. This change avoids that by allowing callers to specify their own font fallback, and only uses the system fallback if a fallback is needed and none was provided. This is part 1 of a three part change. 1: https://codereview.chromium.org/1878843002/ Adds support for specifying a font fallback in skia 2: https://codereview.chromium.org/1846433005/ Implements the fallback proxy in Chromium 3: https://codereview.chromium.org/1883483002/ Adds code to blink to call skia's fallback API GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878843002 Review URL: https://codereview.chromium.org/1878843002 --- include/ports/SkTypeface_win.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/ports') diff --git a/include/ports/SkTypeface_win.h b/include/ports/SkTypeface_win.h index da728ca3c0..e18ed93341 100644 --- a/include/ports/SkTypeface_win.h +++ b/include/ports/SkTypeface_win.h @@ -41,10 +41,14 @@ class SkFontMgr; class SkRemotableFontMgr; struct IDWriteFactory; struct IDWriteFontCollection; +struct IDWriteFontFallback; SK_API SkFontMgr* SkFontMgr_New_GDI(); SK_API SkFontMgr* SkFontMgr_New_DirectWrite(IDWriteFactory* factory = NULL, IDWriteFontCollection* collection = NULL); +SK_API SkFontMgr* SkFontMgr_New_DirectWrite(IDWriteFactory* factory, + IDWriteFontCollection* collection, + IDWriteFontFallback* fallback); /** * Creates an SkFontMgr which renders using DirectWrite and obtains its data -- cgit v1.2.3