Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Remove roboto dependency from paper-styles#128

Open
gar1t wants to merge 1 commit into
PolymerElements:masterfrom
gar1t:master
Open

Remove roboto dependency from paper-styles#128
gar1t wants to merge 1 commit into
PolymerElements:masterfrom
gar1t:master

Conversation

@gar1t

@gar1t gar1t commented Mar 3, 2017

Copy link
Copy Markdown

The roboto font is a dependency on a hard-coded CDN. Applications can
add the dependency and include the font as needed, rather than rely
paper-styles, which is used extensively throughout the Polymer
components. This is similar to other fonts listed in default styles
that might not be available on a system by default, but can be
resolved externally at the application level.

This change does not provide backward compatibility or a deprecation
period.

The roboto font is a dependency on a hard-coded CDN. Applications can
add the dependency and include the font as needed, rather than rely
paper-styles, which is used extensively throughout the Polymer
components. This is similar to other fonts listed in default styles
that might not be available on a system by default, but can be
resolved externally at the application level.

This change does not provide backward compatibility or a deprecation
period.
@gar1t

gar1t commented Mar 3, 2017

Copy link
Copy Markdown
Author

I'm submitting this as a proposal. It address #22 and #111.

For some reason #22 was closed as being fixed by #44 - but I'm not seeing how that PR addresses this issue.

Listing Roboto as a default font is benign. Hard coding the font dependency on an external CDN is not. It's common enough to list fonts that may not be available on a system, finally specifying default fonts like "sans serif", "mono" etc as fall backs. There's no reason to enforce downloading a font from an external site. If the user wants the font, she can resolve the dependency at the application level.

@cordovapolymer

Copy link
Copy Markdown

Paper-styles must use font-roboto-local because polymer-build doesn't bundle it Polymer/polymer-build#155

@JosefJezek

Copy link
Copy Markdown

Use this repo https://github.com/StartPolymer/paper-styles-plus ;-)

@Yuen92

Yuen92 commented Dec 14, 2018

Copy link
Copy Markdown

Does any news regarding this issue?
In the version 3.0.1 it style use :
https://github.com/PolymerElements/font-roboto/blob/master/roboto.js

But I guess the dependency should be replace by this module :
https://github.com/PolymerElements/font-roboto-local

So do you know the best way to remove the dependency to the fonts.googleapis.com request ?
https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic

Thanks

@quetzalsly

Copy link
Copy Markdown

2019 here, this is still an issue. Lighthouse gives me a failed report because of this. can we think of removing this or making it compatable with font-display: swap?

@Yuen92

Yuen92 commented Mar 23, 2019

Copy link
Copy Markdown

@quetzalsly :
If you need to remove the dependency you can use :
<script>window.polymerSkipLoadingFontRoboto = true;</script>

See the source code from PolymerElements/font-roboto :
https://github.com/PolymerElements/font-roboto/blob/master/roboto.js

Hope it's what you are looking for.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants