Styled char/text proposition & ideas
Here is a proposition to implement styled char/text in HAGL.
One can now write text with optionally transparent background and foreground colors and zoom or shrink it.
You can look at https://github.com/CHiPs44/hagl_sdl2/blob/chips44-update-2/demo.c to see an example. Should I make a PR for this project, too?
I know it is something you want to implement for a long time, that's why I make this proposal.
Other ideas:
- Make the use of CR or LF to wrap text optional?
- Make text wrapping in a bounded box?
- Make text scrolling in a bounded box?
- Allow use of variable width fonts?
Silly ideas:
- Implement bold and/or italic
- Interpret ANSI sequences or even Markdown tags
- Implement shadowed, greyed out, underlined and strike-through text
- ...
Still not ready, checking 1/2/4 bits depth compatibility since blit and scale_blit seems to handle only 8 and 16 bits depth (1 or 2 bytes per pixel), and the last update to master introduced conflicts.
(resolving a bug with transparent char display...)