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
25.1k stars 793 forks source link

Fix NF Mono glyph selection, NF variants STAT, PL rclt table #721

Closed DHowett closed 2 months ago

DHowett commented 2 months ago

The build issue I was running into was caused by the logic that chooses when to merge Powerline glyphs into the final set before building.

It covered the following conditions:

Conditions Outcome
Mono Set name only ✅
Mono + PL Set name, merge PL ✅
PL Set name, merge PL ✅
NF Set name, merge PL, merge NF ✅

However, it missed one:

Conditions Outcome
Mono + NF ❔❔❔

I've simplified the logic so that we don't make this mistake again. All non-Cascadia-Code variants will have their names overridden, and if they contain PL or NF they will get special treatment.

I've also added the NF variants to the STAT table table and fixed the generation of rclt for PL variants.

DHowett commented 2 months ago

I also figured out why the stypo variants were being ignored in the PL/NF builds; /cc @phmajerus for the last commit

aaronbell commented 2 months ago

(Thanks so much for your investigation!!)

DHowett commented 2 months ago

Hey, I love working on this stuff :D

PhMajerus commented 2 months ago

Let me know if there is anything I need to do on my side when adding glyphs with stypo variants. For now I've included the substitution of "normal" to "stypo" versions both in features.fea::rclt of non-italic fonts, and in the global features/rclt.fea::rclt. Is there any other place I need to include the stypo substitutions?

DHowett commented 2 months ago

Just make sure it ends up in rclt_PL.fea as well! Otherwise the powerline/nerdfont builds won’t get the optional stypo metrics 🙂