|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-01-11 08:53 UTC] steinm
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 14:00:01 2025 UTC |
The documentation states for the PDF_set_font()-function that the encoding-parameter should be given as a string. The string however is not used in any way in PHP. That causes problems with skandinavian alphabets. I have made a little change to PHP, which makes PHP expect an integer as the encoding-parameter (like pdflib does) and uses it as the encoding method. This works well and now I'm able to create PDF files that have skandinavian alphabets in them. Here is a unified diff to do the thing I did: --- functions/pdf.c Wed Jan 6 13:37:08 1999 +++ functions/pdf.c Wed Jan 6 13:37:54 1999 @@ -511,7 +511,7 @@ } /* }}} */ -/* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, string encoding) +/* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, int encoding) Select the current font face and size */ void php3_pdf_set_font(INTERNAL_FUNCTION_PARAMETERS) { pval *arg1, *arg2, *arg3, *arg4; @@ -526,7 +526,7 @@ convert_to_long(arg1); convert_to_string(arg2); convert_to_double(arg3); - convert_to_string(arg4); + convert_to_long(arg4); id=arg1->value.lval; pdf = php3_list_find(id,&type); if(!pdf || type!=PDF_GLOBAL(le_pdf)) { @@ -534,7 +534,7 @@ RETURN_FALSE; } - PDF_set_font(pdf, arg2->value.str.val, (float) arg3->value.dval, builtin); + PDF_set_font(pdf, arg2->value.str.val, (float) arg3->value.dval, arg4->value.lval); RETURN_TRUE; }