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

Text doesn't show up in example #4

Closed
glesica opened this issue Feb 7, 2019 · 6 comments
Closed

Text doesn't show up in example #4

glesica opened this issue Feb 7, 2019 · 6 comments
Labels
help wanted Extra attention is needed t-bug Something isn't working

Comments

@glesica
Copy link

glesica commented Feb 7, 2019

I suspect that this is a missing library, but I'm not sure which one. When I run the example app (https://github.com/gliheng/flutter-app-template) I see this:

flutter-desktop-no-text

Everything is there except the text. Any suggestions? I'm on Ubuntu 18.10. I installed the following dependencies to get the Python script to work:

  • libglfw3
  • cmake
  • libxrandr-dev
  • libxcb-xinerama0-dev
  • libxinerama-dev
  • libxcursor-dev
  • freeglut3-dev
  • libxi-dev
@est31
Copy link

est31 commented Feb 7, 2019

Dunno, it works for me on Kubuntu 18.10

@est31
Copy link

est31 commented Feb 7, 2019

Actually, disregard that. For me it seems to miss rendering the DEBUG in the top right corner, but the text in the center is fine.

screenshot_20190207_085733

How it's supposed to be:

supposed to be

@gliheng
Copy link
Collaborator

gliheng commented Feb 7, 2019

I came into this issue on ubuntu18. Currently, there's a workaround. Swith debugDefaultPlatformOverride to fuchia seem to fix it.

@glesica
Copy link
Author

glesica commented Feb 8, 2019

Hmm, doesn't seem to make a difference on my machine.

@gliheng gliheng added t-bug Something isn't working help wanted Extra attention is needed labels Feb 12, 2019
@999eagle
Copy link
Collaborator

Okay we've had very similar issue in running a flutter app on Desktop. It seems that this is a problem of font matching, sometimes no font is found for texts. I've had multiple people test it on their various Linux systems and while we didn't find the reason for this issue, we found a solution:
You have to add a default font to pubspec.yaml for the family '' like this:

    - family: ''
      fonts:
        - asset: assets/fonts/Roboto-Regular.ttf
          weight: 400

Of course the font asset itself has to exist.
Solution is based on this issue: google/flutter-desktop-embedding#212

@gliheng
Copy link
Collaborator

gliheng commented Mar 31, 2019

@999eagle Yes, it's duel to missing font problem. I've fixed the example by using default font ubuntu on linux. In real project, embed font should be considered.

@gliheng gliheng closed this as completed Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed t-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants