9#include "third_party/skia/include/core/SkString.h"
10#include "third_party/skia/modules/skparagraph/include/Paragraph.h"
14 auto style =
new skia::textlayout::StrutStyle();
15 style->setStrutEnabled(
true);
25 skia::textlayout::StrutStyle* style,
26 SkString** font_families,
28 std::vector<SkString> families;
29 families.reserve(count);
30 for (
int i = 0;
i < count;
i++) {
31 families.push_back(*font_families[
i]);
33 style->setFontFamilies(std::move(families));
44 style->setHeightOverride(
true);
48 skia::textlayout::StrutStyle* style,
50 style->setHalfLeading(half_leading);
55 style->setLeading(leading);
60 SkFontStyle::Slant slant) {
61 style->setFontStyle(SkFontStyle(weight, SkFontStyle::kNormal_Width, slant));
65 skia::textlayout::StrutStyle* style,
66 bool force_strut_height) {
67 style->setForceStrutHeight(force_strut_height);
uint32_t live_strut_style_count
SKWASM_EXPORT void strutStyle_setFontStyle(skia::textlayout::StrutStyle *style, int weight, SkFontStyle::Slant slant)
SKWASM_EXPORT void strutStyle_dispose(skia::textlayout::StrutStyle *style)
SKWASM_EXPORT void strutStyle_setForceStrutHeight(skia::textlayout::StrutStyle *style, bool force_strut_height)
SKWASM_EXPORT void strutStyle_setFontFamilies(skia::textlayout::StrutStyle *style, SkString **font_families, int count)
SKWASM_EXPORT void strutStyle_setHeight(skia::textlayout::StrutStyle *style, SkScalar height)
SKWASM_EXPORT void strutStyle_setFontSize(skia::textlayout::StrutStyle *style, SkScalar font_size)
SKWASM_EXPORT skia::textlayout::StrutStyle * strutStyle_create()
SKWASM_EXPORT void strutStyle_setLeading(skia::textlayout::StrutStyle *style, SkScalar leading)
SKWASM_EXPORT void strutStyle_setHalfLeading(skia::textlayout::StrutStyle *style, bool half_leading)