Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I found an issue with bitmap fonts and Font.hx #367

Open
asoap opened this issue Apr 29, 2016 · 0 comments
Open

I found an issue with bitmap fonts and Font.hx #367

asoap opened this issue Apr 29, 2016 · 0 comments

Comments

@asoap
Copy link

asoap commented Apr 29, 2016

So I'm at my first crack with Flambe, and following around with a tutorial. The tutorial wanted to use a bitmap font, but the tutorial also didn't provide any of it's assets files. Fine, I grabbed one that I used with Starling.

But it didn't work. I kept on getting an error in the JS saying that the glyph didn't exist. I did some digging in Font.hx and I found the issue.

For the character code it runs pair.getInt();

And through debugging I found that it was trying to convert "71" into an integer. This is including the quotation marks. So I tweaked it to get rid of the quotation marks, and now it works.

public function getInt () :Int {
//return Std.parseInt(_value);
return Std.parseInt( _value.substr(1, _value.length-2) );
}

Hopefully this helps someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant