bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "SkFontMgr.h" |
| 9 | |
| 10 | struct SkEmbeddedResource { const uint8_t* data; size_t size; }; |
| 11 | struct SkEmbeddedResourceHeader { const SkEmbeddedResource* entries; int count; }; |
Ben Wagner | 3546ff1 | 2017-01-03 13:32:36 -0500 | [diff] [blame] | 12 | sk_sp<SkFontMgr> SkFontMgr_New_Custom_Embedded(const SkEmbeddedResourceHeader* header); |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 13 | |
| 14 | extern "C" const SkEmbeddedResourceHeader SK_EMBEDDED_FONTS; |
Ben Wagner | 3546ff1 | 2017-01-03 13:32:36 -0500 | [diff] [blame] | 15 | sk_sp<SkFontMgr> SkFontMgr::Factory() { |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 16 | return SkFontMgr_New_Custom_Embedded(&SK_EMBEDDED_FONTS); |
| 17 | } |