Jimdo / angular-fontselect

A fontselect directive for AngularJS
MIT License
29 stars 9 forks source link

Some font load just their name letters #58

Closed barbax closed 7 years ago

barbax commented 7 years ago

Hello!

There is a really weird problem here!

After implementing the library a strange thing start happening. Some fonts doesn't load well. In some cases this fonts just load the letters in their name. In the screenshoot below you can see an example

schermata 2017-01-19 alle 20 32 41

Looking the console this is the file loaded: http://fonts.googleapis.com/css?family=Fjalla+One:regular&text=Fjalla%20One with this content: @font-face { font-family: 'Fjalla One'; font-style: normal; font-weight: 400; src: local('Fjalla One'), local('FjallaOne-Regular'), url(http://fonts.gstatic.com/l/font?kit=ZRI0JPgrEnSFSbERuWus_Zuu-THSsfPN_lAN0B DN6tU&skey=81738d23c31d6227&v=v4) format('woff2'); }

This is the file returned: font (3).woff2.zip

If i convert this woff2 in ttf (to see it on my mac) i just see the letters of the name.

Thanks!

Xiphe commented 7 years ago

For performance reasons, only the letters of the font-name are loaded for the preview, when browsing through the list.

If you then select a specific font, the whole set should be loaded.

Though i'm not longer a maintainer of this project, the demo page still seems to work as expected, maybe you can check the implementation there and find if something on your side is wrong.

barbax commented 7 years ago

right,it makes sense. Do you know if there is a way to force loading of the whole set, or to fire the "font selected" event?

Thanx

Xiphe commented 7 years ago

the current and stack attributes of the jdFontselect directive should be two-way-bindable

daniel42na commented 7 years ago

You can force loading whole set of font characters. Just remove text: font.name from _loadGoogleFont function ;)

tony-tran commented 7 years ago

Hi @barbax,

I have exactly the same issue of you. Have you resolve your problem? If yes, how ? Thank you in advance.

barbax commented 7 years ago

Hello @tony-tran . Unfortunately not. We just implemented ourselves a similar solution. It has been faster than try to fix this.

Sorry

Xiphe commented 7 years ago

thank for the feedback :)