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

Incorrect .ttf to monochrome 16-bit conversion #83

Open
mithilshah3 opened this issue Jun 14, 2024 · 1 comment
Open

Incorrect .ttf to monochrome 16-bit conversion #83

mithilshah3 opened this issue Jun 14, 2024 · 1 comment

Comments

@mithilshah3
Copy link

I'm trying to convert a .ttf file to an array of 16-bit words using 'monochrome' preset with character width set to 'proportional'. But the generated array size doesn't match the width of the character. For example, if the width & height of a character is 9 & 25 respectively, the generated array consists of 50 16-bit words, i.e., 2 words for each row when in fact it should contain only 25 16-bit words. The byte-order setting (endianness) has no effect on the array size. Is there some other setting that needs to be applied?

@riuson
Copy link
Owner

riuson commented Jun 20, 2024

First of all, the font size may not match the size of the resulting character in bit representation. After creating the font, it may be necessary to trim unused (empty) spaces around the characters.

In the second place, recent versions have added such an option. Try it:
example

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

2 participants