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

Ubuntu: Fix wrong Condensed classification #1231

Merged
merged 1 commit into from
May 11, 2023
Merged

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented May 11, 2023

[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

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)?

Screenshots (if appropriate or helpful)

[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 <ulf.fini.jastrow@desy.de>
@Finii Finii added this to the v3.0.1 milestone May 11, 2023
@Finii Finii merged commit a153334 into master May 11, 2023
@Finii Finii deleted the bugfix/UbuntuCondensed branch May 11, 2023 13:57
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.

Ubuntu Nerd Font Regular showing up as Condensed.
1 participant