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

set custom font #139

Closed
pishguy opened this issue Aug 7, 2019 · 6 comments
Closed

set custom font #139

pishguy opened this issue Aug 7, 2019 · 6 comments
Labels
more-info-needed More information is needed to resolve the issue. Will be closed if no response is received.

Comments

@pishguy
Copy link

pishguy commented Aug 7, 2019

how can i set and use custom font in customTextStyle?

Html(
  data: _content,
  blockSpacing: 10.0,
  customTextStyle: (dom.Node node, TextStyle baseStyle) {
    if (node is dom.Element) {
      switch (node.localName) {
        case "p":
          return baseStyle.merge(TextStyle(height: 2, fontFamily: 'IranSansLight', fontSize: 20));
      }
    }
    return baseStyle;
  },
),
@Sub6Resources
Copy link
Owner

That looks correct. Is the IranSansLight font set up correctly in your pubspec.yaml file?

@pishguy
Copy link
Author

pishguy commented Aug 8, 2019

@Sub6Resources yes, i'm using this font on application and i don't have any problem

@Sub6Resources
Copy link
Owner

@MahdiPishguy What flutter version are you using? (Perhaps post the output of flutter doctor.)

@pishguy
Copy link
Author

pishguy commented Aug 8, 2019

@Sub6Resources

[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17763.615], locale en-US)
    • Flutter version 1.7.8+hotfix.4 at E:\Software\flutter
    • Framework revision 20e59316b8 (3 weeks ago), 2019-07-18 20:04:33 -0700Engine revision fee001c93f
    • Dart version 2.4.0


Checking Android licenses is taking an unexpectedly long time.../
Checking Android licenses is taking an unexpectedly long time...-Platform android-28, build-tools 28.0.3ANDROID_HOME = E:\Software\sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android StudioFlutter plugin version 37.0.2Dart plugin version 191.7830Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.35.0)
    • VS Code at C:\Users\mahdi\AppData\Local\Programs\Microsoft VS CodeFlutter extension version 3.1.0

[√] Connected device (1 available)
    • WAS LX1A • 2XJDU17C14006203 • android-arm64 • Android 8.0.0 (API 26)

• No issues found!

@Sub6Resources
Copy link
Owner

Hmm, this may be related to the issue in Flutter that #131 references. Is it possible for you to upgrade to the Flutter beta channel to see if that fixes it?

@Sub6Resources Sub6Resources added the more-info-needed More information is needed to resolve the issue. Will be closed if no response is received. label Oct 8, 2019
@ryan-berger
Copy link
Collaborator

This looks like it has been fixed, and this issue hasn't been touched in a year, I'll be closing this and you can reopen a new issue if you have any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed More information is needed to resolve the issue. Will be closed if no response is received.
Projects
None yet
Development

No branches or pull requests

3 participants