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 "include/core/SkFontMgr.h" |
9 | #include "include/ports/SkFontMgr_directory.h" |
10 | |
11 | #ifndef SK_FONT_FILE_PREFIX |
12 | # if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
13 | # define SK_FONT_FILE_PREFIX "/System/Library/Fonts/" |
14 | # else |
15 | # define SK_FONT_FILE_PREFIX "/usr/share/fonts/" |
16 | # endif |
17 | #endif |
18 | |
19 | sk_sp<SkFontMgr> SkFontMgr::Factory() { |
20 | return SkFontMgr_New_Custom_Directory(SK_FONT_FILE_PREFIX); |
21 | } |
22 |