cvs: gd(GD_2_0) /libgd gd.h gdft.c index.html
[email protected] ("Pierre-Alain Joye")
| Newsgroups | php.gd.cvs |
|---|---|
| Message-ID | <cvspajoye1170465093@cvsserver> |
pajoye Sat Feb 3 01:11:33 2007 UTC
Modified files: (Branch: GD_2_0)
/gd/libgd gd.h gdft.c index.html
Log:
- MFB: #30, restores the ability to recognize and handle a font with
Adobe-specific character encoding
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.h?r1=1.34&r2=1.34.2.1&diff_format=u
Index: gd/libgd/gd.h
diff -u gd/libgd/gd.h:1.34 gd/libgd/gd.h:1.34.2.1
--- gd/libgd/gd.h:1.34 Fri Jan 12 13:02:38 2007
+++ gd/libgd/gd.h Sat Feb 3 01:11:32 2007
@@ -397,7 +397,8 @@
int flags; /* Logical OR of gdFTEX_ values */
double linespacing; /* fine tune line spacing for '\n' */
int charmap; /* TBB: 2.0.12: may be gdFTEX_Unicode,
- gdFTEX_Shift_JIS, or gdFTEX_Big5;
+ gdFTEX_Shift_JIS, gdFTEX_Big5,
+ or gdFTEX_Adobe_Custom;
when not specified, maps are searched
for in the above order. */
int hdpi; /* if (flags & gdFTEX_RESOLUTION) */
@@ -453,6 +454,7 @@
#define gdFTEX_Unicode 0
#define gdFTEX_Shift_JIS 1
#define gdFTEX_Big5 2
+#define gdFTEX_Adobe_Custom 3
BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
double ptsize, double angle, int x, int y,
http://cvs.php.net/viewvc.cgi/gd/libgd/gdft.c?r1=1.28&r2=1.28.2.1&diff_format=u
Index: gd/libgd/gdft.c
diff -u gd/libgd/gdft.c:1.28 gd/libgd/gdft.c:1.28.2.1
--- gd/libgd/gdft.c:1.28 Wed Jan 3 21:21:21 2007
+++ gd/libgd/gdft.c Sat Feb 3 01:11:33 2007
@@ -1004,6 +1004,14 @@
break;
}
}
+ else if (encoding == gdFTEX_Adobe_Custom)
+ {
+ if (charmap->encoding == FT_ENCODING_ADOBE_CUSTOM)
+ {
+ encodingfound++;
+ break;
+ }
+ }
else if (encoding == gdFTEX_Big5)
{
/* renamed sometime after freetype-2.1.4 */
@@ -1199,6 +1207,12 @@
}
}
break;
+
+ case gdFTEX_Adobe_Custom:
+ default:
+ ch &= 0xFF;
+ next++;
+ break;
}
/* Convert character code to glyph index */
http://cvs.php.net/viewvc.cgi/gd/libgd/index.html?r1=1.52&r2=1.52.2.1&diff_format=u
Index: gd/libgd/index.html
diff -u gd/libgd/index.html:1.52 gd/libgd/index.html:1.52.2.1
--- gd/libgd/index.html:1.52 Mon Jan 29 21:07:04 2007
+++ gd/libgd/index.html Sat Feb 3 01:11:33 2007
@@ -4135,7 +4135,7 @@
<DT><A NAME="gdImageStringFTEx">
char *gdImageStringFTEx(gdImagePtr im, int *brect,
int fg, char *fontname, double ptsize, double angle,
- int x, int y, gdFTStringExtraPtr strex)</A>
+ int x, int y, char *string, gdFTStringExtraPtr strex)</A>
<STRONG>(FUNCTION)</STRONG>
<DD>
<strong>New in 2.0.5,</strong> also found in common third-party versions
@@ -4183,8 +4183,8 @@
flags |= gdFTEX_CHARMAP;
</pre>
And set <code>charmap</code> to the desired value, which can be
-any of gdFTEX_Unicode, gdFTEX_Shift_JIS, or gdFTEX_Big5. If you do not
-specify a preference, Unicode will be tried first. If the preferred
+any of gdFTEX_Unicode, gdFTEX_Shift_JIS, gdFTEX_Big5, or gdFTEX_Adobe_Custom.
+If you do not specify a preference, Unicode will be tried first. If the preferred
character mapping is not found in the font, other character mappings
are attempted.
<p>