Skip to content
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

font-patcher: Improve 'Mono' compatibility with Windows #695

Merged
merged 1 commit into from
Dec 22, 2021

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented Nov 29, 2021

Description

[why]
Some of the patched Mono fonts do not turn up in the font chooser
of Windows CMD and PowerShell (and probably more).

[how]
For some reasons Windows does not identify the fonts as being strictly
monospaced, so they are hidden in that font choosers.

For the monospaced fonts we set now the Panose proportion 'monospaced'.
Windows seems to honor the Panose properties.

It is not clear why we need to set the old Panose props, especially as
Cascadia Code does not (!) set them and is still detected as monospaced.

Anyhow, the way Windows detects if a font is monospaced is a mystery (at
least for me), and this works, so ;-)

Requirements / Checklist

  • Read the Contributing Guidelines
  • Read or at least glanced at the FAQ
  • Read or at least glanced at the Wiki
  • Scripts execute without error (if necessary):
    • If any of the scripts were modified they have been tested and execute without error, e.g.:
      • ./font-patcher Inconsolata.otf --fontawesome --octicons --pomicons
      • ./gotta-patch-em-all-font-patcher\!.sh Hermit
  • Extended the README and documentation if necessary, e.g. You added a new font please update the table

What does this Pull Request (PR) do?

Only for font-patcher --mono:

Set/overwrite OS/2 - Panose - Propotion to Monospaced
WHEN OS/2 - Panose - Family Kind is Any or Latin-Text

Set OS/2 - Panose - Family Kind to Latin-Text
WHEN it was Any before

How should this be manually tested?

Try to select font in MS-Windows cmd application font chooser.

Any background context you can provide?

Cheat sheet for Panose: https://forum.high-logic.com/postedfiles/Panose.pdf

What are the relevant tickets (if any)?

For example #586

Screenshots (if appropriate or helpful)

@Finii
Copy link
Collaborator Author

Finii commented Nov 29, 2021

Here is a list of what some of the Mono patched fonts have in their Panose-Propotion:

A value of '9' (= Monospaced) helps Windows to detect monospaced fonts.

Some fonts like Noto set other Propotions there (like 'Condensed'), which are technically correct but do not help terminal users. So we overwrite them.

Not all of these fonts might have a problem to be detected as monospaced by the Windows CMD font chooser, but at least some are affected. I guess fixing this globally is the easiest solution.

The panose propotion field is unfortunately not bits or so, the font designer needs to select ONE of 'modern' 'condensed' 'monospaced' ... :-(

Panose 4 = 0 in Overpass Italic Nerd Font Complete Mono
Panose 4 = 0 in Overpass ExtraBold Nerd Font Complete Mono
Panose 4 = 0 in Overpass Thin Nerd Font Complete Mono
Panose 4 = 0 in Overpass Light Nerd Font Complete Mono
Panose 4 = 0 in Overpass Bold Nerd Font Complete Mono
Panose 4 = 0 in Overpass ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 0 in Overpass Light Italic Nerd Font Complete Mono
Panose 4 = 0 in Overpass Thin Italic Nerd Font Complete Mono
Panose 4 = 0 in Overpass SemiBold Nerd Font Complete Mono
Panose 4 = 0 in Overpass Heavy Italic Nerd Font Complete Mono
Panose 4 = 0 in Overpass Heavy Nerd Font Complete Mono
Panose 4 = 0 in Overpass Regular Nerd Font Complete Mono
Panose 4 = 0 in Overpass SemiBold Italic Nerd Font Complete Mono
Panose 4 = 0 in Overpass ExtraLight Nerd Font Complete Mono
Panose 4 = 0 in Overpass Bold Italic Nerd Font Complete Mono
Panose 4 = 0 in Overpass ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 0 in monofur italic Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexic Italic Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexic Bold Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexicMono Regular Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexicAlta Regular Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexicAlta Italic Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexic Regular Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexicAlta Bold Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexic Bold Italic Nerd Font Complete Mono
Panose 4 = 0 in OpenDyslexicAlta Bold Italic Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Medium Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Light Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Bold Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Ubuntu Condensed Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Italic Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Bold Italic Nerd Font Complete Mono
Panose 4 = 4 in Ubuntu Medium Italic Nerd Font Complete Mono
Panose 4 = 4 in Literation Sans Italic Nerd Font Complete Mono
Panose 4 = 4 in Literation Sans Bold Italic Nerd Font Complete Mono
Panose 4 = 3 in Literation Serif Italic Nerd Font Complete Mono
Panose 4 = 3 in Literation Serif Bold Italic Nerd Font Complete Mono
Panose 4 = 4 in Literation Sans Nerd Font Complete Mono
Panose 4 = 3 in Literation Serif Nerd Font Complete Mono
Panose 4 = 4 in Literation Sans Bold Nerd Font Complete Mono
Panose 4 = 3 in Literation Serif Bold Nerd Font Complete Mono
Panose 4 = 0 in ProFont IIx Nerd Font Complete Mono
Panose 4 = 0 in Heavy Data Nerd Font Complete Mono
Panose 4 = 0 in Lilex Medium Nerd Font Complete Mono
Panose 4 = 0 in Lilex Medium Nerd Font Complete Mono
Panose 4 = 0 in Lilex Light Nerd Font Complete Mono
Panose 4 = 0 in Lilex Light Nerd Font Complete Mono
Panose 4 = 0 in Lilex Bold Nerd Font Complete Mono
Panose 4 = 0 in Lilex Bold Nerd Font Complete Mono
Panose 4 = 0 in Lilex Regular Nerd Font Complete Mono
Panose 4 = 0 in Lilex Regular Nerd Font Complete Mono
Panose 4 = 6 in Lekton-Italic Nerd Font Complete Mono
Panose 4 = 0 in Lekton-Bold Nerd Font Complete Mono
Panose 4 = 0 in Lekton Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Mono S Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Mono S Bold Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Mono S Bold Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Mono S Regular Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Quattro S Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Quattro S Bold Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Quattro S Bold Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Quattro S Regular Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duo S Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duo S Bold Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duo S Bold Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duo S Regular Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace Italic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace Bold Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace Bold Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace BoldItalic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace BoldItalic Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace Regular Nerd Font Complete Mono
Panose 4 = 0 in iM Writing Duospace Regular Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Light Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Light Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display ExtraLight Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Bold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Light Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Thin Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display Regular Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Light Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed ExtraBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display Condensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Display SemiCondensed Thin Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Display ExtraCondensed Black Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Medium Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Thin Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Bold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Medium Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Thin Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Bold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans ExtraLight Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Regular Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed SemiBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Bold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans ExtraCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans SemiCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Thin Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Condensed Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Regular Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Medium Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Thin Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Bold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Medium Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Black Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Bold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Light Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Thin Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Light Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Black Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif ExtraLight Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif ExtraCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Serif Condensed Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif SemiCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Bold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Serif Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed SemiBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Bold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Light Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Medium Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display ExtraBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed SemiBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Bold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Regular Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Medium Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Black Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Bold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Medium Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed ExtraBold Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Medium Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Black Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Black Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Bold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Bold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed ExtraBold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Light Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Black Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Bold Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Thin Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Thin Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display ExtraCondensed Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed Medium Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Light Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Thin Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Thin Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Light Italic Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed ExtraLight Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed Black Nerd Font Complete Mono
Panose 4 = 6 in Noto Sans Display Condensed SemiBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Medium Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display Light Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed ExtraBold Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display SemiCondensed ExtraLight Italic Nerd Font Complete Mono
Panose 4 = 2 in Noto Sans Display ExtraLight Nerd Font Complete Mono
Panose 4 = 3 in Tinos Italic Nerd Font Complete Mono
Panose 4 = 3 in Tinos Bold Nerd Font Complete Mono
Panose 4 = 3 in Tinos Nerd Font Complete Mono
Panose 4 = 3 in Tinos Bold Italic Nerd Font Complete Mono
Panose 4 = 4 in Arimo Italic Nerd Font Complete Mono
Panose 4 = 4 in Arimo Bold Nerd Font Complete Mono
Panose 4 = 4 in Arimo Regular Nerd Font Complete Mono
Panose 4 = 4 in Arimo Bold Italic Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Medium Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Italic Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Thin Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Light Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Bold Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Light Italic Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Thin Italic Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Bold Italic Nerd Font Complete Mono
Panose 4 = 0 in Roboto Mono Medium Italic Nerd Font Complete Mono

font-patcher Outdated Show resolved Hide resolved
[why]
Some of the patched Mono fonts do not turn up in the font chooser
of Windows CMD and PowerShell (and probably more).

[how]
For some reasons Windows does not identify the fonts as being strictly
monospaced, so they are hidden in that font choosers.

For the monospaced fonts we set now the Panose proportion 'monospaced'.
Windows seems to honor the Panose properties.

It is not clear why we need to set the old Panose props, especially as
Cascadia Code does not (!) set them and is still detected as monospaced.

Anyhow, the way Windows detects if a font is monospaced is a mystery (at
least for me), and this works, so ;-)

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@ryanoasis
Copy link
Owner

Hey other than the small syntax/typo this does seem to do the correct thing however it still isn't showing up for me when I tested in Windows 10 cmd nor powershell

Selection_080

BUT I was able to get it to show after trial and error of several things that did not work: shortening the family name, changing the IBM family, embedding bitmap fonts in the TTF.

What did finally work was adding to the charsets (I'm thinking the missing languages?)

Selection_085

Selection_087

Selection_088

powershell doesn't seem to want to render the glyphs but cmd does. I only tested (e62a):

Selection_089

Selection_093

@Finii
Copy link
Collaborator Author

Finii commented Dec 18, 2021

Just a hint for PowerShell, when you enter something, extended chars are always replaced by question marks, I believe to help preventing you entering something that looks like A but is B.

Once it outputs it, it is ok, like here (I just stuff the chars in the prompt):
#698 (comment)

For the Panose fix ... I tried (alas) Cascadia, and there it seemed to be enough.
I can redo the stuff again, after breakfast ;)

Fini

@Finii
Copy link
Collaborator Author

Finii commented Dec 18, 2021

A hunch of mine is that fsSelection might be the culprit. Which we can not set nor query via fontforge. Some fsSelection bits show up as Font info... -> OS/2 -> Misc. -> Style Map

fontforge

image

External script

https://github.com/jsomedon/Fix-fsSelection-bits-for-SF-fonts
just as idea

Examining fsSelection

It is possible to see the bits with showttf. I use this syntax to only show the OS/2 table (ugly with tr and perl but ... well, ymmv)

$ showttf ~/Downloads/B612-Regular.ttf | tr '\n' '\\' | perl -pe 's|.*(\\OS\/2.*?)\\[A-Z].*|\1|sg' | tr '\\' '\n'

OS/2 table (at 472 for 96 bytes)
	Version=3
	 avgWidth=1287
	 weightClass=400 Normal
	 widthClass=5 Medium
	 fstype=0x0 
	 ySubscript XSize=1300
	 ySubscript YSize=1399
	 ySubscript XOffset=0
	 ySubscript YOffset=279
	 ySupscript XSize=1300
	 ySupscript YSize=1399
	 ySupscript XOffset=0
	 ySupscript YOffset=960
	 yStrikeoutSize=100
	 yStrikeoutPos=500
	 sFamilyClass=0805 Sans Serif neo-grotesque
	 Panose
		Family: 02 Text & Display
		Serif Type: 0b Normal Sans
		Weight: 06 Medium
		Proportion: 06 Condensed
		Contrast: 05 Medium Low
		Stroke Variation: 00 ???
		Arm Style: 00 ???
		Letterform: 02 Normal/Contact
		Midline: 00 ???
		X-Height: 04 Constant/Large

	 UnicodeRange=800000af 5000e0fb 00000000 00000000
	 achVendId 20 20 20 20 
	 fsSelection=64
	 firstcharindex=0
	 lastcharindex=64262
	 stypeascender=1930
	 stypedescender=-500
	 stypelinegap=0
	 usWinAscent=1934
	 usWinDescent=712
	 CodePageRange=20000011 81d40000
	xHeight=1100
	CapHeight=1500
	DefaultChar=0
	BreakChar=32
	MaxContext=2

How to build showttf

showttf is in package fontforge-extras at least on Ubuntu. But usually I use HEAD ;)

I think it is not documented, or maybe it is, but I did not search for it ;)
This is how I do it:

git clone fontforge... blah
cd fontforge/contrib/fonttools
mkdir build
cd build
cmake ..
make showttf/fast

@Finii
Copy link
Collaborator Author

Finii commented Dec 18, 2021

Checked on my Windows box (Windows 10 Enterprise 20H2).

Download https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Ubuntu/Regular/complete/Ubuntu%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf

Open in fontforge on Windows. Just change Panose-Propotion to Monospaced.
File .. generate fonts ..
Install new font.

Is visible in PowerShell.

(Of course before installation all PowerShell Windows must be closed)

image

@Finii
Copy link
Collaborator Author

Finii commented Dec 18, 2021

It is possible to see the bits with showttf.

It is always good to write stuff down here, as ... one works more concieously on it then, at least me.
Of course there is a better tool (that I just found) in package texlive-binaries:

$ ttfdump -t OS/2 <fontname>

@Finii
Copy link
Collaborator Author

Finii commented Dec 18, 2021

I guess

  • Has nothing to do with fsSelection
  • Has something to do with HHEA advanceWidthMax
  • In table hmtx there are entries that are wider then our normal width, not sure why. Fonts that show up do not have it (e.g. Cascadia unpatched)
  • Panose monospaced forces to use advanceWidthMax for all glyphs, thus strange spaced rendering

Just examining Cascadia 2111.01 release and freshly patched from that:

$ ttfdump  ./CascadiaCode-Regular.otf | grep '^[^0-9]*:\s*1200'
	 advanceWidthMax:          1200
	 maxCompositePoints:       1200
	 xAvgCharWidth:            1200
$ ttfdump  ./Caskaydia\ Cove\ Nerd\ Font\ Complete\ Mono\ Regular.otf | grep '^[^0-9]*:\s*1200|.*advance.*'
	 advanceWidthMax:          1477
	 maxCompositePoints:       1200
	 xAvgCharWidth:            1200

I would also conclude ... not monospaced (anymore).

And it is not the powerline things:

ttfdump  CascadiaCodePL-Regular.otf | grep '^[^0-9]*:\s*1200|.*advance.*'
	 advanceWidthMax:          1200
	 maxCompositePoints:       1200
	 xAvgCharWidth:            1200

Obviously our mono scaling has a flaw?

@Finii
Copy link
Collaborator Author

Finii commented Dec 18, 2021

Some of the Font Awesome are inserted wider than allowed...
image

These are they... (codepoint in decimal in parens):

Width 1369 for tags (61484)         
Width 1289 for text_height (61492)               
Width 1286 for edit (61508)             
Width 1292 for move (61511)          
Width 1292 for fast_backward (61513)          
Width 1292 for fast_forward (61520)          
Width 1292 for resize_horizontal (61566)          
Width 1292 for krw (61785)          
Width 1246 for long_arrow_left (61815)           
Width 1246 for long_arrow_right (61816)           
Width 1292 for _515 (61990)               
Width 1384 for _516 (61991)               
Width 1476 for _517 (61992)               
Width 1384 for _520 (61995)               
Width 1292 for _562 (62039)          
Width 1476 for _563 (62040)          
Width 1384 for _564 (62041)  

Our target width here is 1200.

image

Edit: Add screenshot of proof-of-culprit

@Finii
Copy link
Collaborator Author

Finii commented Dec 18, 2021

Hmm FONTA_SCALE_LIST does not make sense...

ScaleGlyph': 0xF17A which is the windows symbol??

'GlyphsToScale': [..., (0xf221, 0xf22d), ...] scales all these gender things?

image

Must be wrong.

@Finii
Copy link
Collaborator Author

Finii commented Dec 19, 2021

I believe there is a misunderstanding what the ScaleGlyph does.

What it does

There is on 'master glyph' and then a list of glyphs that are scaled with the same factor as the master glyph (keeping the relative sizes of all (master and other) glyphs the same) while only the master glyph is scaled to fit out destination font.

What would make sense

There is no master glyph. There is a list of group lists. All glyphs within one of the group lists are scaled to the same factor, keeping their relative size the same. The factor is taken from the biggest glyph in that group. All individual group lists are scaled independently.

Take these original glyphs from FontA:

image

The selected glyphs (volume off, middle, high) should be scaled together. They would form a group list. But they have nothing to do with these glyphs, that would form other/independent group lists:

image

I guess when the list has been created the windows glyph, that is used as master glyph for FontA, was the biggest of all, and thus there is just one list and someone manually selected the biggest char. But that will fail of course when the upstream symbols are renovated, i.e. changed in dimensions relative to each other.
At least there should be no master glyph, but the list examined as a whole and scaled to the biggest of all.

@Finii
Copy link
Collaborator Author

Finii commented Dec 19, 2021

If FontA would be fixed there are still issues:

$ fontforge --script ../font-patcher --complete --mono --parser --no-progressbar ./CascadiaCode-Regular.otf 2>/dev/null
No configfile given, skipping configfile related actions
Nerd Fonts Patcher v2.1.0 executing

Adding 56 Glyphs from Seti-UI + Custom Set 

scaleGlyph {'ScaleGlyph': 58894, 'GlyphsToScale': [(59069, 59075)]}
Adding 198 Glyphs from Devicons Set 

Adding 3 Glyphs from Powerline Symbols Set 

Adding 4 Glyphs from Powerline Symbols Set 
Width 1224 for uniE0B0 (57520)
Width 1224 for uniE0B1 (57521)
Width 1224 for uniE0B2 (57522)
Width 1224 for uniE0B3 (57523)

Adding 1 Glyphs from Powerline Extra Symbols Set 

Adding 21 Glyphs from Powerline Extra Symbols Set 
Width 1212 for uniE0B4 (57524)
Width 1212 for uniE0B5 (57525)
Width 1212 for uniE0B6 (57526)
Width 1212 for uniE0B7 (57527)
Width 1224 for uniE0B8 (57528)
Width 1224 for uniE0B9 (57529)
Width 1224 for uniE0BA (57530)
Width 1224 for uniE0BB (57531)
Width 1224 for uniE0BC (57532)
Width 1224 for uniE0BD (57533)
Width 1224 for uniE0BE (57534)
Width 1224 for uniE0BF (57535)
Width 1212 for uniE0C0 (57536)
Width 1212 for uniE0C1 (57537)
Width 1211 for uniE0C2 (57538)
Width 1212 for uniE0C3 (57539)
Width 1212 for uniE0C8 (57544)

Adding 1 Glyphs from Powerline Extra Symbols Set 

Adding 8 Glyphs from Powerline Extra Symbols Set 
Width 1224 for uniE0D1 (57553)
Width 1224 for uniE0D2 (57554)
Width 1224 for uniE0D4 (57556)

Adding 11 Glyphs from Pomicons Set 

Adding 679 Glyphs from Font Awesome Set 

Adding 170 Glyphs from Font Awesome Extension Set 

Adding 4 Glyphs from Power Symbols Set 

Adding 1 Glyphs from Power Symbols Set 

Adding 2119 Glyphs from Material Set 

Adding 228 Glyphs from Weather Icons Set 

Adding 44 Glyphs from Font Logos (Font Linux) Set 

scaleGlyph {'ScaleGlyph': 61486, 'GlyphsToScale': [(61501, 61504), 61508, (61521, 61523), 61530, 61531, 61553, 61560, (61599, 61610), 61642]}
Adding 169 Glyphs from Octicons Set 

scaleGlyph {'ScaleGlyph': 61486, 'GlyphsToScale': [(61501, 61504), 61508, (61521, 61523), 61530, 61531, 61553, 61560, (61599, 61610), 61642]}
Adding 1 Glyphs from Octicons Set 

scaleGlyph {'ScaleGlyph': 61486, 'GlyphsToScale': [(61501, 61504), 61508, (61521, 61523), 61530, 61531, 61553, 61560, (61599, 61610), 61642]}
Adding 1 Glyphs from Octicons Set 

scaleGlyph {'ScaleGlyph': 61486, 'GlyphsToScale': [(61501, 61504), 61508, (61521, 61523), 61530, 61531, 61553, 61560, (61599, 61610), 61642]}
Adding 1 Glyphs from Octicons Set 


Done with Patch Sets, generating font...

Generated: CaskaydiaCoveNerdFontCompleteM-Regular

The Powerline (Extra) Symbols are scaled to 101% or 102% on purpose to avoid ugly gaps (SYM_ATTR_POWERLINE, overlap).
On the other hand, I have the gaps (thin lines) anyhow, and the overfilling does not seem to help.

@ryanoasis
Copy link
Owner

Checked on my Windows box (Windows 10 Enterprise 20H2).

Download https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Ubuntu/Regular/complete/Ubuntu%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf

Open in fontforge on Windows. Just change Panose-Propotion to Monospaced. File .. generate fonts .. Install new font.

Is visible in PowerShell.

(Of course before installation all PowerShell Windows must be closed)

image

This works which is strange because if I take the unpatched font from the repo and run it through the font patcher on this branch it sets the same Panose proportion but it doesn't show up 😮

@Finii
Copy link
Collaborator Author

Finii commented Dec 20, 2021

This works which is strange because if I take the unpatched font from the repo and run it through the font patcher on this branch it sets the same Panose proportion but it doesn't show up open_mouth

Hmm, the patched fonts are different??!

image

The fresh patched font does not show up on my machine also. Will have a look later today.

I also prepared (yesterday) a new way to handle the ScaleGlyph issue, hope you are not also on it ;)

@ryanoasis
Copy link
Owner

The fresh patched font does not show up on my machine also. Will have a look later today.

Thank you!

I also prepared (yesterday) a new way to handle the ScaleGlyph issue, hope you are not also on it ;)

Nope! I am not, have at it. I'm working on other things 😅

Also, I may be inclined to merge this anyway since this changes does seem like the right thing to do regardless if it specifically fixes the windows monospace fonts not showing in cmd and et al. Any particular thoughts?

@ryanoasis
Copy link
Owner

In a case of perfect being the enemy of good I am satisfied with this change even if it doesn't solve completely the issues with mono fonts in windows.

@ryanoasis ryanoasis merged commit 66adcfe into master Dec 22, 2021
@ryanoasis ryanoasis deleted the feature/panose-monospaced branch December 22, 2021 21:17
@Finii
Copy link
Collaborator Author

Finii commented Dec 22, 2021

Any particular thoughts?

I guess I would hold this back, check if #732 works instead on the typical candidates.

Darkly I remember that I checked a font patched with just --mono --powerline had problems under Windows (to be used with CMD for ex.) that could be solved by setting Panose. That patching would not benefit / be different with #732.

If i remember correctly, then this PR should be pulled. If it works without I would close it.

Interestingly for Cascadia has no Panose at all, and it works in CMD. Maybe it is our overlap. I did not check (yet) if the powerline glyphs over there are 'overlapping' ... oh you merged :-D

@ryanoasis
Copy link
Owner

oh you merged :-D

😆 yeah, i did see your other PRs though. I guess we can always revert the changes in the PR too. I will see if I can get some time to try out #732 changes and see if the panose makes any difference.

But from various sources I did see setting panose proportion to be a recommended solution

LNKLEO pushed a commit to LNKLEO/Nerd that referenced this pull request Nov 24, 2023
…aced

font-patcher: Improve 'Mono' compatibility with Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants