Skip to content

Japanese bold font is incorrectly rendered on iOS #132475

@miyakeryo

Description

@miyakeryo

Is there an existing issue for this?

Steps to reproduce

  1. Run the Flutter application which contains Japanese bold text on iOS (In my case iOS 16.4 Simulator).
  2. Compare bolded Japanese characters.
Expected results Actual results
The "゛" of the "が" appears at the top of the third line. The "゛" of the "が" appears at the right of the third line.
and Kanji characters are a little dirty.

Code sample

Code sample
Text.rich(
  TextSpan(
    style: TextStyle(
      fontWeight: FontWeight.w400,
      fontSize: 20,
    ),
    children: [
      TextSpan(
        text:
            '.SF UI Text\n¥1,980(税込み) 2013/08/14 18:59(月)\n「備忘録が」\n\n',
      ),
      TextSpan(
        text:
            'Hiragino Sans\n¥1,980(税込み) 2013/08/14 18:59(月)\n「備忘録が」\n\n',
        style: TextStyle(
          fontFamily: 'Hiragino Sans',
        ),
      ),
      TextSpan(
        text:
            'Helvetica Neue, Hiragino Sans, letterSpacing: 0.5\n¥1,980(税込み) 2013/08/14 18:59(月)\n「備忘録が」\n\n',
        style: TextStyle(
          fontFamily: 'Helvetica Neue',
          fontFamilyFallback: ['Roboto', 'Hiragino Sans', 'Noto Sans'],
          letterSpacing: 0.5,
        ),
      ),
      TextSpan(
        text:
            '.SF UI Text\n¥1,980(税込み) 2013/08/14 18:59(月)\n「備忘録が」\n\n',
        style: TextStyle(
          fontWeight: FontWeight.w600,
        ),
      ),
      TextSpan(
        text:
            'Hiragino Sans\n¥1,980(税込み) 2013/08/14 18:59(月)\n「備忘録が」\n\n',
        style: TextStyle(
          fontFamily: 'Hiragino Sans',
          fontWeight: FontWeight.w600,
        ),
      ),
      TextSpan(
        text:
            'Helvetica Neue, Hiragino Sans, letterSpacing: 0.5\n¥1,980(税込み) 2013/08/14 18:59(月)\n「備忘録が」\n\n',
        style: TextStyle(
          fontFamily: 'Helvetica Neue',
          fontFamilyFallback: ['Roboto', 'Hiragino Sans', 'Noto Sans'],
          fontWeight: FontWeight.w600,
          letterSpacing: 0.5,
        ),
      ),
    ],
  ),
  textAlign: TextAlign.center,
),

Screenshots or Video

No response

Logs

Logs
Showing iPhone 14 logs:
[VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(35)] Using the Impeller rendering backend.
flutter: The Dart VM service is listening on http://127.0.0.1:49765/o74D6Vr-El8=/

Flutter Doctor output

Doctor output
/Users/miyakeryo/fvm/versions/3.10.6/bin/flutter doctor --verbose
[!] Flutter (Channel stable, 3.10.6, on macOS 13.4.1 22F770820d darwin-arm64, locale en-JP)
    • Flutter version 3.10.6 on channel stable at /Users/miyakeryo/fvm/versions/3.10.6
    ! The flutter binary is not on your path. Consider adding /Users/miyakeryo/fvm/versions/3.10.6/bin to your path.
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart-sdk/3.0.7/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/miyakeryo/fvm/versions/3.10.6. Consider adding /Users/miyakeryo/fvm/versions/3.10.6/bin to the front of your path.
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision f468f3366c (5 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/miyakeryo/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ 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 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • 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 17.0.6+0-17.0.6b829.9-10027231)

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

[✓] Connected device (3 available)
    • iPhone 14 (mobile) • 01346A0A-738D-4B67-AF51-99974A724E68 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)    • macos                                • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 115.0.5790.102

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
Process finished with exit code 0

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: 3.10Found to occur in 3.10found in release: 3.14Found to occur in 3.14has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyteam-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