microsoft / cascadia-code

This is a fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal.
Other
26.04k stars 811 forks source link

Geometric Shapes triangle characters don't fill whole cells #783

Open Wukuyon opened 2 weeks ago

Wukuyon commented 2 weeks ago

Cascadia family version

2404.23

Cascadia family variant(s)

Cascadia Code (the version with ligatures), Cascadia Mono (the version without ligatures)

Font file format(s)

Windows Terminal included version (TTF (variable)), .ttf (variable)

Platform

Windows 11; macOS 14.7

Other Software

No response

What happened?

Thanks to @PhMajerus's work in #597, #708, #709, #711, #723 etc., Cascadia has excellent support for semigraphics diagonals.

But there are some basic triangle characters that don't seem to be supported: U+25E2..U+25E5, U+25F8..U+25FA, and U+25FF (◢ ◣ ◤ ◥ ◸ ◹ ◺ ◿) from the Geometric Shapes block. They seem to either be missing or not fill their whole character cells, unlike the Symbols for Legacy Computing diagonals in #723. The Geometric Shapes triangles are much older than the Symbols for Legacy Computing diagonals, but they're still important.

Here is an example of NeoVim text art using Geometric Shapes triangles using Cascadia Code 2404.23 in Windows Terminal v1.21.2911.0:

Jagged NeoVim text art in Windows Terminal

This looks the same in Visual Studio Code v1.94 on Windows 11.

I expected it to look seamless, like this render from the Kitty terminal:

Seamless NeoVim text art in Kitty

Raw text of the NeoVim text art ``` ◢◣ ◢████◣ ◢██████◤ ◥█████◣ ◥██◤ ◢██████◣◥█████◤ ◥█████◣ ◣ ◢███████◣◥██◤ ◢████████◤◢███◣◥█████◣███ ███◣ ◢███◣████◣████◣ ◢█◣◥████████◤ ◢███◤ ◢█████◣◥████████ █████ █████◥████◥█████ ◢███◣◥██████◤ ◢████████◤◢██◤ ◥██◣◥███████ █████ █████ ████ █████ ◢██████◤◥█████◤ ◢███◤ ◢███◣ ◢███◣◥██████ █████ █████ ████ █████◣ ◢██████◤ ◥███◤◢█████████◣◥█████████◤ ◥████◤ █████ █████ ████ ██████◣ ```

The outline versions of the triangles from the same block, U+25F8..U+25FA, and U+25FF (◸ ◹ ◺ ◿), also currently form jagged art in Cascadia. They should also fill their whole character blocks, without seams.

Thanks all for your work on Cascadia.

PhMajerus commented 2 weeks ago

As you mentioned, those are from an older geometric shapes block, and fonts don't agree on whether these should be square and centered or stretched to fill their cells. I would also prefer to have them stretched to fill, but Cascadia already included those characters as centered when I added the legacy computing diagonals, and I wanted to make the review process smoother by only adding new characters that didn't trigger styles discussions.

I think the best would be to have a stylistic set option to select to make them full cell, but as the Cascadia team is busy with Cascadia Next, I didn't submit any new thing, especially since I would need some help to handle that properly. Apparently, the stylistic set replacements are applied after the rclt (GDI/DWrite) replacements, so we either need to have the full cell versions as default and square versions as a stylistic set, or need to find out how to apply that rclt after... I can only think of repeating the square versions, so they have different internal names to replace them appropriately if needed for the stylistic set.

Anyway, this can only be worked on if Cascadia Code/Mono isn't frozen, so the decision would be in the team's hands.

Wukuyon commented 2 weeks ago

@PhMajerus: What you say makes sense.

To my knowledge, there are no characters in Symbols for Legacy Computing that could replace the half-cell black diagonal triangles U+25E2..U+25E5. Correct me if I'm wrong.

For example, there's no "LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO UPPER RIGHT" in U+1FB3C..U+1FB67. It's as if Unicode decided to unify it with U+25E2 "BLACK LOWER RIGHT TRIANGLE". If this is true, this makes it all the more important for Cascadia to support stretching U+25E2 across its cell, so it can be used with U+1FB3C..U+1FB67.

Hopefully this will be addressed after work on Cascadia Code/Mono resumes. Thanks again for your work.

PhMajerus commented 2 weeks ago

I can confirm there are no similar diagonals in either of the legacy computing blocks, and am fairly sure the rationale is to avoid duplicates in Unicode. This is also why the pseudo-pixels mosaics do not duplicate the shapes that already exist in existing half blocks and quadrants.