CVS update: php3/doc/functions

From: Date: Sun, 30 May 1999 09:29:01 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-6297@lists.php.net to get a copy of this message
Date: Sunday May 30, 1999 @ 5:29 Author: jah Update of /repository/php3/doc/functions In directory php:/tmp/cvs-serv19920/doc/functions Modified Files: image.sgml Log Message: Fixed documentation. Index: php3/doc/functions/image.sgml diff -u php3/doc/functions/image.sgml:1.26 php3/doc/functions/image.sgml:1.27 --- php3/doc/functions/image.sgml:1.26 Fri May 28 18:19:19 1999 +++ php3/doc/functions/image.sgml Sun May 30 05:29:01 1999 @@ -1103,10 +1103,14 @@ <paramdef>int <parameter>fontindex</parameter></paramdef> </funcsynopsis> <para> - See also <function>imagepsloadfont</function> and <function>imagepscopyfont</function>. + See also <function>imagepsloadfont</function>. </refsect1> </refentry> +<!-- The function in t1lib which this function uses seems to be buggy... +Currently, just comment out everywhere in the docs and source until time +permits to find a solution. + <refentry id="function.imagepscopyfont"> <refnamediv> <refname>ImagePSCopyFont</refname> @@ -1135,6 +1139,7 @@ See also <function>imageploadpsfont</function>. </refsect1> </refentry> +--> <refentry id="function.imagepsencodefont"> <refnamediv> @@ -1147,25 +1152,18 @@ <funcdef>int <function>imagepsencodefont</function></funcdef> <paramdef>string <parameter>encodingfile</parameter></paramdef> </funcsynopsis> + <para> + Loads a character encoding vector from from a file and changes the fonts + encoding vector to it. As a PostScript fonts default vector lacks most of the + character positions above 127, you'll definitely want to change this if + you use an other language than english. The exact format of this file is + described in T1libs documentation. T1lib comes with two ready-to-use files, + IsoLatin1.enc and IsoLatin2.enc. + <para> If you find yourself using this function all the time, a much better way to define the encoding is to set ps.default_encoding in php3.ini to point to the right encoding file and all fonts you load will automatically have the right encoding. -<!-- - <example> - <title></title> - <programlisting role=php> -&lt;?php -$f1 = imagepsloadfont("/usr/local/lib/psfonts/i/ItcEraBoo.pfb"); -$f2 = imagepscopyfont($f1); -imagepsencodefont($f1, "/usr/local/share/t1lib/enc/IsoLatin1.enc"); -imagepsencodefont($f2, "/usr/local/share/t1lib/enc/IsoLatin1.enc"); -imagepsfreefont($f2); -imagepsfreefont($f1); -?&gt; -</programlisting> - </example> ---> </refsect1> </refentry> @@ -1191,18 +1189,20 @@ <paramdef>float <parameter>angle</parameter></paramdef> <paramdef>int <parameter>antialias_steps</parameter></paramdef> </funcsynopsis> + <parameter>size</parameter> is expressed in pixels. <para> <parameter>foreground</parameter> is the color in which the text will be painted. <parameter>background</parameter> is the color to which the text will try to fade in with antialiasing. No pixels with the color <parameter>background</parameter> are actually painted, so the background image does not need to be of solid color. <para> - The coordinates given by - <parameter>x</parameter>,<parameter>y</parameter> will define the - basepoint of the first character (roughly the lower-left corner - of the character). This is different from the - <function>ImageString</function>, where x,y define the - upper-right corner of the first character. + The coordinates given by <parameter>x</parameter>, <parameter>y</parameter> + will define the origin (or reference point) of the first character + (roughly the lower-left corner of the character). This is different from the + <function>ImageString</function>, where x, y define the + upper-right corner of the first character. Refer to PostScipt documentation + about fonts and their measuring system if you have trouble understanding + how this works. <para> <parameter>space</parameter> allows you to change the default value of a space in a font. This amount is added to the normal value and can also be negative. @@ -1210,8 +1210,7 @@ <parameter>tightness</parameter> allows you to control the amount of white space between characters. This amount is added to the normal character width and can also be negative. <para> - <parameter>angle</parameter> is currently nonfunctional. - Only horizontal text, ie. angle = 0 degrees is supported. + <parameter>angle</parameter> is in degrees. <para> <parameter>antialias_steps</parameter> allows you to control the number of colours used for antialiasing text. Allowed values are 4 and 16. The higher value is @@ -1223,6 +1222,32 @@ <para> Parameters <parameter>space</parameter>, <parameter>tightness</parameter>, <parameter>angle</parameter> and <parameter>antialias</parameter> are optional. + <para> + This function returns an array containing the following elements: + <informaltable> + <tgroup cols="2"> + <tbody> + <row> + <entry>0</entry> + <entry>lower left x-coordinate</entry> + </row> + <row> + <entry>1</entry> + <entry>lower left y-coordinate</entry> + </row> + <row> + <entry>2</entry> + <entry>upper right x-coordinate</entry> + </row> + <row> + <entry>3</entry> + <entry>upper right y-coordinate</entry> + </row> + </tbody> + </tgroup> + </informaltable> + <para> + See also <function>imagepsbbox</function>. </refsect1> </refentry> @@ -1243,14 +1268,15 @@ <paramdef>float <parameter>angle</parameter></paramdef> </funcsynopsis> <para> + <parameter>size</parameter> is expressed in pixels. + <para> <parameter>space</parameter> allows you to change the default value of a space in a font. This amount is added to the normal value and can also be negative. <para> <parameter>tightness</parameter> allows you to control the amount of white space between characters. This amount is added to the normal character width and can also be negative. <para> - <parameter>angle</parameter> is currently nonfunctional. - Only horizontal text, ie. angle = 0 degrees is supported. + <parameter>angle</parameter> is in degrees. <para> Parameters <parameter>space</parameter> and <parameter>tightness</parameter> are expressed in character space units, where 1 unit is 1/1000th of an em-square. @@ -1260,10 +1286,8 @@ <para> The bounding box is calculated using information available from character metrics, and unfortunately tends to differ slightly from the results achieved by actually - rasterizing the text. The lower left y-coordinate is often 1 pixel too far right, - and the upper right y-coordinate may be as far as 2% of the total width too far right - when using the six-parameter form of this function. - You have been warned. + rasterizing the text. If the angle is 0 degrees, you can expect the text to need + 1 pixel more to every direction. <para> This function returns an array containing the following elements: <informaltable> @@ -1288,6 +1312,8 @@ </tbody> </tgroup> </informaltable> + <para> + See also <function>imagepstext</function>. </refsect1> </refentry> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#6297) next »