Anonymous

Notcurses: Difference between revisions

From dankwiki
No change in size ,  00:00, 16 August 2021
Line 46: Line 46:


==Unicode==
==Unicode==
notcurses understands Unicode wide characters, and accounts for them. It is not possible to split the colors or styling of a wide glyph. It is not possible to print half of a glyph. It is not possible to print a narrow glyph over half of a wide glyph without obliterating the other half. These are all terminal emulator limitations.
Notcurses understands Unicode wide characters, and accounts for them. It is not possible to split the colors or styling of a wide glyph. It is not possible to print half of a glyph. It is not possible to print a narrow glyph over half of a wide glyph without obliterating the other half. These are all terminal emulator limitations.


Whether and how a given Unicode codepoint will be rendered depends almost entirely on font support. In general, <i>with sufficient fonts</i>, emoji and other pictographs will be properly rendered as expected. The Linux console has particularly limited fonts, and most characters beyond ASCII are not reliable in that environment. Certain Unicode glyphs are used by notcurses for drawing. Failure to render these glyphs reasonably will have a negative impact on notcurses functionality. Most important of these are the [https://unicode.org/charts/PDF/U2500.pdf Box Drawing Characters], the [https://unicode.org/charts/PDF/U2580.pdf Block Elements], and the [https://unicode.org/charts/PDF/U2800.pdf Braille Patterns].
Whether and how a given Unicode codepoint will be rendered depends almost entirely on font support. In general, <i>with sufficient fonts</i>, emoji and other pictographs will be properly rendered as expected. The Linux console has particularly limited fonts, and most characters beyond ASCII are not reliable in that environment. Certain Unicode glyphs are used by notcurses for drawing. Failure to render these glyphs reasonably will have a negative impact on notcurses functionality. Most important of these are the [https://unicode.org/charts/PDF/U2500.pdf Box Drawing Characters], the [https://unicode.org/charts/PDF/U2580.pdf Block Elements], and the [https://unicode.org/charts/PDF/U2800.pdf Braille Patterns].