Skip to content

asb-plugin-font: Make a priority for Regular style of fonts#496

Open
tagoh wants to merge 2 commits into
hughsie:mainfrom
tagoh:issues/493
Open

asb-plugin-font: Make a priority for Regular style of fonts#496
tagoh wants to merge 2 commits into
hughsie:mainfrom
tagoh:issues/493

Conversation

@tagoh

@tagoh tagoh commented Feb 25, 2025

Copy link
Copy Markdown

This change aims to improve a text in summary and the order of screenshots for Regular style of fonts.

Removing a direct dependency to FreeType as a side-effect.

Fixes #493

This change aims to improve a text in summary and the order of
screenshots for Regular style of fonts.

Removing a direct dependency to FreeType as a side-effect.

Fixes hughsie#493
@tagoh

tagoh commented Feb 25, 2025

Copy link
Copy Markdown
Author

After this fix:

$ zgrep summary /tmp/repodata/example.xml.gz| wc -l               
294
$ zgrep summary /tmp/repodata/example.xml.gz| grep Regular | wc -l
293
$ zgrep -C3 "A Light font from Noto Sans Hebrew" /tmp/repodata/example.xml.gz
    <pkgname>google-noto-sans-hebrew-vf-fonts</pkgname>
    <source_pkgname>google-noto-fonts</source_pkgname>
    <name>Noto Sans Hebrew</name>
    <summary>A Light font from Noto Sans Hebrew</summary>
    <description><p>(null)</p></description>
    <icon type="cached" height="64" width="64">org.fedoraproject.google-noto-sans-hebrew-vf-fonts.png</icon>
    <project_license>OFL-1.1</project_license>
$ fc-query -f "%{family}:%{style}\n" /usr/share/fonts/google-noto-vf/NotoSansHebrew\[wght\].ttf
Noto Sans Hebrew,Noto Sans Hebrew Light:Light,Regular
Noto Sans Hebrew,Noto Sans Hebrew Light:Medium
Noto Sans Hebrew,Noto Sans Hebrew Light:SemiBold
Noto Sans Hebrew,Noto Sans Hebrew Light:Bold
Noto Sans Hebrew,Noto Sans Hebrew Light:

So it works as expected.

@tagoh

tagoh commented Feb 25, 2025

Copy link
Copy Markdown
Author

For screenshots, there was weird behavior that screenshot already exists with hash blahblahblah and it wasn't 100% reproducible. well, it basically always happened but sometimes with font A but sometimes with font B etc.

Without this patch:

$ tar tvfa /tmp/repodata/example-screenshots.tar| wc -l
361

With this patch:

$ tar tvfa /tmp/repodata/example-screenshots.tar| wc -l
2025

This isn't yet everything. The above warning still happens with some fonts. no idea why. we may need to investigate it furthermore.

Noto fonts has at least:

$ fc-scan -f "%{family}:%{style}\n" /usr/share/fonts/google-noto | wc -l
2057
$ fc-scan -f "%{family}:%{style}\n" /usr/share/fonts/google-noto-vf | wc -l
499

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.

Inconsistency results for font styles from appstream-builder

1 participant