Closed PhMajerus closed 2 months ago
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
I've just read more about fonts conventions and found out characters from supplementary planes should be named u[CP]
instead of uni[CP]
in lib.plist::public.postscriptNames
.
I noticed you didn't have any character outside the BMP yet and the characters I added are the first > U+FFFF.
Which naming scheme do you want to use? Shall I commit a fix with the postscript names changed to u[CP]
, or should I fix it as part of the next pull request?
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!
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. Maybe someone from the Terminal team has some better idea.
@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. I'm not working on any new glyph since January (except improvements on the Large Type Pieces), but I was waiting for this PR to get through before adding more stuff as you mentioned it is easier to review smaller batches.
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 features.fea::rclt
feature of non-italic fonts and in features/rclt.fea::rclt
must also be added in features/rclt_PL.fea::rclt
.
See https://github.com/microsoft/cascadia-code/pull/721 for details.
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
accordingly Note 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.