[libGD] #199 [Task opened] useFontConfig() does not work as documented, and lacks needed functionality

[email protected] Tue, 14 Apr 2009 07:57:10 +0200 (CEST)
Newsgroups php.gd.bugs
Message-ID <[email protected]>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Ethan Merritt (sfeam) 

Attached to Project - libGD
Summary -  useFontConfig() does not work as documented, and lacks needed functionality
Task Type - Bug Report
Category - Freetype
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - 2.0.36RC1
Due in Version - Undecided
Due Date - Undecided
Details - The function  useFontConfig(flag)  is documented as returning the status of fontconfig support if flag = 0, and requesting that libgd use fontconfig conventions for font names if flag = 1.

It doesn't do that.  Instead it enables fontconfig name processing regardless of the value of flag, and offers no way to turn it off again.

I suggest the following trivial patch.  
flag=0 disables (always)
flag>0 enables (if possible)
return value reports whether fontconfig is available (same as current)

The bug, and the fix, apply both to 2.0.36RC1 and to current CVS for 2.1.0

<code>
--- gdft.c.sav  2009-04-13 13:38:18.000000000 -0700
+++ gdft.c      2009-04-13 13:38:52.000000000 -0700
@@ -1661,7 +1661,7 @@ static char * font_path(char **fontpath,
 BGD_DECLARE(int) gdFTUseFontConfig(int flag)
 {
 #ifdef HAVE_LIBFONTCONFIG
-       fontConfigFlag = 1;
+       fontConfigFlag = flag;
        return 1;
 #else
        return 0;

</code>



More information can be found at the following URL:
http://bugs.libgd.org/?do=details&task_id=199

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.