riuson / lcd-image-converter

Tool to create bitmaps and fonts for embedded applications, v.2
https://lcd-image-converter.riuson.com/
GNU General Public License v3.0
337 stars 80 forks source link

Incorrect .ttf to monochrome 16-bit conversion #83

Open mithilshah3 opened 5 months ago

mithilshah3 commented 5 months ago

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 commented 5 months ago

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