Bug 49826

Summary: GlobalParams::findSystemFontFile needs to include substitute name in font cache
Product: poppler Reporter: Adrian Johnson <ajohnson>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: include substitute font name in sys font cache
update win32 findSystemFontFile
add substitute font name to GlobalParamsWin32

Description Adrian Johnson 2012-05-12 00:13:06 UTC
Created attachment 61475 [details] [review]
include substitute font name in sys font cache

While making evince use the new API for getting the substitute name I found a bug in GlobalParams::findSystemFontFile. If findSystemFontFile is called with substituteFontName not NULL for a font already cached in the SysFontInfo cache, the substitute name is not returned. The attached patch fixes this by ensuring the substitute name is always determined for new fonts and stored in the cache.
Comment 1 Albert Astals Cid 2012-05-13 04:40:10 UTC
Can you please adapt the implementation of findSystemFontFile in GlobalParamsWin.cc (at least make it compile by adding the parameter)
Comment 2 Adrian Johnson 2012-05-13 04:58:46 UTC
Created attachment 61548 [details] [review]
update win32 findSystemFontFile

Patch to add substitute font name to win32 findSystemFontFile. Not tested as I don't have a win32 build environment for poppler.
Comment 3 Albert Astals Cid 2012-05-13 05:08:08 UTC
There is yet another implementation of findSystemFontFile in
GlobalParamsWin.cc
Comment 4 Adrian Johnson 2012-05-13 05:10:25 UTC
Created attachment 61550 [details] [review]
add substitute font name to GlobalParamsWin32

The previous patch was for the wrong file. This patch should fix the compilation but I am unable to test it.
Comment 5 Albert Astals Cid 2012-05-23 15:09:32 UTC
Makes sense, please commit and sorry for the delay
Comment 6 Adrian Johnson 2012-05-24 01:57:59 UTC
Pushed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.