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 weight checking #1364

Merged
merged 3 commits into from
Oct 7, 2023
Merged

font-patcher: Improve weight checking #1364

merged 3 commits into from
Oct 7, 2023

Commits on Sep 30, 2023

  1. font-patcher: Improve weight checking

    [why]
    When the font does not have a PSweight string the font-patcher bugs.
    
    [how]
    Rewrite the code to be more robust against unexpected weight values.
    Also make detected problems non-fatal.
    
    Reported-by: František Hanzlík <frantisek_hanzlik@protonmail.com>
    Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
    Finii committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    8f7597a View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2023

  1. name_parser: Correct output on weight check

    [why]
    When the weight check fails for some input the reason is not shown
    correctly (i.e. not the string that actually failed).
    
    [how]
    Display exactly the failed string in the warning.
    
    Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
    Finii committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    b34f7bf View commit details
    Browse the repository at this point in the history
  2. name_parser: Fix weight_string_to_number()

    [why]
    Some PS weights have a dash in the weight, like 'Extra-Light' in
    Iosevka. The parser can not parse it because it expects 'ExtraLight'.
    
    [how]
    Filter out all '-' and ' ' from the PS weight string before actually
    parsing the string.
    
    Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
    Finii committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    f46ad6f View commit details
    Browse the repository at this point in the history