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

Chinese Font is render weird with FontWidget #26752

Closed
a396901990 opened this issue Jan 18, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@a396901990
Copy link

commented Jan 18, 2019

Steps to Reproduce

screen shot 2019-01-18 at 7 51 45 pm
screen shot 2019-01-18 at 7 54 46 pm
screen shot 2019-01-18 at 7 55 12 pm

code:

child: Text(
            team.destination,
            style: Theme.of(context).textTheme.title,
            overflow: TextOverflow.fade,
            softWrap: false,
            maxLines: 1,
          ),

// title style is redefined in custom theme using FontWeight.w500:
title: base.title.copyWith(
      fontSize: 18.0,
      fontWeight: FontWeight.w500,
      color: TColors.kTextPrimary,
    )

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.1.10-pre.117, on Mac OS X 10.14.1 18B75, locale en-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.2)
[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
[✓] Android Studio (version 3.0)
[✓] VS Code (version 1.30.1)
[✓] Connected device (2 available)

@a396901990 a396901990 changed the title Chinese Font is render wired with FontWidget in Chinese Chinese Font is render wired with FontWidget Jan 18, 2019

@zoechi zoechi changed the title Chinese Font is render wired with FontWidget Chinese Font is render weird with FontWidget Jan 18, 2019

@zoechi

This comment has been minimized.

Copy link
Contributor

commented Jan 18, 2019

To investigate we would need a minimal runnable reproduction
as a single file so that we can just copy your code into lib/main.dart of a new project and run to reproduce.

@zoechi zoechi added this to the Goals milestone Jan 18, 2019

@kangwang1988

This comment has been minimized.

Copy link
Member

commented Jan 18, 2019

@a396901990
Try set a fontFamily for MaterialApp, e.g., "PingFang SC"(>=iOS9) or "STHeiti SC"(<iOS9).
I think it would resolve your issue.

@kangwang1988

This comment has been minimized.

Copy link
Member

commented Jan 18, 2019

Close #26752 as duple of #25726

@a396901990

This comment has been minimized.

Copy link
Author

commented Jan 19, 2019

Close #26752 as duple of #25726

Thanks @kangwang1988, set PingFang SC working for me.

@kangwang1988

This comment has been minimized.

Copy link
Member

commented Jan 19, 2019

@a396901990
Remember to set fontfamily for iOS9+ and below iOS8 seperately.
PingFang SC doesn't exist in iOS8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.