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

missing fonts in ios #9221

Closed
liuy97 opened this issue Feb 17, 2021 · 5 comments
Closed

missing fonts in ios #9221

liuy97 opened this issue Feb 17, 2021 · 5 comments

Comments

@liuy97
Copy link

liuy97 commented Feb 17, 2021

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.2.0
  • Cross-platform modules:
  • Android Runtime:
  • iOS Runtime: 7.2.0
  • XCode Version: 12.4
  • Plugin(s):

Describe the bug

font icons are missing

To Reproduce

ns create demo --template @nativescript/template-tab-navigation-ng
ns run ios
Simulator Screen Shot - iPhone 12 Pro Max - 2021-02-17 at 09 26 59

Expected behavior
font icons shows correctly

Sample project

Additional context

@bradmartin
Copy link
Contributor

Could you try using ns fonts from your terminal to get the correct CSS for the fonts you have in your application? This was added to the CLI with NS 7.1 (https://nativescript.org/blog/nativescript-7-1-hmr-reenabled-and-xcode-12-3-support/)

If you have the CSS configured correctly it should render the fonts.

@liuy97
Copy link
Author

liuy97 commented Feb 18, 2021

Hi, the demo project is created from Tabs template. It seems font css is same as result of "ns fonts".
.fab
.fab { font-family: "Font Awesome 5 Brands", "fa-brands-400"; font-weight: 400; }
This bug is that font files are not copied when "ns run ios" at the first time.

@bradmartin
Copy link
Contributor

If the webpack config is using the latest and the fonts are in the correct directory then it should copy them over, that is handled with webpack bundling.

The issue of the template might be that the fonts are not in the correct directory for the copyTargets portion of the webpack config.

@bradmartin
Copy link
Contributor

It seems that a second run of the app does copy the files over correctly. Could be a webpack issue or a IO issue. Hard to say, hopefully you can get past it though with a second run of the app and move forward.

@liuy97
Copy link
Author

liuy97 commented Apr 15, 2021

ns-cli 8.0.1 has fixed this.

@liuy97 liuy97 closed this as completed Apr 15, 2021
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

2 participants