-
Notifications
You must be signed in to change notification settings - Fork 16
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
Loading standard fonts by default #1585
Comments
Okay, there are multiple problems at play here:
In the case that you only have the file in a format other than Following these practices should allow you to not need for unloaded fonts, as lively does that for you and I strongly recommend you relying on these checks, as doing them correctly is not trivial and sometimes has server performance implications. Let me know if that helps! |
Thanks, @linusha. It looks like the principal problem is that I prepared the data files with an old version of Lively that had Arial in it. there are few enough of these things around that I can go ahead and modify them by hand. But I would also like to be able to put in defensive code that detects when an illegal font is requested and delete it |
There is function inside of [
{
name: 'Font A',
supportedWeights: [/*Array of Integers representing supported fontWeights. Empty array equals [400,700]*/]
},
{
name: 'Font B',
supportedWeights: []
},
...
] You can check against the content of this array. The system will also warn you (with the error message quoted above, including the offending font and the name of the affected morph) if a non-secure font is requested at runtime inside of lively. However, from the top of my head I have no good idea how you can use that to check your entire codebase. For this I fear the easiest way is to just use code search, in the case you know which fonts were used. |
Describe the Feature
I've been getting an Invalid Font Name! (total message in the alert box) on a built page, so I looked up the fonts in the debugger with the following (in built code)
and got this result:
No Arial. No Sans-Serif...
So part of the problem is that standard fonts aren't loaded in built pages. But a bigger problem is that I should put in defensive code to check for the loaded fonts and substitute for unloaded fonts. Unfortunately, I don't know how to do this. How do we check for loaded fonts?
The text was updated successfully, but these errors were encountered: