-
Notifications
You must be signed in to change notification settings - Fork 818
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
New checkerboards, more quadrants, and sextants #708
Conversation
- Added some new checkerboard characters U+2427 - U+2429, U+1FB95, U+1FB96 (Symbols for Legacy Computing). - Added new centered Quadrants U+1FBE4, U+1FBE5 (Symbols for Legacy Computing). Note U+1FBE6, U+1FBE7 will be added soon as part of Octants. - Added Triangular Quadrant characters U+1FB68 - U+1FB6F, U+1FB9A, U+1FB9B (Symbols for Legacy Computing). - Added Sextant characters U+1FB00 - U+1FB3B (Symbols for Legacy Computing). Note this update does not modify any existing character, I'm only adding new ones.
- Added new centered Quadrants U+1FBE6, U+1FBE7 (Symbols for Legacy Computing). - Added circle quadrants U+1FBE8 - U+1FBEF (Symbols for Legacy Computing). Note this update does not modify any existing character, I'm only adding new ones.
Thanks for all this work! Sorry for the delay in following up. Just to let you know, I have set aside some time next week to take a look at this and get it merged. Cheers |
Thanks @aaronbell. I have some Sextants test files if you want: https://github.com/PhMajerus/ANSI-art/tree/main/Unicode This is just the beginning, I have Octants #711, Large Type Pieces #709, as well as a few misc. legacy computing symbols, ready as well: |
@aaronbell |
Glyph names don’t really matter too much, so don’t worry about it :). I’m planning to take a look at this stuff soon btw! |
Using "u[CP]" instead of "uni[CP]" for supplementary planes characters.
Hello! I'm sorry it has taken me a while to taken a look into this, but everything you've done looks good. I'm going to go ahead and merge these in. |
Awesome, I will update Notcurses to consider these elements usable on the Windows Console. Is there any way to test for this support at compile, link, and/or runtime? I understand, of course, that a particular font might be missing the glyphs. |
Thanks @aaronbell ! I'm glad they were good to go as it, that should mean the others I have ready should be as well, as they use the same principles and grid coordinates. The next batch will be diagonals using the same grid coordinates as the sextants from this one. It will be a small update with only 2×44 glyphs (for GDI+DWrite), but the group after that is the octants, which is 2×236 glyphs. Let me know if you prefer me to group them as a single PR instead. |
@dankamongmen Thanks for your reactivity to update Notcurses ! I don't think there is any clean way to detect that these characters are available. There are some solutions I can think of, but none is perfect:
It is probably better to just wait for the Microsoft Store version of Terminal to include the updated font and then turn it on, as it means almost every user will get update quickly. |
@PhMajerus Might as well just group them :) BTW, I think I mentioned this before but we are planning one more release of this version of Cascadia in the coming weeks, and then will hold off for a couple months as I work on the next version. So if you want this to be added soon, I'd suggest getting it pulled together! :) |
@aaronbell Yes, you mentioned it, but most should be easy to convert to your new version, and at least we have a reference to experiment with those characters. Should I just add everything I have ready in a single PR then?
That's 948 glif files at once, they're all simple polygons, except for the segmented digits and large type pieces. |
@PhMajerus go for it! |
thanks for the detailed response @PhMajerus ! |
Just to complete, as this PR can be used as reference for changes to perform to add glyphs and one step was missing from the details above: The mapping to substitute GDI with DWrite versions of glyphs added in See #721 for details. |
…extants, segmented digits, and large type pieces (#723) ## New diagonals, octants, sedecimants & eights, separated quadrants & sextants, segmented digits, and large type pieces (Symbols for Legacy Computing) - Added diagonals `U+1FB3C` - `U+1FB67` - Added octants (2×4 mosaics) `U+1CD00` - `U+1CDE5` - Added sedecimants (4×4 mosaics) `U+1CE90` - `U+1CEAF` - Added eights (8×8 patterns) `U+1FB70` - `U+1FB80`, `U+1FB82` - `U+1FB8B` - Added misc. blocks `U+1FB97`, `U+1FBCE`, `U+1FBCF` - Added separated quadrants (2×2) `U+1CC21` - `U+1CC2F` - Added separated sextants (2×3) `U+1CE51` - `U+1CE8F` - Added segmented digits (LED/LCD display style) `U+1CCF0` - `U+1CCF9` - Added large type pieces (see #709) `U+1CE1A` - `U+1CE50` This update does not modify any existing character, it is only adding new characters from the Symbols for Legacy Computing blocks (original and supplement). These characters use the same unified coordinates as my previous #708 submission. It continues the sextants with diagonal fills that meet the sextants corners, adds octants, most of the 8×8 pixels-based lines and fills (sedecimants & eights), as well as the separated mosaics, segmented digits, and large type pieces. Some existing mosaic characters are not perfectly aligned on the same grid, and it would be best to adjust them to fit the unified grid as well, but that is not part of this PR, and I guess we won't have the time to do that for the next release. Note it does not complete the original Symbols for Legacy Computing block yet, as it does not include the extra lines/box-drawing characters, shaded mosaics, MouseText, and some other specific symbols. The focus has been on completing the mosaics part, including the ones coming in Unicode 16.0, and the Large Type Pieces. This one is quite big, containing almost all the glyphs I've been working on at once. This is to meet the short deadline for the next release of Cascadia Code, as discussed with @aaronbell. It contains 948 glyphs for 479 characters. Many of the glyphs are pure geometric shapes with no artistic liberty at all, they simply follow the unified grid and handle both GDI and DWrite ("stypo") variants. All the glyphs have been added to the `features.fea::@NotSpace` list of non-italic fonts, except for the segmented digits, which have been added to `@Digit` instead of `@NotSpace`. The segmented digits `U+1CCF0` - `U+1CCF9` are based on their original Atari ST design and Unicode reference design, with the bounding box and segments widths adjusted to fit the `H` character, and spaces between the segments large enough to be visible even at 12pt on 100% DPI. The Large Type Pieces are based on their original HP 2640 Series terminals design and Unicode reference design, but I took liberties to reinterpret the pieces to make them more rounded and, I believe, more in line with the Cascadia Code design. Note the Unicode reference design is somewhat wrong as their diagonals do not join perfectly, while my version takes great care to support all the combinations alignments with straight diagonal lines. The only piece where more artistic liberty is available is the `Q` stem `U+1CE45`, where I tried to make it more reminiscent of Cascadia's `Q` design. More details and screenshots of the large type pieces are available in issue #709. Finally, `U+1FB97` is the same pattern as `U+1CDB7`, they have different origins, but I'm not sure why Unicode repeated it for octants instead of reusing the existing one as they did for some other existing pattern. I included them as separate glyphs as well. * Continues #708 * Improves #715 (does not close it, but greatly improves coverage) * Improves #597 (does not close it, but greatly improves coverage) * Closes #711 * Closes #709 Co-authored-by: Philippe Majerus <[email protected]>
This update adjusts the points coordinates of some previously existing blocks/mosaics characters to fit them in the same grid as used by octants and eights. This is required because the new octants and eights from Symbols for Legacy Computing do not duplicate existing patterns and expect those existing one to join perfectly with them to provide the whole set of all possible pseudopixels mosaics. This update verifies and adjusts the existing characters that are now required to join seamlessly with the extended pseudo-pixels mosaics introduced with the symbols for legacy computing. Some of the existing characters were not proper mosaics, most notably `▞`, where the two black rectangles overlap because they don't use the same y coordinates. This shouldn't happen as all the mosaics are supposed to fit precisely on a unified grid. Only a few characters required adjustments, but this PR also documents all the glyphs that have been checked to ensure alignments of all the mosaic characters. **BLOCKS:** `U+00A0` nbspace : already correct `U+2588` fullBlock & fullBlock.stypo : already correct (used as reference bounding rectangle for all pseudopixels mosaics) **HALF-BLOCKS:** `U+2580` upperHalfBlock & upperHalfBlock.stypo : y=50% fixed from 707 to 873 (gdi) and 710 (stypo) `U+2584` lowerHalfBlock & lowerHalfBlock.stypo : already correct (confirming upperHalfBlock y=50% was wrong) `U+258C` leftBlock & leftBlock.stypo : already correct `U+2590` rightBlock & rightBlock.stypo : already correct **QUADRANTS:** `U+2596` lowerLeftBlock & lowerLeftBlock.stypo : already correct (confirming all other corrections above and below) `U+2597` lowerRightBlock & lowerRightBlock.stypo : y=50% fixed from 707 to 873 (gdi) and 710 (stypo) `U+2598` upperLeftBlock & upperLeftBlock.stypo : y=50% fixed from 707 to 873 (gdi) and 710 (stypo) `U+2599` upperLeftAndLowerLeftAndLowerRightBlock & upperLeftAndLowerLeftAndLowerRightBlock.stypo : already correct `U+259A` upperLeftAndLowerRightBlock & upperLeftAndLowerRightBlock.stypo : y=50% fixed from 707 to 873 (gdi) and 710 (stypo) `U+259B` upperLeftAndUpperRightAndLowerLeftBlock & upperLeftAndUpperRightAndLowerLeftBlock.stypo : y=50% fixed from 707 to 873 (gdi) and 710 (stypo) `U+259C` upperLeftAndUpperRightAndLowerRightBlock & upperLeftAndUpperRightAndLowerRightBlock.stypo : y=50% fixed from 707 to 873 (gdi) and 710 (stypo) `U+259D` upperRightBlock & upperRightBlock.stypo : y=50% fixed from 707 to 873 (gdi) and 710 (stypo) `U+259E` upperRightAndLowerLeftBlock & upperRightAndLowerLeftBlock.stypo : Some y=50% fixed from 707 to 873 (gdi) and 710 (stypo), some were already correct `U+259F` upperRightAndLowerLeftAndLowerRightBlock & upperRightAndLowerLeftAndLowerRightBlock.stypo : already correct **OCTANTS:** `U+2582` lowerOneQuarterBlock & lowerOneQuarterBlock.stypo : already correct `U+2586` lowerThreeQuartersBlock & lowerThreeQuartersBlock.stypo : already correct **EIGHTS:** `U+2581` lowerOneEighthBlock & lowerOneEighthBlock.stypo : gdi was correct, y fixed from -183 to -182 (rounding unification for all Eights) for stypo `U+2583` lowerThreeEighthsBlock & lowerThreeEighthsBlock.stypo : y fixed from 534 to 535 (rounding unification for all Eights) for GDI, stypo was correct `U+2585` lowerFiveEighthsBlock & lowerFiveEighthsBlock.stypo : already correct `U+2587` lowerSevenEighthsBlock & lowerSevenEighthsBlock.stypo : y fixed from 1887 to 1888 (rounding unification for all Eights) for GDI, stypo was correct `U+2594` upperOneEighthBlock & upperOneEighthBlock.stypo : y fixed from 1887 to 1888 (rounding unification for all Eights) for GDI, stypo was correct `U+1FB83` upperThreeEighthsBlock & upperThreeEighthsBlock.stypo : from my PR #723 `U+1FB86` upperSevenEighthsBlock & upperSevenEighthsBlock.stypo : from my PR #723 `U+2589` leftSevenEighthsBlock & leftSevenEighthsBlock.stypo : already correct `U+258A` leftThreeQuartersBlock & leftThreeQuartersBlock.stypo : already correct `U+258B` leftFiveEighthsBlock & leftFiveEighthsBlock.stypo : already correct `U+258D` leftThreeEighthsBlock & leftThreeEighthsBlock.stypo : already correct `U+258E` leftOneQuarterBlock & leftOneQuarterBlock.stypo : already correct `U+258F` leftOneEighthBlock & leftOneEighthBlock.stypo : already correct `U+2595` rightOneEighthBlock & rightOneEighthBlock.stypo : already correct `U+1FB87` rightOneQuarterBlock & rightOneQuarterBlock.stypo : from my PR #723 `U+1FB88` rightThreeEighthsBlock & rightThreeEighthsBlock.stypo : from my PR #723 `U+1FB89` rightFiveEighthsBlock & rightFiveEighthsBlock.stypo : from my PR #723 `U+1FB8A` rightThreeQuartersBlock & rightThreeQuartersBlock.stypo : from my PR #723 `U+1FB8B` rightSevenEighthsBlock & rightSevenEighthsBlock.stypo : from my PR #723 This fixes the inconsistent alignments problem explained in issue #644, and ensures unified grid coordinates with PR #708 and #723. ## Validation Steps Performed Based on purely mathematical grid coordinates already used for octants, checked visually in VTT, Terminal Preview 1.20.10822.0 and Canary 1.21.240424002-llm, and Visual Studio editor. Note there is another related issue that impacts some of those characters, but this PR at least provides the correct glyphs and improves the situation. I believe the remaining alignment issue to be a problem in Terminal itself as it works perfectly in Visual Studio editor, and the original Cascadia Mono 2111.001 exhibits the same issue. More details about this in #644. Having the proper coordinates at least ensures they won't induce in error someone trying to fix the Terminal rendering and expecting the alignments to work with a font using inconsistent glyphs coordinates. A believe this PR to be a step in the right direction. Closes #644 Co-authored-by: Philippe Majerus <[email protected]>
This update adds support for: - Unicode 16 Large Type Pieces (they are really cool, you *have* to see them) - Unicode 13 Sextants (U+1FB00 - U+1FB3B) - Octants, sedecimants, eights, miscellanrous blocks, separated quadrants and sextants, and diagonals - Segmented digits (think LED numbers) - Checkerboards It also fixes the coordinate system used in all of the blocks, half-blocks, quadrants and eights for consistency. This update does **not** include the new "Nerd Fonts" variant of Cascadia Code or Cascadia Mono. With big thanks to @PhMajerus for contributing all of the new symbols for legacy computing. See microsoft/cascadia-code#723, microsoft/cascadia-code#708 and microsoft/cascadia-code#727 for more details.
This update adds support for: - Unicode 16 Large Type Pieces (they are really cool, you *have* to see them) - Unicode 13 Sextants (U+1FB00 - U+1FB3B) - Octants, sedecimants, eights, miscellanrous blocks, separated quadrants and sextants, and diagonals - Segmented digits (think LED numbers) - Checkerboards It also fixes the coordinate system used in all of the blocks, half-blocks, quadrants and eights for consistency. This update does **not** include the new "Nerd Fonts" variant of Cascadia Code or Cascadia Mono. With big thanks to @PhMajerus for contributing all of the new symbols for legacy computing. See microsoft/cascadia-code#723, microsoft/cascadia-code#708 and microsoft/cascadia-code#727 for more details. (cherry picked from commit 41bb28c) Service-Card-Id: 92434844 Service-Version: 1.19
This update adds support for: - Unicode 16 Large Type Pieces (they are really cool, you *have* to see them) - Unicode 13 Sextants (U+1FB00 - U+1FB3B) - Octants, sedecimants, eights, miscellanrous blocks, separated quadrants and sextants, and diagonals - Segmented digits (think LED numbers) - Checkerboards It also fixes the coordinate system used in all of the blocks, half-blocks, quadrants and eights for consistency. This update does **not** include the new "Nerd Fonts" variant of Cascadia Code or Cascadia Mono. With big thanks to @PhMajerus for contributing all of the new symbols for legacy computing. See microsoft/cascadia-code#723, microsoft/cascadia-code#708 and microsoft/cascadia-code#727 for more details. (cherry picked from commit 41bb28c) Service-Card-Id: 92434845 Service-Version: 1.20
Summary of the Pull Request
This update does not modify any existing character, it is only adding new characters from the Symbols for Legacy Computing block.
This is the first pull request of a few I have ready. I unified the coordinates for sextants and octants and created the glyph files for pretty much all of the pseudo-pixels mosaic characters. The goal is to have full support for all pseudo-pixels as they are used for graphics rendering in the terminal. More goodies for terminals are also coming after the mosaics.
This contains a lot of glyphs, and the octants will be even worse. However, fear not, to avoid typos or other human error while creating hundreds of glyphs, I decided instead to create some script tools to generate them. So they should be mathematically exact, based on two bounding box sets of coordinates:
GDI versions assumes a full cell is [0,2226},[1200,-480], while DirectWrite versions assumes [0,1900],[1200,-480].
I checked all the characters in VTT, as well as in real use in Windows Terminal at 100% and 200% DPI screens and at different zoom levels. I have a set of sextants ANSI-art (or should we call those Uni-art?) files that now also display really nicely in Windows Terminal.
Here are the characters added by this pull request:

References
Pseudo-pixels mosaic characters have been discussed in #647, and this covers all the 2×2 "quadrants" by adding some new ones, as well as all the 2×3 "sextants".
Sextants seem to be well supported on Linux, so we need these characters to ensure Windows Terminal can handle utilities using them as well.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Added 172 glyphs.
Added the new glyphs .glif files to the glyphs subfolder of each font. Being block (full-cell) symbols, they are identical in all fonts and files are just duplicated.
Block-based glyphs have both a normal (GDI) and .stypo (DWrite) variants.
Added the new glyphs, including
.stypo
ones, tofeatures.fea::@NotSpace
array of non-italic fonts (at the end but before the LIG list).checkerBoardDeleteApple2 checkerBoardDeleteTrs80 checkerBoardDeleteAmstradCpc checkerBoardDeleteAmstradCpc.stypo checkerBoardFill checkerBoardFill.stypo checkerBoardFillInverse checkerBoardFillInverse.stypo blockQuadrant-UC blockQuadrant-UC.stypo blockQuadrant-LC blockQuadrant-LC.stypo blockQuadrant-ML blockQuadrant-ML.stypo blockQuadrant-MR blockQuadrant-MR.stypo blockTriangle-1 blockTriangle-1.stypo blockTriangle-2 blockTriangle-2.stypo blockTriangle-3 blockTriangle-3.stypo blockTriangle-4 blockTriangle-4.stypo blockTriangle-14 blockTriangle-14.stypo blockTriangle-23 blockTriangle-23.stypo blockTriangle-123 blockTriangle-123.stypo blockTriangle-124 blockTriangle-124.stypo blockTriangle-134 blockTriangle-134.stypo blockTriangle-234 blockTriangle-234.stypo blockCircle-1 blockCircle-1.stypo blockCircle-2 blockCircle-2.stypo blockCircle-3 blockCircle-3.stypo blockCircle-4 blockCircle-4.stypo blockCircle-UC blockCircle-UC.stypo blockCircle-LC by blockCircle-LC.stypo blockCircle-ML blockCircle-ML.stypo blockCircle-MR blockCircle-MR.stypo blockSextant-1 blockSextant-1.stypo blockSextant-2 blockSextant-2.stypo blockSextant-12 blockSextant-12.stypo blockSextant-3 blockSextant-3.stypo blockSextant-13 blockSextant-13.stypo blockSextant-23 blockSextant-23.stypo blockSextant-123 blockSextant-123.stypo blockSextant-4 blockSextant-4.stypo blockSextant-14 blockSextant-14.stypo blockSextant-24 blockSextant-24.stypo blockSextant-124 blockSextant-124.stypo blockSextant-34 blockSextant-34.stypo blockSextant-134 blockSextant-134.stypo blockSextant-234 blockSextant-234.stypo blockSextant-1234 blockSextant-1234.stypo blockSextant-5 blockSextant-5.stypo blockSextant-15 blockSextant-15.stypo blockSextant-25 blockSextant-25.stypo blockSextant-125 blockSextant-125.stypo blockSextant-35 blockSextant-35.stypo blockSextant-235 blockSextant-235.stypo blockSextant-1235 blockSextant-1235.stypo blockSextant-45 blockSextant-45.stypo blockSextant-145 blockSextant-145.stypo blockSextant-245 blockSextant-245.stypo blockSextant-1245 blockSextant-1245.stypo blockSextant-345 blockSextant-345.stypo blockSextant-1345 blockSextant-1345.stypo blockSextant-2345 blockSextant-2345.stypo blockSextant-12345 blockSextant-12345.stypo blockSextant-6 blockSextant-6.stypo blockSextant-16 blockSextant-16.stypo blockSextant-26 blockSextant-26.stypo blockSextant-126 blockSextant-126.stypo blockSextant-36 blockSextant-36.stypo blockSextant-136 blockSextant-136.stypo blockSextant-236 blockSextant-236.stypo blockSextant-1236 blockSextant-1236.stypo blockSextant-46 blockSextant-46.stypo blockSextant-146 blockSextant-146.stypo blockSextant-1246 blockSextant-1246.stypo blockSextant-346 blockSextant-346.stypo blockSextant-1346 blockSextant-1346.stypo blockSextant-2346 blockSextant-2346.stypo blockSextant-12346 blockSextant-12346.stypo blockSextant-56 blockSextant-56.stypo blockSextant-156 blockSextant-156.stypo blockSextant-256 blockSextant-256.stypo blockSextant-1256 blockSextant-1256.stypo blockSextant-356 blockSextant-356.stypo blockSextant-1356 blockSextant-1356.stypo blockSextant-2356 blockSextant-2356.stypo blockSextant-12356 blockSextant-12356.stypo blockSextant-456 blockSextant-456.stypo blockSextant-1456 blockSextant-1456.stypo blockSextant-2456 blockSextant-2456.stypo blockSextant-12456 blockSextant-12456.stypo blockSextant-3456 blockSextant-3456.stypo blockSextant-13456 blockSextant-13456.stypo blockSextant-23456 blockSextant-23456.stypo
Added list of glyphs and filenames to the
content.plist::dict
of the glyphs subfolder of each font.Added mapping to substitute GDI with DWrite versions of glyphs to the
features.fea::rclt
feature of non-italic fonts and infeatures/rclt.fea::rclt
.Added the new glyphs to the
lib.plist::public.glyphOrder
array of each font (both normals and italics).Added
"uni[CP]"
names tolib.plist::public.postscriptNames
dictionary of each font.Updated
FONTLOG.txt
Added characters image and updated
README.md
accordinglyNote I used a new image for these characters because while it has only 172 glyphs at this point, next updates will bring over 900, and they are identical between regular and italic fonts.
Before (if applicable) and After Images of the Character(s)
This update adds characters of the Symbols for Legacy Computing, especially interesting for terminals:
U+1FB95
: Checker Board Fill (full block size)U+1FB96
: Inverse Checker Board Fill (full block size)U+2427
: Symbol for delete square checker board form (Apple ][ style)U+2428
: Symbol for delete rectangular checker board form (TRS-80 style)U+2429
: Symbol for delete medium shade form (Amstrad CPC style)U+1FBE4
-U+1FBE7
: New centered Quadrants (Symbols for Legacy Computing).U+1FBE8
-U+1FBEF
: Circular Quadrant characters (Symbols for Legacy Computing).U+1FB68
-U+1FB6F
: Triangular Quadrant characters (Symbols for Legacy Computing).U+1FB00
-U+1FB3B
: Sextant characters (Symbols for Legacy Computing).Note this update does not modify any existing character, I'm only adding new ones.
Validation Steps Performed
I've been using block elements for years, and have been pushing for about two years for the Symbols for Legacy Computing to be added : #597.
I have a bunch of test files ready for when sextants and octants would be added : https://github.com/PhMajerus/ANSI-art/tree/main/Unicode
But they never got added. So I decided to give it a try and provide as much of the old-school graphics characters as I can to improve the situation.
Testing have been done by using a build of the font for days, experimenting with it in Windows Terminal and Visual Studio editor.

I also checked the details from VTT, and created some test files such as
curl https://raw.githubusercontent.com/PhMajerus/ANSI-art/main/Unicode/Blocks%20tables.txt
I also tested with ANSI-art using VT colors to check for color bleeding around the cell, and while it's not pixel-perfect at all sizes, it seems to be consistent with the existing full block, half block, and quadrant characters:
I don't know how to perform hinting, but since these are purely geometric shapes, I don't think controlling the exact pixels is important, they seem to render properly at all sizes I tried.
I hope you can accept this request so everyone can benefit from those new characters, and I plan to push more of the same as soon as possible.