-
Notifications
You must be signed in to change notification settings - Fork 22
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
Answer Known: Document how to host font locally #69
Comments
This thread is interesting ... |
Just to record what has been tried and what is working...
@font-face {
font-family: "Antonio";
src: url(/local/antonio.woff2) format('woff2');
}
function loadcss() {
let css = '/local/fonts.css?v=0.006'
let link = document.createElement('link');
let head = document.getElementsByTagName('head')[0];
let tmp;
link.rel = 'stylesheet';
link.type = 'text/css';
tmp = link.cloneNode(true);
tmp.href = css;
head.appendChild(tmp);
console.info('%c Font Style sheet loaded', 'color: white; background: #000; font-weight: 700;');
}
loadcss();
I restarted Home Assistant, used "clear cache and reload" It didn't seem to work at first, but finally it did work and all seems good now!! I'm happy to add this to the README or we can't point people to this Issue. |
I don't see a thread. Link? |
Also, thanks a lot for this. This will help out other shuttlecraft owners, or folks who want their Home Assistant to be air-gapped. I added a link to this issue in the Tips and Tricks section. |
Added a link to #69 to the tips and tricks section. Thanks @askpatrickw!
The thread I didn't link http://community.home-assistant.io/t/use-ttf-in-lovelace/143495/48 |
Please ensure that the Resource you set up for |
As you see in my last (black) picture, the lcars.js is set as Javascript Module... |
Try replacing
|
Okay, i will try that |
I also run HA in my "shuttle" (Ok it a van) and we sometimes don't have an internet connection. It would be ideal to be able to host the fonts locally.
I'll look into this, as well and offer a doc update when\if I figure it out, but I'm opening this Issue in case someone already has the info.
The text was updated successfully, but these errors were encountered: