fontloader
fontloader copied to clipboard
loadLocalFonts: Not working as expected if args are not provided as Array
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.