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

Letters cut off #17

Open
Samsy opened this issue Jun 18, 2018 · 5 comments
Open

Letters cut off #17

Samsy opened this issue Jun 18, 2018 · 5 comments

Comments

@Samsy
Copy link

Samsy commented Jun 18, 2018

For some reasons exporting Futura font into MSDF cuts some characters.

CF : the letter U

16023_futuran0

capture d ecran 2018-06-18 a 16 46 40

Parameters :

var opts = {

  fontSize: 128,
  fieldtype : "msdf",
  textureWidth: 1024,
  textureHeight: 1024,
  charset: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890°.-()%£$€!?.,:;‘’“”&+-=*~&_#^\@/|<>{}[]" '
  // charset: 'abcdefghij'

}
@mattdesl
Copy link
Contributor

@arilotter do you remember this bug? I think we hit the same thing – I'm trying to remember how we fixed it.

@arilotter
Copy link
Contributor

Looks like we're missing some sort of margin parameter from the bmfont. I'd just use the XML fork of this project, it's been well maintained.

@rulkens
Copy link

rulkens commented Mar 27, 2019

Is there any news on this bug? I am running into the same problem for both Roboto and DIN fonts...
din-sheet0-msdf
roboto-sheet0-msdf

@arilotter
Copy link
Contributor

@rulkens This project isn't actively maintained, I'd suggest you use soimy's fork msdf-bmfont-xml: https://github.com/soimy/msdf-bmfont-xml

@Lutymane
Copy link

For those who's getting incorrect letter clipping:

  • find generateImage function in index.js
  • find const pad inside
  • change its value from 5 to something bigger (i use 10)

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

5 participants