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