Bug 702225

Summary: Filter out variable fonts by fontconfig query
Product: Ghostscript Reporter: zdohnal <zdohnal>
Component: Font APIAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P4    
Version: 9.50   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: Proposed patch

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