Closed
Description
Steps to Reproduce
App in simplified Chinese. After using the app for a period of time, it may appear that the font is disordered in each page, which may be big or small. This doesn't happen on android
I build app with flutter 1.5.4-hotfix.2 and 1.7.8-hotfix.3,They all have the same problem.
Logs
[ +44 ms] executing: [/Users/suteki/Flutter/flutter/] git log -n 1 --pretty=format:%H
[ +51 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
[ ] executing: [/Users/suteki/Flutter/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +27 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v1.5.4-hotfix.2-0-g7a4c33425
[ +13 ms] executing: [/Users/suteki/Flutter/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +11 ms] Exit code 128 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] fatal: HEAD does not point to a branch
[ +12 ms] executing: [/Users/suteki/Flutter/flutter/] git rev-parse --abbrev-ref HEAD
[ +14 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] HEAD
[ +262 ms] executing: /Users/suteki/Library/Android/sdk/platform-tools/adb devices -l
[ +12 ms] Exit code 0 from: /Users/suteki/Library/Android/sdk/platform-tools/adb devices -l
[ ] List of devices attached
[ +11 ms] executing: idevice_id -h
[ +51 ms] /usr/bin/xcrun simctl list --json devices
[ +310 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FuchsiaCacheArtifacts' is not required, skipping update.
[ +115 ms] Found plugin battery at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/battery-0.2.3/
[ +34 ms] Found plugin city_pickers at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/city_pickers-0.1.22/
[ +14 ms] Found plugin device_info at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.0+2/
[ +5 ms] Found plugin fake_analytics at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_analytics-0.2.3/
[ +3 ms] Found plugin fake_notch at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_notch-0.0.2+5/
[ +3 ms] Found plugin fake_path_provider at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_path_provider-0.1.0/
[ +1 ms] Found plugin fake_tencent at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_tencent-0.3.3/
[ +2 ms] Found plugin fake_wechat at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_wechat-0.3.2/
[ +2 ms] Found plugin fake_weibo at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_weibo-0.2.2/
[ +6 ms] Found plugin flutter_baidu_tts_plugin at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_baidu_tts_plugin-55acc17bb945d8535863e2ea7e4f0031469a4b3c/
[ +5 ms] Found plugin flutter_deeplink at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_deeplink-8fb13724e5095e2c922e8868840529c7ce9f0fe2/
[ +3 ms] Found plugin flutter_mix_push at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_mix_push-964c90e815bb0e207f3256e6736246ec860f86db/
[ +3 ms] Found plugin flutter_statusbar_manager at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_statusbar_manager-b33a851e5627901560869f9ed6a2895f3dd5f9a3/
[ +3 ms] Found plugin flutter_umpush at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_umpush_plugin-0d08cd9f87cdf717b909870a2f1d8400e8a08aee/
[ +1 ms] Found plugin flutter_user_agent at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_user_agent-1.0.1/
[ +1 ms] Found plugin flutter_webview_plugin at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_webview_plugin-23b0dd8585d35f31887af2acacc5437a4812b7ed/
[ +3 ms] Found plugin fluttertoast at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-3.1.0/
[ +10 ms] Found plugin image_cropper at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_cropper-1.0.2/
[ +1 ms] Found plugin image_picker at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.0+17/
[ +1 ms] Found plugin image_picker_saver at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker_saver-0.3.0/
[ +1 ms] Found plugin in_app_purchase at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/in_app_purchase-0.1.1+2/
[ +12 ms] Found plugin mob_ads_pangolin at /Users/suteki/Flutter/flutter/.pub-cache/git/mob_ads_pangolin-057efd8f8a5c99dafc60ef0b9621c4dd702051e6/
[ +2 ms] Found plugin package_info at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.0+5/
[ +2 ms] Found plugin path_provider at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-0.5.0+1/
[ +2 ms] Found plugin permission_handler at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-3.2.0/
[ +11 ms] Found plugin screen at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/screen-0.0.5/
[ +1 ms] Found plugin share at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.2/
[ +1 ms] Found plugin shared_preferences at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.4.3/
[ +6 ms] Found plugin sqflite at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.1.6+1/
[ +9 ms] Found plugin tobias at /Users/suteki/Flutter/flutter/.pub-cache/git/tobias-578ba153d681dfa099d1f0ded6d85ec325eaa070/
[ +1 ms] Found plugin url_launcher at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.1.0/
[ +29 ms] Found plugin battery at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/battery-0.2.3/
[ +8 ms] Found plugin city_pickers at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/city_pickers-0.1.22/
[ +3 ms] Found plugin device_info at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.0+2/
[ +1 ms] Found plugin fake_analytics at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_analytics-0.2.3/
[ +1 ms] Found plugin fake_notch at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_notch-0.0.2+5/
[ ] Found plugin fake_path_provider at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_path_provider-0.1.0/
[ ] Found plugin fake_tencent at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_tencent-0.3.3/
[ ] Found plugin fake_wechat at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_wechat-0.3.2/
[ ] Found plugin fake_weibo at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_weibo-0.2.2/
[ +1 ms] Found plugin flutter_baidu_tts_plugin at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_baidu_tts_plugin-55acc17bb945d8535863e2ea7e4f0031469a4b3c/
[ +1 ms] Found plugin flutter_deeplink at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_deeplink-8fb13724e5095e2c922e8868840529c7ce9f0fe2/
[ +1 ms] Found plugin flutter_mix_push at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_mix_push-964c90e815bb0e207f3256e6736246ec860f86db/
[ +1 ms] Found plugin flutter_statusbar_manager at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_statusbar_manager-b33a851e5627901560869f9ed6a2895f3dd5f9a3/
[ +2 ms] Found plugin flutter_umpush at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_umpush_plugin-0d08cd9f87cdf717b909870a2f1d8400e8a08aee/
[ +1 ms] Found plugin flutter_user_agent at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_user_agent-1.0.1/
[ ] Found plugin flutter_webview_plugin at /Users/suteki/Flutter/flutter/.pub-cache/git/flutter_webview_plugin-23b0dd8585d35f31887af2acacc5437a4812b7ed/
[ ] Found plugin fluttertoast at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-3.1.0/
[ +4 ms] Found plugin image_cropper at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_cropper-1.0.2/
[ ] Found plugin image_picker at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.0+17/
[ ] Found plugin image_picker_saver at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker_saver-0.3.0/
[ ] Found plugin in_app_purchase at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/in_app_purchase-0.1.1+2/
[ +5 ms] Found plugin mob_ads_pangolin at /Users/suteki/Flutter/flutter/.pub-cache/git/mob_ads_pangolin-057efd8f8a5c99dafc60ef0b9621c4dd702051e6/
[ ] Found plugin package_info at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.0+5/
[ +1 ms] Found plugin path_provider at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-0.5.0+1/
[ +1 ms] Found plugin permission_handler at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-3.2.0/
[ +5 ms] Found plugin screen at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/screen-0.0.5/
[ ] Found plugin share at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.2/
[ ] Found plugin shared_preferences at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.4.3/
[ +5 ms] Found plugin sqflite at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.1.6+1/
[ +6 ms] Found plugin tobias at /Users/suteki/Flutter/flutter/.pub-cache/git/tobias-578ba153d681dfa099d1f0ded6d85ec325eaa070/
[ +1 ms] Found plugin url_launcher at /Users/suteki/Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.1.0/
[ +92 ms] Launching lib/main.dart on iPhone 8 in debug mode...
[ +7 ms] executing: /usr/bin/defaults read /Users/suteki/Desktop/FNovel/ios/Runner/Info CFBundleIdentifier
[ +107 ms] Exit code 0 from: /usr/bin/defaults read /Users/suteki/Desktop/FNovel/ios/Runner/Info CFBundleIdentifier
[ ] $(PRODUCT_BUNDLE_IDENTIFIER)
[ +23 ms] Building Runner.app for 9E67BBF4-5B1A-468B-A450-9616F073E064.
[ +7 ms] executing: script /dev/null /usr/bin/log stream --style syslog --predicate processImagePath CONTAINS "9E67BBF4-5B1A-468B-A450-9616F073E064"
[ +42 ms] [DEVICE LOG] Filtering the log data using "processImagePath CONTAINS "9E67BBF4-5B1A-468B-A450-9616F073E064""
[ +461 ms] Skipping kernel compilation. Fingerprint match.
[+1377 ms] Building bundle
[ +1 ms] Writing asset files to build/flutter_assets
[ +246 ms] "flutter run" took 3,398ms.
[ ] "flutter run" took 3,398ms.
info • Unused import: 'package:fnovel/pages/share_paragraph/share_paragraph_page.dart' • lib/app/app_navigator.dart:8:8 • unused_import
info • This function has a return type of 'Type', but doesn't end with a return statement • lib/app/constant.dart:13:10 • missing_return
info • Unused import: 'dart:io' • lib/app/tab_page.dart:1:8 • unused_import
info • The value of the local variable 'userMgr' isn't used • lib/pages/coupon/coupon_unavailable_list_view.dart:74:9 • unused_local_variable
info • Unused import: 'package:fnovel/pages/reader/utility/reader_database.dart' • lib/pages/download/downloaded_cell.dart:2:8 • unused_import
info • Unused import: 'package:flutter/material.dart' • lib/pages/feedback_create/feedback_create_model.dart:4:8 • unused_import
info • Unused import: 'package:fnovel/pages/forum_member/forum_member_page.dart' • lib/pages/forum/forum_fan_cell.dart:6:8 • unused_import
info • Unused import: 'package:fnovel/utility/novel_cache_manager.dart' • lib/pages/forum_info/forum_info_publish_comment_cell.dart:3:8 • unused_import
info • Unused import: 'package:cached_network_image/cached_network_image.dart' • lib/pages/forum_info/forum_info_publish_comment_cell.dart:5:8 • unused_import
info • This function has a return type of 'Member', but doesn't end with a return statement • lib/pages/forum_info/forum_info_publish_comment_cell.dart:50:3 •
missing_return
info • Unused import: 'package:intl/intl.dart' • lib/pages/forum_info/forum_info_publish_view.dart:3:8 • unused_import
info • Unused import: 'package:fnovel/utility/novel_cache_manager.dart' • lib/pages/forum_info/forum_info_receive_comment_cell.dart:3:8 • unused_import
info • Unused import: 'package:cached_network_image/cached_network_image.dart' • lib/pages/forum_info/forum_info_receive_comment_cell.dart:5:8 • unused_import
info • This function has a return type of 'Member', but doesn't end with a return statement • lib/pages/forum_info/forum_info_receive_comment_cell.dart:80:3 •
missing_return
info • The method '_buildImages' isn't used • lib/pages/forum_member/forum_member_post_cell.dart:48:16 • unused_element
info • The method '_buildContent' isn't used • lib/pages/forum_member/forum_member_post_cell.dart:91:3 • unused_element
info • `Future` results in `async` function bodies must be `await`ed or marked `unawaited` using `package:pedantic` •
lib/pages/forum_post_detail/forum_post_detail_page.dart:116:7 • unawaited_futures
info • `Future` results in `async` function bodies must be `await`ed or marked `unawaited` using `package:pedantic` •
lib/pages/forum_post_detail/forum_post_detail_page.dart:129:7 • unawaited_futures
info • `Future` results in `async` function bodies must be `await`ed or marked `unawaited` using `package:pedantic` •
lib/pages/forum_post_detail/forum_post_extend_menu.dart:16:5 • unawaited_futures
info • Unused import: 'package:fnovel/pages/forum_member/forum_member_page.dart' • lib/pages/forum_post_detail/forum_reply_view.dart:4:8 • unused_import
20 issues found. (ran in 8.3s)
[✓] Flutter (Channel unknown, v1.5.4-hotfix.2, on Mac OS X 10.14.4 18E226, locale zh-Hans-CN)
• Flutter version 1.5.4-hotfix.2 at /Users/suteki/Flutter/flutter
• Framework revision 7a4c33425d (3 months ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/suteki/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/suteki/Library/Android/sdk
• 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-1136-b06)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• ios-deploy 1.9.4
• CocoaPods version 1.7.4
[!] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.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-b06)
[✓] VS Code (version 1.36.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.2.0
[✓] Connected device (1 available)
• iPhone 8 • 9E67BBF4-5B1A-468B-A450-9616F073E064 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
! Doctor found issues in 2 categories.
Activity
kelvinluo1112 commentedon Jul 26, 2019
I think this can happen after there is any text contains both chinese and non-chinese charaters(may be non-CJK charaters as well) in the page.
Try to merge your theme's text style with TextStyle(fontFamilyFallback: ["PingFang SC", "Heiti SC"]) in iOS platform.
dcoinapi commentedon Aug 20, 2019
I got the similar problem when korean displayed. I attached a test project to reproduce it easily.



flutter_app.zip
[✓] Flutter (Channel beta, v1.8.3, on Mac OS X 10.14.6 18G87, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.36.1)
[✓] Connected device (1 available)
dcoinapi commentedon Aug 21, 2019
@GaryQian Bro, would you please take a look :)
GaryQian commentedon Aug 21, 2019
@jason-simmons Do you think this could be due to the ambiguous picking order for font fallback bug you recently fixed?
jason-simmons commentedon Aug 22, 2019
I don't think it's related to that.
This looks like something involving locale-specific glyph lookup. The app switches from the system default locale (screenshot 0) to the "ko" locale (1) to the "zh" locale (2). Skia might select different glyphs for a code point in the device's default locale versus "zh".
dcoinapi commentedon Aug 22, 2019
Thanks for reply. I don't think it's a locale problem and I attached a new simple example to prove it.
It seems that the widget rendered korean and then the chinese displayed weird in iOS system(include simulator). The example shows as below:
flutter_app.zip
GaryQian commentedon Aug 23, 2019
Hmm, thanks for trying that out. The characters that are wrongly being displayed are consistent with the korean and japanese usage of those glyphs. They seem to share the same codepoint, so the only thing that would distinguish what is shown is the locale. In absence of a locale, I wonder if there is some sort of assumption system/golbal memory that is guessing the version of the glyph to use based off of context and "remembering" the korean used previously.
CarGuo commentedon Aug 29, 2019
I fix it with the following code :
dcoinapi commentedon Sep 5, 2019
It works. Thanks bro :)
GaryQian commentedon Sep 16, 2019
Thanks for speaking to me about this in person at GDD, I'll try to get on this as soon as I can!
GaryQian commentedon Sep 23, 2019
Possibly related: #40184
It may have to do with changes in the coretext backend.
GaryQian commentedon Sep 23, 2019
A potential workaround/solution to this is to explicitly specify the scriptCode for the supported locales and the locales you are using. In cases where the scriptCode is ambiguous, we can only guess at the proper scripts to use.
Specify locales with the
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans')
to specify simplified Chinese.Without your actual apps, I cannot verify it fixes your specific cases but if you try this please let me know if it fixes it.
9 remaining items