Skip to content

chinese font display not well on nexus 5x #18665

Description

@keluokeda

in Meizu
f57c0af8b4619c844078e60ea6ae21de

in nexus 5x
2018-06-21 2 22 07

flutter doctor

[✓] Flutter (Channel master, v0.5.6-pre.39, on Mac OS X 10.13.5 17F77, locale zh-Hans-CN)
    • Flutter version 0.5.6-pre.39 at /Users/yuyanhui/Desktop/flutter/flutter
    • Framework revision a18f5e84a1 (8 hours ago), 2018-06-20 20:23:51 -0400
    • Engine revision 549c855e89
    • Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/yuyanhui/Library/Android/sdk
    • Android NDK at /Users/yuyanhui/Library/Android/sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.0

[✓] Android Studio
    • Android Studio at /Applications/Android Studio 3.2 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b02)

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 25.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[!] IntelliJ IDEA Ultimate Edition (version 2018.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[!] VS Code (version 1.23.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected devices
    ! No devices available

! Doctor found issues in 4 categories.

Activity

  1. zoechi commented on Jun 21, 2018

    @zoechi
    Contributor
  2. tamcy commented on Jul 6, 2018

    @tamcy

    The issue is more apparent (and more serious) when mixing CJK characters with English:

    screenshot_20180706-104710

    As shown above, when a CJK character is introduced to an all-English text,

    1. decenders of the text field is cut away, user can no longer possible to distinguish a "g" from a "q".
    2. the baseline(?) of the text field and text widget will be changed, creating a somewhat suboptimal experience. The baseline of the text field is shifted up a little bit, while the one in text widget is shifted down in a larger extent.

    I'd also like to add that this doesn't limited to Nexus 5X. I am seeing this same issue on my Nexus 5X and Nokia 7 Plus. I don't see this on the Nexus 5 emulator though.

  3. tamcy commented on Jul 6, 2018

    @tamcy

    Tested on some emulators and got the following result:
    Pixel 2 emulator on Android 8.1.0 - descendents cropped.
    Pixel 2 emulator on Android 7.1.1 - descendents cropped.
    Nexus S emulator on Android 8.1.0 - descendents not cut.
    Nexus S emulator on Android 7.1.0 - descendents not cut.

    I know it sounds strange but could it be device resoluation/dpi related?

    (The baseline got shifted for all devices though, so this is probably another issue.)

  4. added this to the milestone on Jul 16, 2018
  5. jason-simmons commented on Aug 7, 2018

    @jason-simmons
    Member

    flutter-team-archive/engine#5962 will fix this for editable text fields where the text content does not overflow the field's bounds.

    However, if the text overflows, then the clipping done in the framework's RenderEditable.paint() will clip part of the text. This happens because the RenderEditable's size property does not update when the height of the text changes due to the mix of fonts with different metrics.

    Interestingly the layout of the widgets is updated to reflect the new height as expected, but size remains unchanged.

    @Hixie @HansMuller

  6. Hixie commented on Aug 8, 2018

    @Hixie
    Contributor

    One thing we should probably do here is probably to change the baseline code in RenderEditable to not pay attention to the actual text and to just return the baseline of the given text style. That way the baseline wouldn't change over time. (RenderEditable is a special case here because it's expected for the user to edit the text, and we never want that to wobble.)

  7. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 15, 2018
  8. goderbauer commented on Jan 2, 2019

    @goderbauer
    Member

    /cc @GaryQian Does your work fix this?

  9. GaryQian commented on Jan 2, 2019

    @GaryQian
    Contributor

    The hacky fix for this has not been landed as it introduces a new bug where the text box heights and line heights jump around as you type. I am working on a more permanent solution by providing a richer leading/line height system.

  10. GaryQian commented on Feb 6, 2019

    @GaryQian
    Contributor

    #27612 should improve this behavior, but doesn't solve it in all cases.

  11. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  12. markusaksli-nc commented on Jul 27, 2020

    @markusaksli-nc
    Contributor

    I can't reproduce this on the latest master 1.21.0-6.0.pre.38 with Android API 27, 28 or 30.

    flutter doctor -v
    [√] Flutter (Channel master, 1.21.0-6.0.pre.38, on Microsoft Windows [Version 10.0.18362.959], locale et-EE)
       • Flutter version 1.21.0-6.0.pre.38 at C:\Development\flutter_master
       • Framework revision 8e0eee9008 (8 hours ago), 2020-07-26 23:38:01 -0700
       • Engine revision 626244a72c
       • Dart version 2.9.0 (build 2.9.0-21.0.dev a3815b6590)
    
    
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
       • Android SDK at C:\Users\Isa\AppData\Local\Android\sdk
       • Platform android-30, build-tools 30.0.0
       • Java binary at: C:\Users\Isa\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763\jre\bin\java
       • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
       • All Android licenses accepted.
    
    [√] Chrome - develop for the web
       • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.4)
       • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
       • Visual Studio Community 2019 version 16.6.30309.148
       • Windows 10 SDK version 10.0.18362.0
    
    [√] Android Studio (version 4.0)
       • Android Studio at C:\Users\Isa\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763
       • Flutter plugin version 47.1.2
       • Dart plugin version 193.7361
       • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    
    [√] VS Code (version 1.47.2)
       • VS Code at C:\Users\Isa\AppData\Local\Programs\Microsoft VS Code
       • Flutter extension version 3.12.2
    
    [√] Connected device (6 available)
       • SM G950F (mobile)                  • ce12171c51cc001c03 • android-arm64  • Android 9 (API 28)
       • sdk gphone x86 (mobile)            • emulator-5554      • android-x86    • Android 11 (API 30) (emulator)
       • Android SDK built for x86 (mobile) • emulator-5556      • android-x86    • Android 8.1.0 (API 27) (emulator)
       • Windows (desktop)                  • windows            • windows-x64    • Microsoft Windows [Version 10.0.18362.959]
       • Web Server (web)                   • web-server         • web-javascript • Flutter Tools
       • Chrome (web)                       • chrome             • web-javascript • Google Chrome 84.0.4147.89
    
    • No issues found!
    

    Closing as fixed. Feel free to comment with your case and flutter doctor -v if this persists and I'll reopen.

  13. 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.

  14. 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

    P2Important issues not at the top of the work lista: typographyText rendering, possibly libtxte: device-specificOnly manifests on certain devicesframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions