cvs: php4(PHP_4_3) /ext/gd gd.c
| From: | Ilia Alshanetsky | Date: | Thu, 15 May 2003 02:25:59 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/gd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20923@lists.php.net to get a copy of this message | ||
iliaa Wed May 14 22:25:59 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/gd gd.c
Log:
MFH
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.221.2.26 php4/ext/gd/gd.c:1.221.2.27
--- php4/ext/gd/gd.c:1.221.2.26 Thu Apr 24 20:50:31 2003
+++ php4/ext/gd/gd.c Wed May 14 22:25:59 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.221.2.26 2003/04/25 00:50:31 iliaa Exp $ */
+/* $Id: gd.c,v 1.221.2.27 2003/05/15 02:25:59 iliaa Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -3396,28 +3396,32 @@
transform = T1_RotateMatrix(NULL, angle);
}
- extend = T1_GetExtend(*f_ind);
- str_path = T1_GetCharOutline(*f_ind, str[0], size, transform);
-
- if (!str_path) {
- if (T1_errno) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "libt1 returned error %d", T1_errno);
+ if (width) {
+ extend = T1_GetExtend(*f_ind);
+ str_path = T1_GetCharOutline(*f_ind, str[0], size, transform);
+
+ if (!str_path) {
+ if (T1_errno) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "libt1 returned error %d", T1_errno);
+ }
+ RETURN_FALSE;
}
- RETURN_FALSE;
- }
- for (i = 1; i < str_len; i++) {
- amount_kern = (int) T1_GetKerning(*f_ind, str[i-1], str[i]);
- amount_kern += str[i-1] == ' ' ? space : 0;
- add_width = (int) (amount_kern+width)/extend;
+ for (i = 1; i < str_len; i++) {
+ amount_kern = (int) T1_GetKerning(*f_ind, str[i-1], str[i]);
+ amount_kern += str[i-1] == ' ' ? space : 0;
+ add_width = (int) (amount_kern+width)/extend;
- char_path = T1_GetMoveOutline(*f_ind, add_width, 0, 0, size, transform);
- str_path = T1_ConcatOutlines(str_path, char_path);
-
- char_path = T1_GetCharOutline(*f_ind, str[i], size, transform);
- str_path = T1_ConcatOutlines(str_path, char_path);
+ char_path = T1_GetMoveOutline(*f_ind, add_width, 0, 0, size, transform);
+ str_path = T1_ConcatOutlines(str_path, char_path);
+
+ char_path = T1_GetCharOutline(*f_ind, str[i], size, transform);
+ str_path = T1_ConcatOutlines(str_path, char_path);
+ }
+ str_img = T1_AAFillOutline(str_path, 0);
+ } else {
+ str_img = T1_AASetString(*f_ind, str, str_len, space, T1_KERNING, size, transform);
}
- str_img = T1_AAFillOutline(str_path, 0);
if (T1_errno) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "libt1 returned error %d", T1_errno);