mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix TextStyle decode misalignment (flutter/engine#8141)
This commit is contained in:
parent
3092eb348c
commit
37babafb43
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user