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

Bugfix glyphnames in released fonts #1758

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Bugfix glyphnames in released fonts #1758

merged 2 commits into from
Nov 26, 2024

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented Nov 26, 2024

Description

    CI: Regenerate glyphnames before release
    
    [why]
    When the icon sets have changed (added or names changed) the i_*.sh
    files are (hopefully) up to date, but the glyphnames.json file is only
    updated on release.
    
    Unfortunately the font-patcher uses the glyphnames.json to determine the
    patched-in glyphs' names, but in the workflow the json file is only
    updated after all fonts have been patched.
    
    [how]
    Like the version number in the font-patcher file we also create a
    transient glyphnames.json in each patching job, that the font-patcher
    can then utilize.
    
    Still the in-repo glyphnames.json is only updated after successful
    release. So in pinciple we call the generate-css.sh (which also
    generates the glyphnames.json) once for every font in the font matrix
    (just before patching) and then finally after all patching has been done
    again and that is committed back to the repo.
    
    Fixes: #1745

Requirements / Checklist

  • Read the Contributing Guidelines
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.
    Issue number where discussion took place: #xxx
  • If this contains a font/glyph add its origin as background info below (e.g. URL)
  • Verified the license of any newly added font, glyph, or glyph set. License is: xxx

What does this Pull Request (PR) do?

Update the glyphnames.json in the release workflow before the fonts are patched, because an up-to-date glyphname database is needed for patching.

The first commit speeds up the glyphnames.json creator script which is extremely slow - that has never been tackled because it was only once called after a 3 hour patch run, and so it did not matter match anyhow.

How should this be manually tested?

Any background context you can provide?

In the last (v3.3.0) release this bug has been circumvented manually.

What are the relevant tickets (if any)?

Fixes: #1745

Screenshots (if appropriate or helpful)

[why]
The script is extremely slow.

[how]
Instead of spawning a new subshell for each glyph (to determine the
codepoint of a char), execute the printf within the current shell.

Before:
./generate-css.sh  25,06s user 33,26s system 101% cpu 57,414 total

After:
./generate-css.sh  1,89s user 0,50s system 102% cpu 2,330 total

Signed-off-by: Fini Jastrow <[email protected]>
[why]
When the icon sets have changed (added or names changed) the i_*.sh
files are (hopefully) up to date, but the glyphnames.json file is only
updated on release.

Unfortunately the font-patcher uses the glyphnames.json to determine the
patched-in glyphs' names, but in the workflow the json file is only
updated after all fonts have been patched.

[how]
Like the version number in the font-patcher file we also create a
transient glyphnames.json in each patching job, that the font-patcher
can then utilize.

Still the in-repo glyphnames.json is only updated after successful
release. So in pinciple we call the generate-css.sh (which also
generates the glyphnames.json) once for every font in the font matrix
(just before patching) and then finally after all patching has been done
again and that is committed back to the repo.

Fixes: #1745

Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii added Bug fix CI ⚙ Automation and release related labels Nov 26, 2024
@Finii Finii merged commit 7b23967 into master Nov 26, 2024
1 check passed
@Finii Finii deleted the bugfix/release-ci branch November 26, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug fix CI ⚙ Automation and release related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with release workflow
1 participant