You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chinese text has positive bottom padding and negative top padding, happening on both iOS and Android, thus not possible to vertically center a text #96713
Text should not have such strange padding at bottom.
Actual results:
This is the screenshot when running the app. As we can see, the text has two strange things:
It has non-neglectable bottom paddings.
It has negative top padding.
This is a problem, because with such, we cannot vertically make a text center-aligned. for example, a Center will make the text "box" centered, but due to uneven padding, it will indeed be put higher than expected.
By the way, I have tested it on a iPhone and an android, so it seems not to be a problem of one specific font, but rather something intrinsic.
This is the same issue as #22625 and #19063. According to #35493 The root cause of this is that the ideographic baseline implementation in LibTxt is currently only an approximation (an existing TODO specifies fixing this), and should not be used for sensitive purposes. Check out the links provided above.
Hope this helps.
@ramanjitsingh-hub Sorry it seems that #19063 is closed (and locked) so I guess it is solved by #35493? However, it still has this bug in 2.8.1 flutter.
I think the flutter does not have support for an accurate baseline for ideographic property currently it is just an approximation. Until the support is provided try textBaseline : TextBaseline.ideographic
Hi @fzyzcjy, I believe this issue is because TextBaseline.ideographic is buggy, with TextBaseline.ideographic all text (including non-English characters) is supposed to be above the basline, But it is not the case as of today.
This issue is being tracked here #94680, Would you mind taking a look at the linked issue and verify if fixing it would resolve your issue?
@LongCatIsLooong
Can we really not resolve this issue? This is a very basic and important matter — every app displays text. Yet this problem has persisted from version 2.6 all the way to 3.37, even though libtxt has already been deprecated during this period.
I found that there are many similar issue, first in 2019, and now in 2026. I don't understand why such an obvious problem has taken so long. flutter, as a UI framework, even has problems with text display. It's really disappointing that it hasn't been solved for a long time.
I found that there are many similar issue, first in 2019, and now in 2026. I don't understand why such an obvious problem has taken so long. flutter, as a UI framework, even has problems with text display. It's really disappointing that it hasn't been solved for a long time.
@flutting They put their energy into a series of cool things like AI, but ignore basic text-related issues, whether they are bugs or performance
Activity
ramanjitsingh-hub commentedon Jan 16, 2022
This is the same issue as #22625 and #19063. According to #35493 The root cause of this is that the ideographic baseline implementation in LibTxt is currently only an approximation (an existing TODO specifies fixing this), and should not be used for sensitive purposes. Check out the links provided above.
Hope this helps.
fzyzcjy commentedon Jan 16, 2022
@ramanjitsingh-hub Thank you so much!
fzyzcjy commentedon Jan 16, 2022
@ramanjitsingh-hub Sorry it seems that #19063 is closed (and locked) so I guess it is solved by #35493? However, it still has this bug in 2.8.1 flutter.
fzyzcjy commentedon Jan 16, 2022
/cc @GaryQian @tamcy
ramanjitsingh-hub commentedon Jan 17, 2022
I think the flutter does not have support for an accurate baseline for ideographic property currently it is just an approximation. Until the support is provided try
textBaseline : TextBaseline.ideographicmaheshj01 commentedon Jan 17, 2022
Hi @fzyzcjy, I believe this issue is because
TextBaseline.ideographicis buggy, withTextBaseline.ideographicall text (including non-English characters) is supposed to be above the basline, But it is not the case as of today.This issue is being tracked here #94680, Would you mind taking a look at the linked issue and verify if fixing it would resolve your issue?
fzyzcjy commentedon Jan 17, 2022
@ramanjitsingh-hub Thanks!
@maheshmnj Thanks! Sounds reasonable, but I am not very sure
if fixing it would resolve your issue.Anyway, I wonder when can it be fixed? Can I help?
maheshj01 commentedon Jan 17, 2022
I am able to reproduce a similar output on both stable and the master channel, This could potentially be related to #94680.
code sample
flutter doctor -v
maheshj01 commentedon Jan 17, 2022
@fzyzcjy, We are always looking for contributors, You are welcome to contribute.
28 remaining items
LongCatIsLooong commentedon Sep 7, 2022
I don't see any problem with the text vertical layout here?
Details
Anyways, the half-leading logic can be found here: https://github.com/google/skia/blob/main/modules/skparagraph/src/Run.cpp#L68-L78
fzyzcjy commentedon Sep 7, 2022
@LongCatIsLooong I will recheck it once my local env upgrades to 3.3 to see whether the problem is solved and reply here. Thanks!
fzyzcjy commentedon Sep 17, 2022
flutter 3.3.1 experiment results:
Details
However, the code above yields the wrong results again:
Details
Basically speaking, the experiments above still holds. For example, if I swap the two lines, and do a hot restart
now it works.
But that does not look like a very elegant thing...
fzyzcjy commentedon Sep 17, 2022
I will try to set this config in the theme, so every Text uses this config, and report back here whether it works. Thanks anyway!
BFELFISH commentedon Oct 21, 2022
is there any update
fzyzcjy commentedon Oct 21, 2022
IIRC this seems to work, need more experiments though
tummyhuang commentedon May 27, 2024
mark
Zipper-Code commentedon Jul 3, 2024
As of now, Chinese still cannot be vertically centered on Android. This problem seems to have existed for a long time.

Liloupar commentedon Oct 29, 2025
@LongCatIsLooong
Can we really not resolve this issue? This is a very basic and important matter — every app displays text. Yet this problem has persisted from version 2.6 all the way to 3.37, even though libtxt has already been deprecated during this period.
flutting commentedon Feb 24, 2026
I found that there are many similar issue, first in 2019, and now in 2026. I don't understand why such an obvious problem has taken so long. flutter, as a UI framework, even has problems with text display. It's really disappointing that it hasn't been solved for a long time.
flutting commentedon Feb 24, 2026
Regarding text centering, this is a problem that can be seen by the naked eye, and it will appear everywhere, hoping to be solved.
Liloupar commentedon Feb 24, 2026
@flutting They put their energy into a series of cool things like AI, but ignore basic text-related issues, whether they are bugs or performance
koji-1009 commentedon Jun 19, 2026
#180292 (comment)