appstream-glib icon indicating copy to clipboard operation
appstream-glib copied to clipboard

appstream-builder fails to parse Noto Nastaliq Urdu font

Open tagoh opened this issue 10 months ago • 4 comments

The log file says that:

DEBUG:   Getting filename match for google-noto-nastaliq-urdu-fonts-20250201-1.fc43.noarch.rpm
DEBUG:   Exploding tree for google-noto-nastaliq-urdu-fonts
DEBUG:   Adding extra package google-noto-fonts-common for google-noto-nastaliq-urdu-fonts
DEBUG:   Processing google-noto-nastaliq-urdu-fonts-20250201-1.fc43.noarch.rpm with appdata
DEBUG:   Running asb_plugin_process() from appdata
INFO:    Upstream contact <[email protected]>
DEBUG:   Running asb_plugin_process_app() from desktop
DEBUG:   Running asb_plugin_process_app() from font
WARNING: Failed to get font from /tmp/appstream/google-noto-nastaliq-urdu-fonts-20250201-1.fc43/usr/share/fonts/googl
e-noto/NotoNastaliqUrdu-Bold.ttf: Could not generate 64x64 font icon with 'أب'
WARNING: Failed to get font from /tmp/appstream/google-noto-nastaliq-urdu-fonts-20250201-1.fc43/usr/share/fonts/googl
e-noto/NotoNastaliqUrdu-Regular.ttf: Font screenshot already exists with hash 876c6d036d8de8ae448c2218fa1cd888

However both NotoNastaliqUrdu-Bold.ttf and NotonastaliqUrdu-Regular.ttf has U+0623 and U+0628.

$ hb-view --text "أب" /usr/share/fonts/google-noto/NotoNastaliqUrdu-Regular.ttf

Image

tagoh avatar Feb 20 '25 08:02 tagoh

Could you debug a bit why the Could not generate 64x64 font icon error is being generated?

hughsie avatar Feb 20 '25 09:02 hughsie

This may happens because the Arabic/Urdu text is RTL direction and cairo doesn't support RTL text. You need to use Cairo integration in Harfbuzz and FriBiDi to get the direction of the text.

tagoh avatar Feb 25 '25 06:02 tagoh

You need to use Cairo integration in Harfbuzz and FriBiDi

Patches very welcome for that; I have no idea how that would work.

hughsie avatar Feb 25 '25 07:02 hughsie

Any chance to review PR?

tagoh avatar Mar 13 '25 12:03 tagoh