html5 and fonts


When I am trying to compile a project involving a custom font, to html5 I get this error:

neko /usr/lib/haxe/lib/lime/2,3,1/templates/bin/hxswfml.n ttf2hash libertine_bold.otf /home/ls/src/KulamiOnline/gui/fonts/libertine_bold.otf.hash -glyphs 32-255

Can I use my own fonts on html5?

Is that an error?

Are you using bitfive or some custom backend for OpenFL? The default should use a webfont generator, to convert a TTF/OTF to web fonts (as possible) and to embed them in your project that way

Ah, sorry, that was not the complete error message:

- Running command: neko /usr/lib/haxe/lib/lime/2,3,1/templates/bin/hxswfml.n ttf2hash2 libertine.otf /Users/ls/src/KulamiOnline/gui/fonts/libertine.otf.hash -glyphs 32-255
Called from ? line 1
Called from be/haxer/hxswfml/Main.hx line 252
Called from be/haxer/hxswfml/FontWriter.hx line 162
Called from format/ttf/Reader.hx line 35
Called from format/ttf/Reader.hx line 201
Called from /usr/lib/haxe/std/haxe/io/Input.hx line 288
Called from /usr/lib/haxe/std/haxe/io/BytesInput.hx line 75
Uncaught exception - Eof

I am using openfl-html5-dom. I will try openfl-bitfive.

Oh, what version of OpenFL are you using?

With a current one, try just using the default HTML5 target. It should be better than openfl-html5-dom in basically every way. If you would prefer to use DOM mode instead of a single canvas element, use -Ddom when compiling (openfl test html5 -Ddom)


Oh, i was unaware that there is a default target for html5 and that it is not html5-dom :-).
I am now getting errors which are js related in general, I will take them to the haxe mailinglist.