TannerRogalsky / love.js

LÖVE ported to the web using Emscripten
MIT License
493 stars 53 forks source link

Error function: 0x67b3b8 when using ttf font #65

Open azarrias opened 5 years ago

azarrias commented 5 years ago

First of all thank you so much for your awesome web port of love2d.

I'm using love.js 0.11.0-rc3 and I've built a couple of very simple games with it without any hiccups. But the other day I got this on the game canvas (in the browser) when making a build:

Error

function: 0x67b3b8

Traceback

(tail call): ? (tail call): ?

That was quite obscure, so I had a hard time figuring out what was wrong. Finally, it seems as if one of the ttf fonts I was using was causing the issue, but just for the love.js build (I built for windows and android and both run fine).

I checked and the above error will reproduce just by having this in main.lua and the attached font unzipped to the same path:

myFont = love.graphics.newFont('flappy.ttf', 14)

function love.draw()
  love.graphics.setFont(myFont)
  love.graphics.print("Hello World", 400, 300)
end

flappy.zip

Would you know if there is a reason for this behaviour?