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 Creation #999

Open
peardox opened this issue Sep 19, 2024 · 3 comments
Open

Font Creation #999

peardox opened this issue Sep 19, 2024 · 3 comments

Comments

@peardox
Copy link

peardox commented Sep 19, 2024

A load of hte samples use fonts

Are these generated by some common app ? If so what is it? Specifically some app that outputs the CPP + HPP ?

If it's common then it should be mantioned in an easily accessible place

If not (and there is no app that does close to the cpp+hpp) then I guess I could write one - but don't wanna re-invent the wheel

Hoping there's something already (I'm lazy)

@Gadgetoid
Copy link
Member

There’s PGFUtil but it’s intended to create fonts for loading in MicroPython, though it shouldn’t be a huge stretch to convert those to hpp. It’s also in desperate need of TLC - https://github.com/gadgetoid/pgfutil

@peardox
Copy link
Author

peardox commented Sep 19, 2024

Yeah, that was an extrapalation of the desired functionality. Language awareness - would be easy to make one that uses a template for max flexibility...

@peardox
Copy link
Author

peardox commented Sep 30, 2024

Found some Chinese utility but - well, it's all Chinese

So - started rolling my own. Finally got as far as being able to render a TTF/OTF accurately to the screen and then on to a bitmap

test
This is a sample 32pt Segoe UI font (Win System font) - note the max rect is 33 high (from 32pt? fonts...)

test
This one's dogica - a 8pt render of a free font for small systems (need to DL + zoom image I guess)

The grey checkerbox is the rectangle for the char and the pink one is where the actal TTF gets rendered to
Could have an option to force monospace so e.g. Segoe was all same width
Space could be saved by only storing the pink area + an offset (possibly not worth it?)
Could also add in colour option for things like Emotes and hand-drawn glyphs

Currently Windows, Mac + Linux is Easy (FMX allows all mainstream OSes). Pi a little harder but do-able (I think) - would need Lazarus

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