Page 3 of 3

Re: Text Origin Decide-icidal

Posted: Mon Sep 21, 2009 6:36 am
by Jasoco
So Top-Left is winning with 94% and a 6% margin of error in its favor.

Re: Text Origin Decide-icidal

Posted: Tue Sep 29, 2009 9:07 am
by Sardtok
Simtex wrote:Notice that the 'p' and 'y' extend below the other letters, while the 'l' rises higher than the other letters, yet even the 'l' is too low. Along the x-axis though, everything is properly centered.
You mean the whole string is too low, right?
And that if the problem with using top left as the base instead of the baseline, was ascenders then the l should have been in a different position in this string.
First of all, the l would have been lower if the text was top-left aligned and the l was higher due to an ascender (that is, if this problem existed).

In 0.5.0 it's easy to do a centered baseline, but then the text is a bit too high. And there doesn't seem to be any kind of proper font metrics.

The thing you are interested in is the x height, could be called getXHeight.
getHeight returns the font's ascent (height of ascenders from baseline), should probably have been getAscent, but maybe names shouldn't change. Or set getHeight to return the x height and getAscent to return the ascent.
You already have getLineHeight, but I'm not sure if it reflects the actual line height, since you can set it. (line height = ascent + descent + line gap)
There's also the cap height, which is the height of capital letters from the baseline, as it can be different from the height of ascenders.

Apple has a good resource explaining font metrics in a single simple image:
http://developer.apple.com/mac/library/ ... trics.html

Re: Text Origin Decide-icidal

Posted: Mon Oct 19, 2009 9:48 pm
by rude
Thanks, Sardtok. Will probably use that Apple thing when making love.font (in not-so-distant future).

Re: Text Origin Decide-icidal

Posted: Tue Oct 20, 2009 10:06 am
by Robin
rude wrote:in not-so-distant future
Will that be pre- or post-apocalypse? :P

Re: Text Origin Decide-icidal

Posted: Tue Oct 20, 2009 10:18 am
by bartbes
It is planned during the apocalypse.

Re: Text Origin Decide-icidal

Posted: Tue Oct 20, 2009 10:42 am
by Robin
I think everyone would have enough on their hands already during the apocalypse...

Re: Text Origin Decide-icidal

Posted: Tue Oct 20, 2009 11:08 am
by bartbes
No, no, we'll just be waiting to die, so if you're going to die with a keyboard in your hands, you might as well code, right?