note 86100 added to function.imagettftext

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
"php at yvanrodrigues dot com" is right...this function is not reliable on extended characters. User beware.

In my case, it produced different results with OpenType vs. TrueType versions of the same font. (Converted my OT font to TT using FontForge as suggested. Strangely, the resulting TT font file was twice as big as the OT version and didn't look the same...heavier weight and slightly different spacing.) While the TT version was more accurate at displaying certain characters, neither was totally reliable, both yielding boxes in place of perfectly valid character glyphs that I could verify existed in the font. (Both fonts showed the same characters perfectly on an HTML page with UTF-8 charset.)

What's more, using this same function with the same font on our development vs. production server also produced different results: some chars worked on dev but not production. Stranger still, the font spacing and size were slightly different between the two. Font file is identical. Dev server is Linux, production server is Windows, but should that matter? Suspect it has more to do with differing versions of FreeType (2.1 vs. 1.9 respectively).

Anyway, careful with this function...best to stick within the rather small range of safe characters and avoid anything else.
----
Server IP: 208.69.120.35
Probable Submitter: 68.6.44.131
----
Manual Page -- http://www.php.net/manual/en/function.imagettftext.php
Edit        -- https://master.php.net/note/edit/86100
Del: integrated  -- https://master.php.net/note/delete/86100/integrated
Del: useless     -- https://master.php.net/note/delete/86100/useless
Del: bad code    -- https://master.php.net/note/delete/86100/bad+code
Del: spam        -- https://master.php.net/note/delete/86100/spam
Del: non-english -- https://master.php.net/note/delete/86100/non-english
Del: in docs     -- https://master.php.net/note/delete/86100/in+docs
Del: other reasons-- https://master.php.net/note/delete/86100
Reject      -- https://master.php.net/note/reject/86100
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.