Closed Finii closed 5 months ago
History, watch out for ID16 (compare to ID1):
======== CaskaydiaCoveNerdFont-LightItalic.ttf ========
SFNT Fullname ID 4 CaskaydiaCove NF Light Italic
SFNT Family ID 1 CaskaydiaCove NF Light
SFNT SubFamily ID 2 Italic
SFNT Pref Family ID 16 CaskaydiaCove Nerd Font
SFNT Pref Styles ID 17 Light Italic
SFNT PS Name ID 6 CaskaydiaCoveNF-LightItalic
SFNT Compatible ID 18
SFNT CID findfont ID 20
SFNT WWS Family ID 21
SFNT WWS SubFamily ID 22
PS fontname CaskaydiaCoveNF-LightItalic
PS fullname CaskaydiaCove NF Light Italic
PS familyname CaskaydiaCove NF Light
fondname None
======== CaskaydiaCoveNerdFont-LightItalic.ttf ========
SFNT Fullname ID 4 CaskaydiaCove NF Light Italic
SFNT Family ID 1 CaskaydiaCove NF Light
SFNT SubFamily ID 2 Italic
SFNT Pref Family ID 16 CaskaydiaCove NF
SFNT Pref Styles ID 17 Light Italic
SFNT PS Name ID 6 CaskaydiaCoveNF-LightItalic
SFNT Compatible ID 18
SFNT CID findfont ID 20
SFNT WWS Family ID 21
SFNT WWS SubFamily ID 22
PS fontname CaskaydiaCoveNF-LightItalic
PS fullname CaskaydiaCove NF Light Italic
PS familyname CaskaydiaCove NF Light
fondname None
This reverts v3.1.0, i.e. is in fact v3.0.2 again
======== CaskaydiaCoveNerdFont-LightItalic.ttf ========
SFNT Fullname ID 4 CaskaydiaCove NF Light Italic
SFNT Family ID 1 CaskaydiaCove NF Light
SFNT SubFamily ID 2 Italic
SFNT Pref Family ID 16 CaskaydiaCove Nerd Font
SFNT Pref Styles ID 17 Light Italic
SFNT PS Name ID 6 CaskaydiaCoveNF-LightItalic
SFNT Compatible ID 18
SFNT CID findfont ID 20
SFNT WWS Family ID 21
SFNT WWS SubFamily ID 22
PS fontname CaskaydiaCoveNF-LightItalic
PS fullname CaskaydiaCove NF Light Italic
PS familyname CaskaydiaCove NF Light
fondname None
======== CaskaydiaCoveNerdFont-LightItalic.ttf ========
SFNT Fullname ID 4 CaskaydiaCove NF Light Italic
SFNT Family ID 1 CaskaydiaCove NF Light
SFNT SubFamily ID 2 Italic
SFNT Pref Family ID 16 ('CaskaydiaCove Nerd Font', 'CaskaydiaCove NF')
SFNT Pref Styles ID 17 ('Light Italic', 'Light Italic')
SFNT PS Name ID 6 CaskaydiaCoveNF-LightItalic
SFNT Compatible ID 18
SFNT CID findfont ID 20
SFNT WWS Family ID 21
SFNT WWS SubFamily ID 22
PS fontname CaskaydiaCoveNF-LightItalic
PS fullname CaskaydiaCove NF Light Italic
PS familyname CaskaydiaCove NF Light
fondname None
To set up a test set, with the PR applied:
$ NERDFONTS="--makegroups 4" ./gotta-patch-em-all-font-patcher\!.sh -j /CascadiaCode
Just the Nerd Font
variants to try:
Caskaydia_3.1.1-6.tar.xz.zip (1.7M)
This talk from Thomas Phinney / Adobe has some details: https://localfonts.eu/wp-content/uploads/2017/11/Font-names.pdf
If there is no relation between 1 and 16 VisualStudio 2022 breaks, that seems to be odd and not according to expectations. And it was not the case for VisualStudio 2019. I really believe this is a Microsoft .... glitch.
And the usual suspects for documentation https://learn.microsoft.com/en-us/typography/opentype/spec/name#name-ids https://learn.microsoft.com/en-us/typography/opentype/spec/recom#name-strings
Rebase on master to retrigger codeclimate :grimacing:
Ah yes, now I remember (the hurt)
Rebase on master, force push
Description
If
--makegroups
is >= 4 the name suffixNerd Font
(Nerd Font Mono
,Nerd Font Propo
) is shortened toNF
(NFM
,NFP
). But not everywhere. To show the nice long name in applications that can handle long names, the long name is always (!) written to ID16.VisualStudio 2022 does not like that and assumes the font is broken. For that reason this extra rule (write the long name to ID16 even though all other places use the abbreviation) has been removed with
v3.1.0
. But that breaks all configurations that address the font by family name, because the long name is gone now.This PR implements a work around such that two (!) family names are written to ID16, the short and the long one. In this way both VisualStudio 2022 and configured family name applications can be happy.
Hopefully.
Requirements / Checklist
What does this Pull Request (PR) do?
How should this be manually tested?
Any background context you can provide?
What are the relevant tickets (if any)?
1242
1406
1434
1439
Fixes: #1482
Screenshots (if appropriate or helpful)