ded867f126
also simplify handling of implicit position at end of line. also simplfy move() operation. Change-Id: Ic242b5413c65295b1ac1bf7aa3a4948c3ed1c742 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233303 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
27 lines
645 B
C++
27 lines
645 B
C++
// Copyright 2019 Google LLC.
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "include/core/SkFont.h"
|
|
#include "include/core/SkTextBlob.h"
|
|
|
|
#include <cstddef>
|
|
#include <vector>
|
|
|
|
namespace editor {
|
|
|
|
struct ShapeResult {
|
|
sk_sp<SkTextBlob> blob;
|
|
std::vector<std::size_t> lineBreakOffsets;
|
|
std::vector<SkRect> glyphBounds;
|
|
std::vector<bool> wordBreaks;
|
|
int verticalAdvance;
|
|
};
|
|
|
|
ShapeResult Shape(const char* ut8text,
|
|
size_t textByteLen,
|
|
const SkFont& font,
|
|
const char* locale,
|
|
float width);
|
|
|
|
}
|