-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Ubuntu Nerd Font Regular showing up as Condensed. #1228
Comments
Now comparing with Naming is comparable to NotoSans We do not add A look at
Looks the same. Ah Why is it not picking up the width specifier... "Condensed" is also missing in the rendered example text on the right 🤔 Obviously not a problem of the abbreviation in the PS name Very strange. Had a look at FontManager's source and it get all information from fontconfig, and THAT reports the correct style(s). |
Built from source (github HEAD), same problem Stuffing sourcecode with debug things... Ok, it comes out of fontconfig:
It should be #define FC_WIDTH_CONDENSED 75 Ah, Ubuntu forgot (?!) to set the width of the font to 'condensed' 🙄 |
After fixing it shows correctly on my self-built FontManager, but not-at-all anymore on the Flatpak.
Also '9' now in 'User'. Creating some PR... Thanks for reporting! |
👀 Oh wow... I did not expect to wake up to some in-depth reporting on this PR! 🎉 Incidentally, I can't explain why you were able to get 7 vs. 9 variations depending on whether you filtered by All or User. I was able to see 9 variations from both filters. I'm using the stock Ubuntu Nerd Font from the zipfile downloaded from the github website and the version of font-manager I used is v0.8.8 on my ArchLinux box. Much appreciated @Finii for all the hard work! |
[why] The Ubuntu Condensed font is special because it is designed to be not part of the `Ubuntu` font family but a self standing `Ubuntu Condensed` family with just one member. We want the `Ubuntu Condensed` to be part of `Ubuntu`, as it is usual for fonts with different widths. The problem then arises that the width class in the font metadata is set to 'Normal', while it has to be 'Condensed'. That fact does not become apparent when the font is in its own one member family, but even there it is wrong. [how] To keep all the other information in the font untouched we just directly patch that one byte where the width-class is stored - and repair the checksums afterwards. Nothing more. The code to do this is the Font Tweaker code in font-patcher, just copied here for one time use. Fixes: #1228 Signed-off-by: Fini Jastrow <[email protected]>
I just write down all I do in case I'm interrupted by kids or day work or ... ;-)
I guess it has something to do with being a Flatpak. They mention something one would have to adjust with Flatseal, which I of course did not :-D
Thank you :-) |
[why] The Ubuntu Condensed font is special because it is designed to be not part of the `Ubuntu` font family but a self standing `Ubuntu Condensed` family with just one member. We want the `Ubuntu Condensed` to be part of `Ubuntu`, as it is usual for fonts with different widths. The problem then arises that the width class in the font metadata is set to 'Normal', while it has to be 'Condensed'. That fact does not become apparent when the font is in its own one member family, but even there it is wrong. [how] To keep all the other information in the font untouched we just directly patch that one byte where the width-class is stored - and repair the checksums afterwards. Nothing more. The code to do this is the Font Tweaker code in font-patcher, just copied here for one time use. Fixes: #1228 Signed-off-by: Fini Jastrow <[email protected]>
This has not been answered! 😠 Got sidetracked. |
Ah, looking at Iosevka, they do the same (not add Adding When it is left off, it is also left off of the PS name. Here our list which fonts do what: @staticmethod
def is_keep_regular(basename):
"""This has been decided by the font designers, we need to mimic that (for comparison purposes)"""
KEEP_REGULAR = [
'Agave',
'Arimo',
'Aurulent',
'Cascadia',
'Cousine',
'Fantasque',
'Fira',
'Overpass',
'Lilex',
'Inconsolata$', # not InconsolataGo
'IAWriter',
'Meslo',
'Monoid',
'Mononoki',
'Hack',
'JetBrains Mono',
'Noto Sans',
'Noto Serif',
'Victor',
]
for kr in KEEP_REGULAR:
if (basename.rstrip() + '$').startswith(kr): return True
return False [1] https://learn.microsoft.com/en-us/typography/opentype/spec/recom#name-strings |
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference. |
🗹 Requirements
🎯 Subject of the issue
Experienced behavior:
The font Ubuntu Nerd Font which should compare against the regular Ubuntu font has the style Regular show up as Condensed.
The app I used to display the following is from the gtk font manager.
The following font belongs to the system and is what I expect.
The Ubuntu Nerd Font installed locally shows Regular as Condensed.
Incidentally, there is a Ubuntu Condensed specific font that isn't represented in the Nerd Font set. I have no need for this font, but I thought I'd point it out since this specific font has been rolled-up into a style in the base Ubuntu Nerd Font (which makes sense).
Expected behavior:
That the Regular style and the Condensed style should both be distinct. The Ubuntu Nerd Font Regular style should have the same style as Ubuntu Regular.
🔧 Your Setup
Anonymice Powerline Nerd Font Complete.ttf
)?iterm2
,urxvt
,gnome
,konsole
)?dunst
notifications (not terminal). But is problematic in any other app that uses the font.★ Screenshots (Optional)
The text was updated successfully, but these errors were encountered: