This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ skt::ParagraphStyle TxtToSkia(const ParagraphStyle& txt) {
5858 MakeSkFontStyle (txt.strut_font_weight , txt.strut_font_style ));
5959 strut_style.setFontSize (SkDoubleToScalar (txt.strut_font_size ));
6060 strut_style.setHeight (SkDoubleToScalar (txt.strut_height ));
61+ strut_style.setHeightOverride (txt.strut_has_height_override );
6162
6263 std::vector<SkString> strut_fonts;
6364 std::transform (txt.strut_font_families .begin (), txt.strut_font_families .end (),
@@ -154,7 +155,15 @@ void ParagraphBuilderSkia::AddText(const std::u16string& text) {
154155}
155156
156157void ParagraphBuilderSkia::AddPlaceholder (PlaceholderRun& span) {
157- assert (false );
158+ skt::PlaceholderStyle placeholder_style;
159+ placeholder_style.fHeight = span.height ;
160+ placeholder_style.fWidth = span.width ;
161+ placeholder_style.fBaseline = static_cast <skt::TextBaseline>(span.baseline );
162+ placeholder_style.fBaselineOffset = span.baseline_offset ;
163+ placeholder_style.fAlignment =
164+ static_cast <skt::PlaceholderAlignment>(span.alignment );
165+
166+ builder_->addPlaceholder (placeholder_style);
158167}
159168
160169std::unique_ptr<Paragraph> ParagraphBuilderSkia::Build () {
You can’t perform that action at this time.
0 commit comments