-
Notifications
You must be signed in to change notification settings - Fork 344
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
JS: FontBuilder artifacts #936
Comments
I was just playing around with this newer font metrics API: https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics See demo in https://codepen.io/christianzom/pen/vYyzBPQ?editors=1010 (pasted code below for the record). Would it be an option to use those new metrics given the API is pretty new? I think it is hard to draw characters at the right place, since some characters extend backwards in the X coordinate (see demo of a "p" above). It might be best to draw each letter individually to a canvas with a safety margin, then transfer the output using the textmetrics to the main texture. What do you think? BTW, there is this related past issue here: #390
|
Hmm, never mind (yet) about using the new API: Haxe doesn't have those experimental fields available yet (HaxeFoundation/haxe#10166) |
Hi!
I'm trying to use FontBuilder like this:
I'm loading the font via HTML and CSS like this:
Unfortunately, I'm getting weird font pieces being drawn wrong, like this:
The problem seems to be dependent on the font size. This happens with others fonts as well, like Pompiere-Regular.
It looks like the font bitmap generation code might have a bug? If it helps I can setup a demo app with the issue.
The text was updated successfully, but these errors were encountered: