• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
10 namespace SkPlainTextEditor {
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 
26 }  // namespace SkPlainTextEditor
27