Bug 49826 - GlobalParams::findSystemFontFile needs to include substitute name in font cache
Summary: GlobalParams::findSystemFontFile needs to include substitute name in font cache
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-12 00:13 UTC by Adrian Johnson
Modified: 2012-05-24 01:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
include substitute font name in sys font cache (5.69 KB, patch)
2012-05-12 00:13 UTC, Adrian Johnson
Details | Splinter Review
update win32 findSystemFontFile (1.12 KB, patch)
2012-05-13 04:58 UTC, Adrian Johnson
Details | Splinter Review
add substitute font name to GlobalParamsWin32 (1.50 KB, patch)
2012-05-13 05:10 UTC, Adrian Johnson
Details | Splinter Review

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.