xref: /aosp_15_r20/external/skia/modules/skshaper/include/SkShaper_harfbuzz.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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 SkShaper_harfbuzz_DEFINED
9 #define SkShaper_harfbuzz_DEFINED
10 
11 #include "include/core/SkFourByteTag.h"
12 #include "include/core/SkRefCnt.h"
13 #include "include/core/SkTypes.h"
14 #include "modules/skshaper/include/SkShaper.h"
15 
16 #include <cstddef>
17 #include <memory>
18 
19 class SkFontMgr;
20 class SkUnicode;
21 
22 namespace SkShapers::HB {
23 SKSHAPER_API std::unique_ptr<SkShaper> ShaperDrivenWrapper(sk_sp<SkUnicode> unicode,
24                                                            sk_sp<SkFontMgr> fallback);
25 SKSHAPER_API std::unique_ptr<SkShaper> ShapeThenWrap(sk_sp<SkUnicode> unicode,
26                                                      sk_sp<SkFontMgr> fallback);
27 SKSHAPER_API std::unique_ptr<SkShaper> ShapeDontWrapOrReorder(sk_sp<SkUnicode> unicode,
28                                                               sk_sp<SkFontMgr> fallback);
29 
30 SKSHAPER_API std::unique_ptr<SkShaper::ScriptRunIterator> ScriptRunIterator(const char* utf8,
31                                                                             size_t utf8Bytes);
32 SKSHAPER_API std::unique_ptr<SkShaper::ScriptRunIterator> ScriptRunIterator(const char* utf8,
33                                                                             size_t utf8Bytes,
34                                                                             SkFourByteTag script);
35 
36 SKSHAPER_API void PurgeCaches();
37 }  // namespace SkShapers::HB
38 
39 #endif
40