tchapi / Adafruit-GFX-Font-Customiser

A little utility to customise pixel fonts for the Adafruit GFX library
https://tchapi.github.io/Adafruit-GFX-Font-Customiser/
MIT License
90 stars 47 forks source link

Show pixels as squares #21

Closed arnoson closed 3 years ago

arnoson commented 3 years ago

Thanks for this awesome tool! Right now the pixels are not displayed as squares but as rectangles. Is there any option to enable this?

tchapi commented 3 years ago

Hi @arnoson

It's unfortunately due to how the "pixels" are rendered in the page (i.e. by a good old table) right now. So the "squareness" of the pixels is basically linked to the width of your window.

There surely is a better way to render this properly, but I haven't taken the time to dig deep into that for now.

Happy to review a PR if you have the time ! Best

arnoson commented 3 years ago

okay, I'll have a look if I find some time!

tchapi commented 3 years ago

In fact I'm on it :)

tchapi commented 3 years ago

Hi again @arnoson,

Do you think you could test https://github.com/tchapi/Adafruit-GFX-Font-Customiser/tree/feature/square-pixels to see if I haven't missed anything or introduced a regression ?

Thanks !

arnoson commented 3 years ago

Cool thanks! I tested it with a custom font. The pixels are perfect squares :) but unfortunately wide glyphs get cropped Screenshot 2021-03-23 193722

tchapi commented 3 years ago

Hmmm .. yeah, this is the responsive thing again. Ok, I'll work something out for big fonts tomorrow !

tchapi commented 3 years ago

Could you send me this custom font @arnoson so I can test your specific case ?

arnoson commented 3 years ago

sorry had no time, will send it tomorrow! Can I send it as a PM? It's the font of a friend I'm not shure if he's okay with it if I upload it here

tchapi commented 3 years ago

Received, tested — it works great. I'll merge the branch now.

PS: Rest assured that I removed all files of the font you sent me from my machines and used it only for testing purposes

arnoson commented 3 years ago

Finally I could test it and it works perfectly! Many thanks for your efforts