Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show unknown characters for non-english language. #171

Open
MrKnos opened this issue Apr 4, 2023 · 1 comment
Open

Show unknown characters for non-english language. #171

MrKnos opened this issue Apr 4, 2023 · 1 comment

Comments

@MrKnos
Copy link

MrKnos commented Apr 4, 2023

Package name: golden_toolkit

Version: 0.15.0

Output of flutter doctor -v

[✓] Flutter (Channel stable, 3.7.7, on macOS 13.2.1 22D68 darwin-x64, locale en-TH)
    • Flutter version 3.7.7 on channel stable at /Users/kittipongtheothaisong/fvm/versions/3.7.7
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2ad6cd72c0 (4 weeks ago), 2023-03-08 09:41:59 -0800
    • Engine revision 1837b5be5f
    • Dart version 2.19.4
    • DevTools version 2.20.1

[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/kittipongtheothaisong/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)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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 11.0.11+0-b60-7590822)

[✓] IntelliJ IDEA Community Edition (version 2021.3.3)
    • 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.76.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 13.2.1 22D68 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 111.0.5563.146

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Dart Version

2.19.4 (stable)

Steps to Reproduce

  1. Clone project
git clone [email protected]:eBay/flutter_glove_box.git
  1. Change directory
cd flutter_glove_box/packages/golden_toolkit/example
  1. Edit file in packages/golden_toolkit/example/lib/src/weather_widgets.dart at function _textForWeather (line: 270)

change from

String _textForWeather(Weather weather) {
  switch (weather) {
    case Weather.sunny:
      return 'Sunny';
    case Weather.rain:
      return 'Raining';
    case Weather.cold:
      return 'Frosty';
    case Weather.cloudy:
      return 'Partly Cloudy';
  }
}

to

String _textForWeather(Weather weather) {
  switch (weather) {
    case Weather.sunny:
      return 'Sunny';
    case Weather.rain:
      return '下雨'; // CHINESE (TRADITIONAL)
    case Weather.cold:
      return 'ठीक है'; // HIDI
    case Weather.cloudy:
      return 'มีเมฆบางส่วน'; // THAI
  }
}
  1. Run command
flutter test --update-goldens

Expected Result

The golden result in packages/golden_toolkit/example/test/goldens/weather_types_grid.png should show valid characters for non-english language.

Actual Result

The golden result in packages/golden_toolkit/example/test/goldens/weather_types_grid.png show unknown characters for non-english language.

weather_types_grid

@MrKnos MrKnos changed the title Show unkwonw characters for non-english language. Show unknown characters for non-english language. Apr 4, 2023
@MrKnos
Copy link
Author

MrKnos commented May 10, 2023

Workaround wrap with Material widget

for example

Material(
  textStyle: const TextStyle(
    fontFamily: 'YOUR_FONT_FAMILY',
  ),
  child: child,
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant