Skip to content

After upgrading from 1.6.3 to 1.7.0-rc.0 fonts are corrupted when project build is executed #9586

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

Closed
nikolayandr opened this issue Feb 9, 2018 · 3 comments

Comments

@nikolayandr
Copy link

nikolayandr commented Feb 9, 2018

Versions

Angular CLI: 1.7.0-rc.0
Node: 9.3.0
OS: darwin x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.7.0-rc.0
@angular-devkit/build-optimizer: 0.3.1
@angular-devkit/core: 0.3.1
@angular-devkit/schematics: 0.3.1
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.0-rc.0
@schematics/angular: 0.3.1
@schematics/package-update: 0.3.1
typescript: 2.5.3
webpack: 3.10.0

Repro steps

It is enough to create vanilla project and to add usage of fonts, for example, you can add dependencies "font-awesome" and "angular-font-awesome", then make the changes to the "app.component.html" by adding <fa name="cog" animation="spin">Sorry, but something went wrong with my fonts</fa>
then execute the following commands

  1. yarn
  2. ng serve

A link to a sample repo
contains all mentioned above changes

Observed behavior

When you run the app and open the console you see the following messages

Failed to decode downloaded font: http://localhost:4200/fontawesome-webfont.68560c510686599ffbc9.woff2?v=4.7.0
localhost/:1 OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
localhost/:1 Failed to decode downloaded font: http://localhost:4200/fontawesome-webfont.a7bbeb589ae63e018872.woff?v=4.7.0
localhost/:1 OTS parsing error: incorrect file size in WOFF header
localhost/:1 Failed to decode downloaded font: http://localhost:4200/fontawesome-webfont.e1dd9adb4f69bb9a0bdc.ttf?v=4.7.0
localhost/:1 OTS parsing error: incorrect entrySelector for table directory
localhost/:1 Failed to decode downloaded font: http://localhost:4200/fontawesome-webfont.912ec66d7572ff821749.svg?v=4.7.0#fontawesomeregular
localhost/:1 OTS parsing error: invalid version tag

And those HTML elements, which use fonts from corrupted files, do not have font symbols

Desired behavior

HTML elements, which use font symbols, should have them

Mention any other details that might be useful (optional)

  1. All works fine if to use angular-cli 1.6.3.
  2. Project was created using the command ng new <projectName> --style=scss
  3. The checking of mentioned before fonts shows that they are really corrupted and have different size than original fonts from the catalog node_modules/font-awesome/fonts/

@nikolayandr nikolayandr changed the title After upgrading from 1.6.3 to 1.7.0-rc.0 fonts are corrupted when build is executed After upgrading from 1.6.3 to 1.7.0-rc.0 fonts are corrupted when project build is executed Feb 9, 2018
@a-legrand
Copy link

Same here, can build but my browser can't read the served fonts

@nikolayandr
Copy link
Author

Sorry, noticed that bug was reported before #9557

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants