Bug 702225 - Filter out variable fonts by fontconfig query
Summary: Filter out variable fonts by fontconfig query
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Font API (show other bugs)
Version: 9.50
Hardware: PC Linux
: P4 enhancement
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-16 13:30 UTC by zdohnal
Modified: 2020-05-21 07:58 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Proposed patch (452 bytes, patch)
2020-03-16 13:30 UTC, zdohnal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zdohnal 2020-03-16 13:30:17 UTC
Created attachment 18999 [details]
Proposed patch

Hi,

based on communication with Chris Lidell on #ghostscript channel, gs does not want to support variable fonts from fontconfig for now.

The attached patch filters out variable fonts from fontconfig query, so gs will not spend more time looping in gp_enumerate_fonts_next() function than necessary.

Would it be possible to add it to the project?

Please let me know if I should change something in the patch.

Thank you in advance!
Comment 1 Ray Johnston 2020-05-15 16:14:13 UTC
Assigning to Chris to review and accept/modify/reject the patch and close the
bug.
Comment 2 Chris Liddell (chrisl) 2020-05-20 11:28:12 UTC
Patch applied, thanks!

http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=7e7fa21f9e37
Comment 3 Chris Liddell (chrisl) 2020-05-21 07:58:58 UTC
Turns out FC_VARIABLE is a fairly new addition to fontconfig's search parameters (<= 2.12.6 doesn't have it >=2.13.1 does), so add preprocessor conditions so we'll only use when fontconfig is new enough:

https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0d2c264eb53