Hal Canary | ded867f | 2019-08-08 16:16:24 -0400 | [diff] [blame] | 1 | // Copyright 2019 Google LLC. |
| 2 | // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 | |
| 4 | #include "include/core/SkFont.h" |
| 5 | #include "include/core/SkTextBlob.h" |
| 6 | |
| 7 | #include <cstddef> |
| 8 | #include <vector> |
| 9 | |
Hal Canary | a0b66fc | 2019-08-23 10:16:51 -0400 | [diff] [blame] | 10 | namespace SkPlainTextEditor { |
Hal Canary | ded867f | 2019-08-08 16:16:24 -0400 | [diff] [blame] | 11 | |
| 12 | struct ShapeResult { |
| 13 | sk_sp<SkTextBlob> blob; |
| 14 | std::vector<std::size_t> lineBreakOffsets; |
| 15 | std::vector<SkRect> glyphBounds; |
| 16 | std::vector<bool> wordBreaks; |
| 17 | int verticalAdvance; |
| 18 | }; |
| 19 | |
| 20 | ShapeResult Shape(const char* ut8text, |
| 21 | size_t textByteLen, |
| 22 | const SkFont& font, |
| 23 | const char* locale, |
| 24 | float width); |
| 25 | |
John Stiles | a6841be | 2020-08-06 14:11:56 -0400 | [diff] [blame] | 26 | } // namespace SkPlainTextEditor |