Skip to content

Internationalized words in text widgets are not centered vertically. #42925

Open

Description

@bala-vino

Having a problem regarding displaying Kannada language words using the Text widget. The text is not aligned vertically center.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          FlatButton(
            child: Text(
              'Follow',
              style: TextStyle(fontSize: 20, color: Colors.white),
            ),
            onPressed: () {
              print("Button pressed");
            },
            color: Colors.blue,
          ),
          FlatButton(
            child: Text(
              'ಫಾಲೋ',
              style: TextStyle(fontSize: 20, color: Colors.white),
            ),
            onPressed: () {
              print("Button pressed");
            },
            color: Colors.blue,
          ),
        ],
      ),
    );
  }
}

Screenshot 2019-10-17 at 6 04 42 PM

flutter doctor -v

[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.15 19A583, locale en-IN)
    • Flutter version 1.9.1+hotfix.4 at /Users/vinothini/Documents/flutter
    • Framework revision cc949a8e8b (3 weeks ago), 2019-09-27 15:04:59 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/vinothini/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    • CocoaPods version 1.8.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.39.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.5.1

[✓] Connected device (1 available)
    • iPhone 11 • 4BE1A3E5-2E98-4539-B98C-672848CA2098 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)

• No issues found!

Activity

  1. added
    a: internationalizationSupporting other languages or locales. (aka i18n)
    a: typographyText rendering, possibly libtxt
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Oct 17, 2019
  2. added
    engineflutter/engine related. See also e: labels.
    on Oct 23, 2019
  3. GaryQian commented on Apr 29, 2020

    @GaryQian
    Contributor

    Related, for Hebrew: #27033

  4. darshankawar commented on Sep 21, 2020

    @darshankawar
    Member
    flutter doctor -v
    [✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Mac OS X 10.15.4 19E2269, locale
        en-IN)
        • Flutter version 1.22.0-12.1.pre at /Users/dhs/documents/Fluttersdk/flutter
        • Framework revision 8b3760638a (6 days ago), 2020-09-15 17:47:13 -0700
        • Engine revision 4654fc6cf6
        • Dart version 2.10.0 (build 2.10.0-110.3.beta)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
        • Android SDK at /Users/dhs/Library/Android/sdk
        • Platform android-30, build-tools 30.0.0
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.5)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.5, Build version 11E608c
        • CocoaPods version 1.9.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 46.0.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.46.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.11.0
    
    [✓] Connected device (3 available)
        • SM A260G (mobile) • 5200763ebcfa861f • android-arm    • Android 8.1.0 (API
          27)
        • Web Server (web)  • web-server       • web-javascript • Flutter Tools
        • Chrome (web)      • chrome           • web-javascript • Google Chrome
          85.0.4183.102
    
    • No issues found!
    
    

    42925

  5. ShiinaManatsu commented on Oct 21, 2020

    @ShiinaManatsu

    Also this will happen to English words with Chinese words, Flutter 1.20.0
    Snipaste_2020-10-21_14-10-28

    Text(
      "Hello",
      style: MediumTextStyle.black.copyWith(
        color: Color(0xFFEBC77F),
        fontSize: 12,
      ),
    ),
    SizedBox(width: 2),
    Text(
      "Hello你好",
      style: MediumTextStyle.black.copyWith(
        color: Color(0xFFEBC77F),
        fontSize: 12,
      ),
    ),
    SizedBox(width: 2),
    Icon(
      Icons.chevron_right,
      color: Color(0xFFEBC77F),
      size: 19,
    )

    This is really ugly and I don't want to fix that myself, so any progress with this?

  6. added
    P2Important issues not at the top of the work list
    on Dec 10, 2020
  7. yaostyle commented on May 13, 2021

    @yaostyle
    Contributor
    flutter doctor -v
    [✓] Flutter (Channel stable, 2.0.6, on macOS 11.3.1 20E241 darwin-x64, locale en-US)
        • Flutter version 2.0.6 at /Users/chrish/Flutter/flutter
        • Framework revision 1d9032c7e1 (13 天前), 2021-04-29 17:37:58 -0700
        • Engine revision 05e680e202
        • Dart version 2.12.3
    
    [!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
        • Android SDK at /Users/chrish/Library/Android/sdk
        • Platform android-30, build-tools 29.0.2
        • ANDROID_SDK_ROOT = /Users/chrish/Android_SDK/tools/bin
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.5, Build version 12E262
        • CocoaPods version 1.10.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    
    [✓] IntelliJ IDEA Community Edition (version 2020.3.2)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] VS Code (version 1.56.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.22.0
    
    [✓] Connected device (3 available)
        • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
        • macOS (desktop)              • macos         • darwin-x64     • macOS 11.3.1 20E241 darwin-x64
        • Chrome (web)                 • chrome        • web-javascript • Google Chrome 90.0.4430.212

    Issue persists with 2.0.6. Reproduced the issue and found Chinese characters display fine but not the other.

    Preview

    Preview1 Preview2
    Screenshot1 Screenshot2
  8. TahaTesser commented on May 13, 2021

    @TahaTesser
    Contributor
    flutter doctor -v
    [✓] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
        • Flutter version 2.0.6 at C:\Users\Taha\Code\flutter_stable
        • Framework revision 1d9032c7e1 (13 days ago), 2021-04-29 17:37:58 -0700
        • Engine revision 05e680e202
        • Dart version 2.12.3
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at C:\Users\Taha\Code\SDK
        • Platform android-30, build-tools 30.0.3
        • ANDROID_HOME = C:\Users\Taha\Code\SDK
        • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
        • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
        • Visual Studio Community 2019 version 16.9.31205.134
        • Windows 10 SDK version 10.0.19041.0
    
    [✓] Android Studio (version 4.1.0)
        • Android Studio at C:\Users\Taha\Code\android-studio
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    
    [✓] IntelliJ IDEA Community Edition (version 2021.1)
        • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] VS Code (version 1.56.1)
        • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.22.0
    
    [✓] Connected device (3 available)
        • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19042.928]
        • Chrome (web)      • chrome  • web-javascript • Google Chrome 90.0.4430.212
        • Edge (web)        • edge    • web-javascript • Microsoft Edge 90.0.818.56
    
    • No issues found!
  9. ondev commented on Sep 13, 2021

    @ondev

    You can use TextField to instead of

  10. 1 remaining item

  11. justinmc commented on Mar 18, 2022

    @justinmc
    Contributor
  12. violinday commented on May 21, 2022

    @violinday

    Is there any progress on this issue?

  13. fzyzcjy commented on Aug 2, 2022

    @fzyzcjy
    Contributor

    Is there any updates...?

  14. WingCH commented on Oct 8, 2022

    @WingCH

    Still happening in 3.3.4
    any update? thanks

  15. fzyzcjy commented on Oct 8, 2022

    @fzyzcjy
    Contributor

    Possibly related: #96713

  16. flutting commented on Jan 29, 2023

    @flutting

    As a UI toolkit, Flutter should solve this display exception. It has brought great negative effects!

  17. iDevOrz commented on Apr 18, 2024

    @iDevOrz
  18. darshankawar commented on Apr 18, 2024

    @darshankawar
    Member

    @iDevOrz Please read https://github.com/flutter/flutter/wiki/Issue-hygiene#comments and kindly do not comment asking for updates. Instead, upvote original issue description to get better traction from the team.

  19. BFELFISH commented on May 17, 2024

    @BFELFISH

    is there any update?

  20. weichongchong commented on Feb 6, 2025

    @weichongchong

    is there any update?

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: internationalizationSupporting other languages or locales. (aka i18n)a: typographyText rendering, possibly libtxtengineflutter/engine related. See also e: labels.found in release: 1.22Found to occur in 1.22found in release: 2.0Found to occur in 2.0frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions