-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Unicode 16 octants #2820
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,9 +226,9 @@ likely get blanks or � (U+FFFD, REPLACEMENT CHARACTER) for missing characters, | |
and subsequent characters on the line may be misplaced. | ||
|
||
It is worth knowing that several terminals draw the block characters directly, | ||
rather than loading them from a font. This is generally desirable. Quadrants | ||
and sextants are not the place to demonstrate your design virtuosity. To | ||
inspect your environment's rendering of drawing characters, run | ||
rather than loading them from a font. This is generally desirable. Quadrants, | ||
sextants, and octants are not the place to demonstrate your design virtuosity. | ||
To inspect your environment's rendering of drawing characters, run | ||
`notcurses-info`. The desired output ought look something like this: | ||
|
||
<p align="center"> | ||
|
@@ -309,7 +309,8 @@ If things break or seem otherwise lackluster, **please** consult the | |
Notcurses will not make use of bitmap protocols unless the terminal positively | ||
indicates support for them, even if <code>NCBLIT_PIXEL</code> has been | ||
requested. Likewise, sextants (<code>NCBLIT_3x2</code>) won't be used without | ||
Unicode 13 support, etc. <code>ncvisual_blit()</code> will use the best blitter | ||
Unicode 13 support, octants (<code>NCBLIT_4x2</code>) won't be used without | ||
Unicode 17 support, etc. <code>ncvisual_blit()</code> will use the best blitter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have we traveled to the future in a Delorean? unicode 17 does not yet exist afaik |
||
available, unless <code>NCVISUAL_OPTION_NODEGRADE</code> is provided (in | ||
which case it will fail). | ||
</details> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ typedef enum { | |
NCBLIT_2x1, // halves + 1x1 | ||
NCBLIT_2x2, // quadrants + 2x1 | ||
NCBLIT_3x2, // sextants + 1x1 | ||
NCBLIT_4x2, // octants + quadrants + 2x1 + 1x1 | ||
NCBLIT_BRAILLE, // 4 rows, 2 cols (braille) | ||
NCBLIT_PIXEL, // pixel graphics | ||
NCBLIT_4x1, // four vertical levels, (plots) | ||
|
@@ -238,6 +239,7 @@ The different **ncblitter_e** values select from among available glyph sets: | |
* **NCBLIT_2x1**: Adds the half blocks (▄▀) to **NCBLIT_1x1**. | ||
* **NCBLIT_2x2**: Adds left and right half blocks (▌▐) and quadrants (▖▗▟▙) to **NCBLIT_2x1**. | ||
* **NCBLIT_3x2**: Adds sextants to **NCBLIT_1x1**. | ||
* **NCBLIT_4x2**: Adds octants to **NCBLIT_2x2**. | ||
* **NCBLIT_BRAILLE**: 4 rows and 2 columns of braille (⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿). | ||
* **NCBLIT_PIXEL**: Adds pixel graphics (these also work in ASCII). | ||
|
||
|
@@ -343,10 +345,11 @@ or if both ***nc*** and ***n*** are **NULL**. | |
|
||
**ncvisual_media_defblitter** returns the blitter selected by **NCBLIT_DEFAULT** | ||
in the specified configuration. If UTF8 is not enabled, this will always be | ||
**NCBLIT_1x1**. If ***scale*** is **NCSCALE_NONE** or **NCSCALE_SCALE**, the | ||
aspect-preserving **NCBLIT_2x1** will be returned. If sextants are available | ||
(see **notcurses_cansextant**), this will be **NCBLIT_3x2**, or otherwise | ||
**NCBLIT_2x2**. | ||
**NCBLIT_1x1**. If octants are available, (see **notcurses_canictant**), the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
the whole reason why i'm not sure about it being the default for so i think we stick with now, maybe it should be the default for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't quite follow the reasoning. The I'd be fine with never making There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm thinking of octants as basically a more attractive, predictable braille. i.e. both are just implementing a 4x2 blitter, but you pretty much know what octants are going to look like. so octants have the same advantages and disadvantages otherwise that braille does -- the advantage is that you can get higher resolution in a fixed cell geometry, and the disadvantage is that you stand to lose color fidelity (which can in certain cases make the image effectively unrecognizable). 4x2 is chosen when the user requests 4x2, whether they choose There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I agree. |
||
aspect-preserving **NCBLIT_4x2** will be returned. If ***scale*** is | ||
**NCSCALE_NONE** or **NCSCALE_SCALE**, the aspect-preserving **NCBLIT_2x1** | ||
will be returned. If sextants are available (see **notcurses_cansextant**), | ||
this will be **NCBLIT_3x2**, or otherwise **NCBLIT_2x2**. | ||
|
||
# NOTES | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,39 @@ extern "C" { | |
#define NCHALFBLOCKS L" ▀▄█" | ||
#define NCQUADBLOCKS L" ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█" | ||
#define NCSEXBLOCKS L" 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓▌🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞🬟🬠🬡🬢🬣🬤🬥🬦🬧▐🬨🬩🬪🬫🬬🬭🬮🬯🬰🬱🬲🬳🬴🬵🬶🬷🬸🬹🬺🬻█" | ||
#define NCOCTBLOCKS \ | ||
L" \U0001CEA8\U0001CEAB\U0001FB82\U0001CD00\U00002598\U0001CD01\U0001CD02"\ | ||
"\U0001CD03\U0001CD04\U0000259D\U0001CD05\U0001CD06\U0001CD07\U0001CD08\U00002580"\ | ||
"\U0001CD09\U0001CD0A\U0001CD0B\U0001CD0C\U0001FBE6\U0001CD0D\U0001CD0E\U0001CD0F"\ | ||
"\U0001CD10\U0001CD11\U0001CD12\U0001CD13\U0001CD14\U0001CD15\U0001CD16\U0001CD17"\ | ||
"\U0001CD18\U0001CD19\U0001CD1A\U0001CD1B\U0001CD1C\U0001CD1D\U0001CD1E\U0001CD1F"\ | ||
"\U0001FBE7\U0001CD20\U0001CD21\U0001CD22\U0001CD23\U0001CD24\U0001CD25\U0001CD26"\ | ||
"\U0001CD27\U0001CD28\U0001CD29\U0001CD2A\U0001CD2B\U0001CD2C\U0001CD2D\U0001CD2E"\ | ||
"\U0001CD2F\U0001CD30\U0001CD31\U0001CD32\U0001CD33\U0001CD34\U0001CD35\U0001FB85"\ | ||
"\U0001CEA3\U0001CD36\U0001CD37\U0001CD38\U0001CD39\U0001CD3A\U0001CD3B\U0001CD3C"\ | ||
"\U0001CD3D\U0001CD3E\U0001CD3F\U0001CD40\U0001CD41\U0001CD42\U0001CD43\U0001CD44"\ | ||
"\U00002596\U0001CD45\U0001CD46\U0001CD47\U0001CD48\U0000258C\U0001CD49\U0001CD4A"\ | ||
"\U0001CD4B\U0001CD4C\U0000259E\U0001CD4D\U0001CD4E\U0001CD4F\U0001CD50\U0000259B"\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my eyes |
||
"\U0001CD51\U0001CD52\U0001CD53\U0001CD54\U0001CD55\U0001CD56\U0001CD57\U0001CD58"\ | ||
"\U0001CD59\U0001CD5A\U0001CD5B\U0001CD5C\U0001CD5D\U0001CD5E\U0001CD5F\U0001CD60"\ | ||
"\U0001CD61\U0001CD62\U0001CD63\U0001CD64\U0001CD65\U0001CD66\U0001CD67\U0001CD68"\ | ||
"\U0001CD69\U0001CD6A\U0001CD6B\U0001CD6C\U0001CD6D\U0001CD6E\U0001CD6F\U0001CD70"\ | ||
"\U0001CEA0\U0001CD71\U0001CD72\U0001CD73\U0001CD74\U0001CD75\U0001CD76\U0001CD77"\ | ||
"\U0001CD78\U0001CD79\U0001CD7A\U0001CD7B\U0001CD7C\U0001CD7D\U0001CD7E\U0001CD7F"\ | ||
"\U0001CD80\U0001CD81\U0001CD82\U0001CD83\U0001CD84\U0001CD85\U0001CD86\U0001CD87"\ | ||
"\U0001CD88\U0001CD89\U0001CD8A\U0001CD8B\U0001CD8C\U0001CD8D\U0001CD8E\U0001CD8F"\ | ||
"\U00002597\U0001CD90\U0001CD91\U0001CD92\U0001CD93\U0000259A\U0001CD94\U0001CD95"\ | ||
"\U0001CD96\U0001CD97\U00002590\U0001CD98\U0001CD99\U0001CD9A\U0001CD9B\U0000259C"\ | ||
"\U0001CD9C\U0001CD9D\U0001CD9E\U0001CD9F\U0001CDA0\U0001CDA1\U0001CDA2\U0001CDA3"\ | ||
"\U0001CDA4\U0001CDA5\U0001CDA6\U0001CDA7\U0001CDA8\U0001CDA9\U0001CDAA\U0001CDAB"\ | ||
"\U00002582\U0001CDAC\U0001CDAD\U0001CDAE\U0001CDAF\U0001CDB0\U0001CDB1\U0001CDB2"\ | ||
"\U0001CDB3\U0001CDB4\U0001CDB5\U0001CDB6\U0001CDB7\U0001CDB8\U0001CDB9\U0001CDBA"\ | ||
"\U0001CDBB\U0001CDBC\U0001CDBD\U0001CDBE\U0001CDBF\U0001CDC0\U0001CDC1\U0001CDC2"\ | ||
"\U0001CDC3\U0001CDC4\U0001CDC5\U0001CDC6\U0001CDC7\U0001CDC8\U0001CDC9\U0001CDCA"\ | ||
"\U0001CDCB\U0001CDCC\U0001CDCD\U0001CDCE\U0001CDCF\U0001CDD0\U0001CDD1\U0001CDD2"\ | ||
"\U0001CDD3\U0001CDD4\U0001CDD5\U0001CDD6\U0001CDD7\U0001CDD8\U0001CDD9\U0001CDDA"\ | ||
"\U00002584\U0001CDDB\U0001CDDC\U0001CDDD\U0001CDDE\U00002599\U0001CDDF\U0001CDE0"\ | ||
"\U0001CDE1\U0001CDE2\U0000259F\U0001CDE3\U00002586\U0001CDE4\U0001CDE5\U00002588" | ||
#define NCBRAILLEEGCS \ | ||
L"\u2800\u2801\u2808\u2809\u2802\u2803\u280a\u280b\u2810\u2811\u2818\u2819\u2812\u2813\u281a\u281b"\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh apparently i pulled this shit too, hah |
||
"\u2804\u2805\u280c\u280d\u2806\u2807\u280e\u280f\u2814\u2815\u281c\u281d\u2816\u2817\u281e\u281f"\ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm guessing your methodology for this kind of thing involved grepping for at a minimum
sextant
. i'm trying to think of other stuff we'd want to check.NCBLIT
is broad but probably a good one. i'll run these checks, just thinking aloud.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. I looked for
sextant
, but not forNCBLIT
.