mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
[SkParagraph] Convert the height override flag in text styles (#14283)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user