Replies: 1 comment
-
|
Might be nice to also have a helper function, that decorates text with text sizing protocol sequences to hint about anything other than Narrow and CJK characters, especially anything in sequence or emojis, and can help generate automatic tests that "the results should be the same" as decorated and non-decorated. I have added text sizing detection to ucs-detect for next release, but I will also integrate it into blessed and we should reference that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This should allow folks to "render markdown" with "double size headings", using basic wrap(), width(), center(), or cut(), eg. from a tweet,
We already do sequence processing for SGR attributes and stuff, it would be very nice if we also managed the information in OSC 66 sequences for kitty text sizing protocol,
https://sw.kovidgoyal.net/kitty/text-sizing-protocol/
This should have very little overhead in width() just check if a detected \x1b sequence is OSC 66 and process accordingly, I think it should be easy enough to set and reset "Narrow cell width" from 1 temporarily and continue normal calculations, reset on termination. No new keyword arguments or public api functions required.
Similarly small overhead in normal processing for wrap(), but like osc hyperlink, that if we find break on word boundaries during this sequence it must be terminated and re-emitted in next line when broken, which was pretty tricky for hyperlinks.
Beta Was this translation helpful? Give feedback.
All reactions