Skip to content

Commit 25af017

Browse files
ci_lynxjianliang00
authored andcommitted
[BugFix][tttext] Update the baseline graph after enabling half-leading in tttext.
Because enabling half-leading in tttext will change the layout, the baseline graph needs to be updated. issue: m-6861836019 SkipChecks:cpp-header-path AutoLand: release/3.7
1 parent d34cc44 commit 25af017

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clay/third_party/txt/src/tttext/paragraph_builder_tt_text.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void ParagraphBuilderTTText::ToTTParaStyle(const ParagraphStyle& para_style) {
193193
tt_para_style.EnableTextBounds(para_style.enable_text_bounds);
194194
tt_para_style.SetDefaultStyle(ToTTStyle(text_style));
195195
tt_para_style.SetLineSpaceAfterPx(para_style.line_spacing);
196-
tt_para_style.SetHalfLeading(para_style.strut_half_leading);
196+
tt_para_style.SetHalfLeading(para_style.half_leading);
197197
}
198198
void ParagraphBuilderTTText::CreateParagraph() {
199199
if (paragraph_ == nullptr) {

clay/third_party/txt/src/txt/paragraph_style.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class ParagraphStyle {
8787
double line_spacing = 0.0;
8888
bool strut_has_height_override = false;
8989
bool strut_half_leading = false;
90+
// This is for tttext
91+
bool half_leading = true;
9092
double strut_leading = -1; // Negative to use font's default leading. [0,inf)
9193
// to use custom leading as a ratio of font size.
9294
bool force_strut_height = false;

0 commit comments

Comments
 (0)