Skip to content

CJK font appears upward shifted for ListTile with subtitle #19063

Closed

Description

@tamcy

I am trying to replicate Android's setting screen in Flutter.

flutter_native_setting

I reproduced the last 4 items. Here's how it looks like:

listtile-2

The problem is mainly on the Chinese part. It appears that CJK text appears shifted a little bit downward for single line items. But for items with title and subtitle, CJK text appears upward shifted.

measure_chi

This is also true for English text, albeit less apparent:
measure_eng

Note that I'm not asking for a pixel-perfect alignment (different icon may produce a different visual center). But the Chinese texts in the ListTile does look far too upward to me. And texts in title-only list tiles shifted the opposite direction makes it more disturbing.

Activity

  1. added
    a: typographyText rendering, possibly libtxt
    engineflutter/engine related. See also e: labels.
    on Aug 27, 2018
  2. added this to the milestone on Aug 27, 2018
  3. cbracken commented on Sep 10, 2018

    @cbracken
    Member

    /cc @jason-simmons @GaryQian for thoughts

  4. zoechi commented on Feb 14, 2019

    @zoechi
    Contributor

    @tamcy It's a while since this issue was created and a lot of things have changed.
    Are you still seeing this with master channel?

  5. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 14, 2019
  6. tamcy commented on Feb 15, 2019

    @tamcy
    Author

    Thanks for the news! So I have switched to the master channel (framework rev. 67cf21577f; engine rev. 3757390fa4) and see how the latest ListTile looks like.

    Left/top: MaterialApp locale set to English, with English elements:
    Right/bottom: MaterialApp locale still in English, with Chinese elements:

    First of all, there seems to be a regression - the icon is no longer aligned to the middle of the container when subtitle isn't empty. The texts looks fine though - the spacing is now much closer to the native version.

    (The only issue here is that when the MaterialApp locale is set to English, the Chinese font shown isn't acknowledging the device's fallback chain, nor the order of supportedLocales of the MaterialApp. Here the Simplified Chinese variant is used, although the device is set to Traditional Chinese. And this behavior seems not overridable by the developer. Anyway this is another issue.)

    Now the bad news. When MaterialApp locale is set to Chinese (Traditional), the Chinese text in the ListTile looks like this:

    The situation seems worse, and measurement supports my observation.
    4

    Note that the problem isn't limited to ListTile:
    05

  7. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 15, 2019
  8. GaryQian commented on Mar 11, 2019

    @GaryQian
    Contributor

    I can take a look at this, do you think you can provide a minimal (or full) test app that has the implementation necessary to reproduce this?

  9. tamcy commented on Mar 14, 2019

    @tamcy
    Author

    @GaryQian Sure, the test app can be found here. Thank you!

  10. GaryQian commented on Jul 8, 2019

    @GaryQian
    Contributor

    Should be fixed by #35493

  11. github-actions commented on Aug 15, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: typographyText rendering, possibly libtxtengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions