hagl icon indicating copy to clipboard operation
hagl copied to clipboard

Styled char/text proposition & ideas

Open CHiPs44 opened this issue 3 years ago • 2 comments

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
  • ...

CHiPs44 avatar Jan 14 '23 17:01 CHiPs44

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.

CHiPs44 avatar Feb 12 '23 09:02 CHiPs44

(resolving a bug with transparent char display...)

CHiPs44 avatar Feb 16 '23 16:02 CHiPs44