| 1 |
/* |
| 2 |
* Copyright 2024 Google LLC. |
| 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 |
#ifndef SkFontMgr_android_ndk_DEFINED |
| 9 |
#define SkFontMgr_android_ndk_DEFINED |
| 10 |
|
| 11 |
#include "include/core/SkRefCnt.h" |
| 12 |
#include "include/core/SkTypes.h" |
| 13 |
|
| 14 |
#include <memory> |
| 15 |
|
| 16 |
class SkFontMgr; |
| 17 |
class SkFontScanner; |
| 18 |
|
| 19 |
/** Create a font manager for Android NDK. May return nullptr if unavailable (API < 29). |
| 20 |
|
| 21 |
The Android NDK Font API only works correctly in an Android Application process. |
| 22 |
If running in a bare executable (for testing or the like) it will use the legacy fonts.xml data. |
| 23 |
*/ |
| 24 |
SK_API sk_sp<SkFontMgr> SkFontMgr_New_AndroidNDK(bool cacheFontFiles, |
| 25 |
std::unique_ptr<SkFontScanner> scanner); |
| 26 |
|
| 27 |
#endif // SkFontMgr_android_ndk_DEFINED |