hey
steveruizok / fontloader Goto Github PK
View Code? Open in Web Editor NEWPainlessly, reliably load local and web fonts into Framer prototypes.
Painlessly, reliably load local and web fonts into Framer prototypes.
hey
When using fontloader and sharing my Framer project on a web link, sometimes the prototype wouldn't load in Chrome and I'd see this error in the console. I never ran into it in Safari or Mobile Safari.
On line 191 I changed the fontFamily from "thisIsNotAFont" to "Arial" and it seemed to fix that error. Is there a reason a fake font name is used?
Great stuff, thanks! Just wish I had found this module earlier. Edit: It's new, I just realised. :)
There seems to be one issue though:
If I provide arguments like this:
loadLocalFonts(one, two, three)
Only one
seems to be added as a @font-face rule within a style tag.
The workaround is easy though, with the following syntax it just works:
loadLocalFonts([one, two, three])
I guess ln. 136 does not to work as expected:
if not _.isArray(fonts) then fonts = [fonts]
On a side note: Even using this module, I still seem to have issues with line-lengths/unintended line-breaks when using custom fonts and auto-length text layers created in design mode. The line-breaks occur in iOS Preview. Did not dig deeper yet and am not sure if it's actually a pre-loading issue.
I uploaded my project to framer cloud and tried to load it on my browser. It gets stuck on the loading framer screen.
For now, I ended up by ignoring the loopForFonts
and it works.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.