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

Protocol relative font link doesn't work with file protocol #33

Closed
therustmonk opened this issue Jun 5, 2016 · 3 comments
Closed

Protocol relative font link doesn't work with file protocol #33

therustmonk opened this issue Jun 5, 2016 · 3 comments
Assignees
Labels
bug Issue reports a bug
Milestone

Comments

@therustmonk
Copy link

Fonts don't loads when site\index.html opens locally. That's because relative protocol link usesd in base.html and there is no file://fonts.googleapis.com/... data exists.

How about to use https explicitly?

@squidfunk squidfunk added the bug Issue reports a bug label Jun 7, 2016
@squidfunk
Copy link
Owner

We could do that, sounds reasonable. But, how did you manage to serve it locally anyway? This shouldn't be a problem at all.

@squidfunk squidfunk self-assigned this Jun 7, 2016
@therustmonk
Copy link
Author

I've put documentation with desktop application and want to add os-link to index.html, but when user opens local file fonts don't load.

I've found appropriate solution: use system fonts by additional stylesheets:

body, input {
   font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
}
pre, code {
   font-family: 'Consolas', 'Courier New', 'Courier', monospace;
}

It works ok and I think It's also better, because external fonts can be unavailable and unwanted for desktop (offline) applications.

@squidfunk
Copy link
Owner

The protocol-relative URL technique is now considered an anti-pattern, so I will set HTTPS explicitly.

@squidfunk squidfunk added this to the 0.2.4 milestone Jun 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug
Projects
None yet
Development

No branches or pull requests

2 participants