openfl / openfl-samples

Haxelib-based OpenFL sample projects
http://www.openfl.org
MIT License
78 stars 41 forks source link

Custom fonts example doesn't work on HTML5 #17

Closed danielsedlacek closed 10 years ago

danielsedlacek commented 10 years ago

Custom fonts example doesn't work on HTML5. I am using Openfl compiler in IntelliJ, the Flash output looks ok but the HTML5 output is wired - it applies some default kind of sans font to letters but serif to numbers. Here is the project with my compiled outputs: https://dl.dropboxusercontent.com/u/2731147/CustomFont.zip

And here is a screenshot of the HTML5 vs Flash target: https://dl.dropboxusercontent.com/u/2731147/Screen%20Shot%202014-08-11%20at%2009.29.16.png

jgranick commented 10 years ago

Hi!

I noticed last night that sometimes, a page gets running before the webfont was done loading. In this instance, it renders the text before the font was available, and uses a default sans font. Were it rendering constantly in a loop, this would not be an issue. There are some solutions to this that I am looking into :)

jgranick commented 10 years ago

I just added fonts to the preload process on Lime "next", so this should work better for the next release ;)