onehilltech / ember-cli-mdc

ember-cli addon for material-components-web
Apache License 2.0
44 stars 15 forks source link

Change default typography (remove Roboto) #14

Closed waissbluth closed 5 years ago

waissbluth commented 5 years ago

According to the docs, "The typography package automatically includes links to the Roboto fonts in your application.".

Is there an official way to avoid this? The mdc-typography gets added on install, but nothing seems to break removing it from the package.json.

hilljh82 commented 5 years ago

@waissbluth Could you please clarify your question/comment? It's unclear what you are wanting to remove, or trying to accomplish.

waissbluth commented 5 years ago

@hilljh82, I am trying to: a) set a font other than Roboto as a default for all components, and b) stop the message Linking Roboto fonts with the application. that shows up in the build process (it actually shows up twice for every build, but that is probably a separate issue)

hilljh82 commented 5 years ago

@waissbluth

(a) Can you not use this approach as recommend in material-components-web to change the default font for all components? Just place what they recommend at the top of your app.scss file before any of the imports.

(b) I have been trying to figure out how to address this issue, but I think it's an ember-cli issue. From what I can tell, this causes the typography/fonts to appear in both the application.css and vendor.css files. It's somewhat annoying, but does not break anything or cause anything bad.

waissbluth commented 5 years ago

Thank you @hilljh82, (a) works. It still would be nice not to load Roboto at all, but this will do.

hilljh82 commented 5 years ago

@waissbluth Great!

Its understanable to not link the fonts if you are using a custom font. We will look into supporting this feature via environment configuration.

hilljh82 commented 5 years ago

@waissbluth 0.78.2 allows to you disable linking of Roboto font too.

https://github.com/onehilltech/ember-cli-mdc/tree/master/packages/mdc-typography#disable-integration