Skip to content

Commit 20a9aaa

Browse files
authored
Update imagettftext.xml Add the literal tag (#4405)
* Update imagettftext.xml Add the literal tag * Update imagettftext.xml Replace whitespaces
1 parent 6fdd8cf commit 20a9aaa

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

reference/image/functions/imagettftext.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<listitem>
4949
<para>
5050
The angle in degrees, with 0 degrees being left-to-right reading text.
51-
Higher values represent a counter-clockwise rotation. For example, a
51+
Higher values represent a counter-clockwise rotation. For example, a
5252
value of 90 would result in bottom-to-top reading text.
5353
</para>
5454
</listitem>
@@ -94,12 +94,12 @@
9494
</para>
9595
<para>
9696
May include decimal numeric character references (of the form:
97-
&amp;#8364;) to access characters in a font beyond position 127.
98-
The hexadecimal format (like &amp;#xA9;) is supported.
97+
<literal>&amp;#8364;</literal>) to access characters in a font beyond position 127.
98+
The hexadecimal format (like <literal>&amp;#xA9;</literal>) is supported.
9999
Strings in UTF-8 encoding can be passed directly.
100100
</para>
101101
<para>
102-
Named entities, such as &amp;copy;, are not supported. Consider using
102+
Named entities, such as <literal>&amp;copy;</literal>, are not supported. Consider using
103103
<function>html_entity_decode</function>
104104
to decode these named entities into UTF-8 strings.
105105
</para>
@@ -116,9 +116,9 @@
116116
&reftitle.returnvalues;
117117
<para>
118118
Returns an array with 8 elements representing four points making the
119-
bounding box of the text. The order of the points is lower left, lower
119+
bounding box of the text. The order of the points is lower left, lower
120120
right, upper right, upper left. The points are relative to the text
121-
regardless of the angle, so "upper left" means in the top left-hand
121+
regardless of the angle, so "upper left" means in the top left-hand
122122
corner when you see the text horizontally.
123123
Returns &false; on error.
124124
</para>
@@ -158,6 +158,7 @@
158158
<programlisting role="php">
159159
<![CDATA[
160160
<?php
161+
161162
// Set the content-type
162163
header('Content-Type: image/png');
163164
@@ -172,6 +173,7 @@ imagefilledrectangle($im, 0, 0, 399, 29, $white);
172173
173174
// The text to draw
174175
$text = 'Testing...';
176+
175177
// Replace path by your own font path
176178
$font = 'arial.ttf';
177179
@@ -183,6 +185,7 @@ imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
183185
184186
// Using imagepng() results in clearer text compared with imagejpeg()
185187
imagepng($im);
188+
186189
?>
187190
]]>
188191
</programlisting>

0 commit comments

Comments
 (0)