TerminalImageViewer icon indicating copy to clipboard operation
TerminalImageViewer copied to clipboard

Add support for new teletext/legacy unicode characters

Open stefanhaustein opened this issue 5 years ago • 9 comments

This should allow for much better pattern matching: https://www.unicode.org/L2/L2019/19025-terminals-prop.pdf

stefanhaustein avatar Dec 03 '19 12:12 stefanhaustein

SO excited for this!

clort81 avatar Feb 15 '20 12:02 clort81

This is great!

innerlee avatar Feb 24 '20 08:02 innerlee

Does anybody have a pointer for installing a corresponding font on Manjaro?

stefanhaustein avatar Mar 01 '20 13:03 stefanhaustein

I downloaded unscii, put it in ~/.fonts, and ran fc-cache. http://pelulamu.net/unscii/

Then the font is available for use in terminals.
e.g. in ~/.Xresources XTerm*font: -unscii-unscii-medium-r-normal-full-16-160-75-75-c-80-iso10646-1

(then xrdb ~/.Xresources and test they got accepted with xlsfonts |grep unscii )

Or you can alias term invocation in ~/.bashrc like alias tterm='xterm -title uxtermsm -fg Turquoise1 -fn -unscii-unscii-medium-r-normal-full-16-160-75-75-c-80-iso10646-1&

It's a shame most font designers did not implement diagonal triangles ◢ to be full-height as they should be for PETSCII graphics, and the Unicode consortium failed to understand that a fullheight triangle deserves a new codepoint for 13.0.

Very depressing. I have modified some of my fonts to use fullheight triangles. DejaBlapCap

clort81 avatar Jul 01 '20 23:07 clort81

I have added experimental support for the 3x2 block characters, but haven't tested it so far.

Requires the new parameter -x

Don't hesitate to send a screenshot if it works (or not)....

stefanhaustein avatar Jul 05 '20 14:07 stefanhaustein

Test picture, 30 columns, 13 rows

tivtestcap4x tiv -x -w 30 -h 300 tivtestcap4x.png > tivtestcap4x.ans && cat tivtestcap4x.ans

tivtestcap4xres The unscii font is installed so freetype2 is using it as my fallback. My terminal can see all the fonts in original image.

Note it particularly has problems resolving the correct precise width and height of these: ▊ ▋ ▌ ▍ ▎ ▏ ▁ ▂ ▃ ▄ ▅ ▆ ▇

Note also that: Font designers have failed to make these full height, and the Unicode consortium refused to grant new codepoints for full height diagonal triangles, so you will need a patched font. ◢ ◣◥ ◤

tivtestcap4xgrid

Note that even the new block graphics of Unicode doesn't have the fat-centered horizontal and vertical blocks (BOOO!) in the upper right of the parallelogram. I'm just curious how those resolve.

clort81 avatar Dec 06 '20 14:12 clort81

Thanks for the test image -- it's very helpful.

Not sure what's going wrong -- it seems like the new characters got mismapped... perhaps a problem with mappping code points to utf8? I guess the "old" codes are all below 0xffff....

Concerning the test image in general: It would probably help if you could include a photo somewhere, making sure that improvements in "flat color" rendering don't lead to a regression there....

stefanhaustein avatar Dec 06 '20 15:12 stefanhaustein

Concerning the test image in general: It would probably help if you could include a photo somewhere, making sure that improvements in "flat color" rendering don't lead to a regression there....

I'm not understanding what kind of photo you are requesting; It seems to me any non-flat-shaded photo would serve that purpose.

Still having great fun with TerminalImageViewer almost every day. Thank you!

clort81 avatar Dec 19 '20 05:12 clort81

This font has the new block drawing characters, and -x does not render using them.

http://pelulamu.net/unscii/

clort81 avatar Jan 03 '21 23:01 clort81