blob: f190dbb605fd23487fc703c0e47a2aa32065f074 [file] [log] [blame]
Hal Canaryded867f2019-08-08 16:16:24 -04001// 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 Canarya0b66fc2019-08-23 10:16:51 -040010namespace SkPlainTextEditor {
Hal Canaryded867f2019-08-08 16:16:24 -040011
12struct 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
20ShapeResult Shape(const char* ut8text,
21 size_t textByteLen,
22 const SkFont& font,
23 const char* locale,
24 float width);
25
John Stilesa6841be2020-08-06 14:11:56 -040026} // namespace SkPlainTextEditor