470,815 Members | 1,471 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

TTF Kerning

Has anyone else encountered the problem of TTF files when called upon to
generate text in PHP don't seem to have their kerning values applied? Has
anyone figured out how to fix it?
Feb 11 '06 #1
4 4128
"EvilJordan" <Ev********@aol.com> wrote:

Has anyone else encountered the problem of TTF files when called upon to
generate text in PHP don't seem to have their kerning values applied? Has
anyone figured out how to fix it?


I don't understand the connection with PHP here. Are you saying, for
example, that this doesn't look right:

<html><body>
<span style="font: 14pt Comic Sans MS">Testing</span>
</body></html>

You understand that you can't use arbitrary font files in a web page,
unless the browser's system also happens to have that font installed?

If I've misunderstood your question, try it again with an example.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Feb 11 '06 #2
On 2006-02-11, EvilJordan <Ev********@aol.com> wrote:
Has anyone else encountered the problem of TTF files when called upon to
generate text in PHP don't seem to have their kerning values applied? Has
anyone figured out how to fix it?


how are you rendering text using ttf and php?
are you, for instance, using the GTK stuff?

Bye.
Jasen
Feb 11 '06 #3
I'm using the built in functions that cooperate with the GD library
(imagettftext, imagettfbbox, etc.)

"Jasen Betts" <ja***@free.net.nz> wrote in message
news:24*****************@clunker.homenet...
On 2006-02-11, EvilJordan <Ev********@aol.com> wrote:
Has anyone else encountered the problem of TTF files when called upon to
generate text in PHP don't seem to have their kerning values applied? Has
anyone figured out how to fix it?


how are you rendering text using ttf and php?
are you, for instance, using the GTK stuff?

Bye.
Jasen

Feb 11 '06 #4
Yes, I understand arbitrary fonts can't be used on a webpage. PHP handles
this on the server, with any font you install on the server, then spits out
an image to the client's website. Look at the functions imagettftext and
imagepstext.

Here's an example: http://www.stewartspeak.com/dtr/demo/

And yes, I'm saying if you start typeing with any font in PHP using the TTF
functions, PHP GD ignores the built in Kerning. ImageMagick does not, but
doesn't have native PHP front end support, and MagickWand is a POS.

"Tim Roberts" <ti**@probo.com> wrote in message
news:3c********************************@4ax.com...
"EvilJordan" <Ev********@aol.com> wrote:

Has anyone else encountered the problem of TTF files when called upon to
generate text in PHP don't seem to have their kerning values applied? Has
anyone figured out how to fix it?


I don't understand the connection with PHP here. Are you saying, for
example, that this doesn't look right:

<html><body>
<span style="font: 14pt Comic Sans MS">Testing</span>
</body></html>

You understand that you can't use arbitrary font files in a web page,
unless the browser's system also happens to have that font installed?

If I've misunderstood your question, try it again with an example.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.

Feb 11 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

133 posts views Thread by Philipp Lenssen | last post: by
5 posts views Thread by Steve | last post: by
9 posts views Thread by Adam | last post: by
5 posts views Thread by John Wood | last post: by
4 posts views Thread by cashdeskmac | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.