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.86k stars 806 forks source link

Feature Request: Metric‑compatibility with Consolas #41

Open ExE-Boss opened 5 years ago

ExE-Boss commented 5 years ago

Description of the new feature/enhancement

Currently, I’m using Input Mono Narrow, which is the version of Input Mono that is metrically-compatible with Consolas.

Cascadia Code is ever so slightly thinner than Consolas, which makes long lines of code to be shorter than when Consolas is used, which is what I used previously, as it’s the built‑in monotype font on Windows.

aaronbell commented 4 years ago

Something I'm hoping to add is a width axis to this project. It would enable you to functionally match the width of Consolas (or any other font) in code. Such a thing isn't on the roadmap quite yet, but hopefully soon!

da2x commented 3 years ago

Cascadia’s width changes considerably at different sizes. It appears to have aimed to be metric-compatible with Courier and not Consolas. Although, strangely things change at 17 pt and 36 pt. Frankly, being compatible with Courier is more useful as it’s the web-default monospace font (due to it being a PostScript core font.)

Consolas–Cascadia–Courier New metric-compatibility

aaronbell commented 3 years ago

@da2x Actually, the metrics variation is totally understandable. The glyph width of Consolas is 1126. The glyph width of Courier New is 1229. The glyph width of Cascadia Code is 1200.

Since width is dependent on rendering, under some conditions rounding to the whole pixel will result in the fonts rendering the same width and in other cases differently. Honestly, I'd say that Consolas and Courier are the odd ones here with their particular width values :)