未验证 提交 073aadde 编写于 作者: G Gary Qian 提交者: GitHub

Fix TextStyle decode misalignment (#8141)

上级 d87d2905
......@@ -297,21 +297,21 @@ Int32List _encodeTextStyle(
result[0] |= 1 << 4;
result[4] = decorationStyle.index;
}
if (decorationThickness != null) {
result[0] |= 1 << 5;
}
if (fontWeight != null) {
result[0] |= 1 << 6;
result[0] |= 1 << 5;
result[5] = fontWeight.index;
}
if (fontStyle != null) {
result[0] |= 1 << 7;
result[0] |= 1 << 6;
result[6] = fontStyle.index;
}
if (textBaseline != null) {
result[0] |= 1 << 8;
result[0] |= 1 << 7;
result[7] = textBaseline.index;
}
if (decorationThickness != null) {
result[0] |= 1 << 8;
}
if (fontFamily != null || (fontFamilyFallback != null && fontFamilyFallback.isNotEmpty)) {
result[0] |= 1 << 9;
// Passed separately to native.
......
......@@ -33,10 +33,10 @@ const int tsColorIndex = 1;
const int tsTextDecorationIndex = 2;
const int tsTextDecorationColorIndex = 3;
const int tsTextDecorationStyleIndex = 4;
const int tsTextDecorationThicknessIndex = 5;
const int tsFontWeightIndex = 6;
const int tsFontStyleIndex = 7;
const int tsTextBaselineIndex = 8;
const int tsFontWeightIndex = 5;
const int tsFontStyleIndex = 6;
const int tsTextBaselineIndex = 7;
const int tsTextDecorationThicknessIndex = 8;
const int tsFontFamilyIndex = 9;
const int tsFontSizeIndex = 10;
const int tsLetterSpacingIndex = 11;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册