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

-font does not accept characters #218

Open
peachey2k2 opened this issue Dec 22, 2024 · 0 comments
Open

-font does not accept characters #218

peachey2k2 opened this issue Dec 22, 2024 · 0 comments

Comments

@peachey2k2
Copy link

msdfgen --help specifies that -font takes a .ttf file along with one of the following:

  • a glyph index prefixed with letter g or G
  • a character code (undocumented: optionally prefixed with u or U)
  • a character in apostrophes, (ex: 'A')
-font <filename.ttf> <character code>
	Loads a single glyph from the specified font file.
	Format of character code is '?', 63, 0x3F (Unicode value), or g34 (glyph index).

However, the last option does not work, and results in an assert being triggered. As an example:

msdfgen sdf -font ./Miracode.ttf 'A' -o test.png -dimensions 64 64 -pxrange 4 -testrender render.png 1024 1024

results in:

No character specified! Use -font <file.ttf/otf> <character code>. Character code can be a Unicode index (65, 0x41), a character in apostrophes ('A'), or a glyph index prefixed by g (g36, g0x24).
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