[SkParagraph] Convert the height override flag in text styles (#14283)

This commit is contained in:
Jason Simmons
2019-12-10 13:40:54 -08:00
committed by GitHub
parent b7c947df5d
commit 76d264ee71
+2
View File
@@ -49,6 +49,7 @@ skt::ParagraphStyle TxtToSkia(const ParagraphStyle& txt) {
text_style.setFontStyle(MakeSkFontStyle(txt.font_weight, txt.font_style));
text_style.setFontSize(SkDoubleToScalar(txt.font_size));
text_style.setHeight(SkDoubleToScalar(txt.height));
text_style.setHeightOverride(txt.has_height_override);
text_style.setFontFamilies({SkString(txt.font_family.c_str())});
text_style.setLocale(SkString(txt.locale.c_str()));
skia.setTextStyle(text_style);
@@ -103,6 +104,7 @@ skt::TextStyle TxtToSkia(const TextStyle& txt) {
skia.setLetterSpacing(SkDoubleToScalar(txt.letter_spacing));
skia.setWordSpacing(SkDoubleToScalar(txt.word_spacing));
skia.setHeight(SkDoubleToScalar(txt.height));
skia.setHeightOverride(txt.has_height_override);
skia.setLocale(SkString(txt.locale.c_str()));
if (txt.has_background) {