Bug 27526

Summary: Compatibility fix for old windows sytems
Product: fontconfig Reporter: Gianluigi Tiesi <sherpya>
Component: libraryAssignee: fontconfig-bugs
Status: RESOLVED FIXED QA Contact: Behdad Esfahbod <freedesktop>
Severity: normal    
Priority: medium CC: akira, freedesktop, sherpya, tml
Version: 2.8   
Hardware: Other   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed patch
A better patch that integrates also LOCAL_APPDATA_FONTCONFIG_CACHE path
new patch

Description Gianluigi Tiesi 2010-04-07 15:43:29 UTC
sometime ago I've posted a patch to avoid breaking compatibility with old windows
while using GetSystemWindowsDirectoryA

I've noticed the code was broken since the better place to place dynamic function loading is FcConfigParseAndLoad (hope it's finally ok here ;D)

I'm attaching the updated patch
Comment 1 Gianluigi Tiesi 2010-04-07 15:46:15 UTC
Created attachment 34778 [details] [review]
proposed patch
Comment 2 Gianluigi Tiesi 2010-04-07 20:39:48 UTC
Created attachment 34792 [details] [review]
A better patch that integrates also LOCAL_APPDATA_FONTCONFIG_CACHE path
Comment 3 Gianluigi Tiesi 2010-04-08 03:29:11 UTC
ah you need to replace

strncat(szFPath, "\\MPlayer", MAX_PATH - 1 - strlen(szFPath));

with

strncat(szFPath, "\\fontconfig\\cache", MAX_PATH - 1 - strlen(szFPath));
Comment 4 Behdad Esfahbod 2010-04-08 15:30:13 UTC
Gianluigi, please attach an updated patch.

Tor, can you review this please?  I'm going to make a release early next week, so the sooner you can review this the better.
Comment 5 Tor Lillqvist 2010-04-08 23:51:33 UTC
Looks fine to me.
Comment 6 Behdad Esfahbod 2010-04-09 22:20:17 UTC
Tor, feel like testing and committing?
Comment 7 Akira TAGOH 2012-02-20 22:03:56 UTC
The attached patch seems not cleanly applied to current git repo. that would be appreciated if you can update.
Comment 8 Gianluigi Tiesi 2012-04-11 16:26:54 UTC
Created attachment 59822 [details] [review]
new patch

updated patch
Comment 9 Gianluigi Tiesi 2012-04-11 16:29:03 UTC
I've updated the patch trying to retain formatting/tabs where possible (broken in some places)
I still don't have a way to test compatibility with old windows right now, I need to setup again my mplayer build environment I lost in a fs corruption, but technically the patch is just adapted so it should act as before (I've also fixed the mplayer reference)
Comment 10 Gianluigi Tiesi 2012-04-11 16:33:40 UTC
sorry forgot to dos2unix
Comment 11 Akira TAGOH 2012-04-11 22:02:22 UTC
Thanks for the patch. fixed in 470e92c9

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.