Text Origin Decide-icidal
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Text Origin Decide-icidal
So Top-Left is winning with 94% and a 6% margin of error in its favor.
- Sardtok
- Party member
- Posts: 108
- Joined: Thu Feb 21, 2008 2:37 pm
- Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
- Contact:
Re: Text Origin Decide-icidal
You mean the whole string is too low, right?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.
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
Take off every Zigg for great rapist.
Now, outgay that!
Now, outgay that!
Re: Text Origin Decide-icidal
Thanks, Sardtok. Will probably use that Apple thing when making love.font (in not-so-distant future).
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Text Origin Decide-icidal
Will that be pre- or post-apocalypse?rude wrote:in not-so-distant future
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Text Origin Decide-icidal
It is planned during the apocalypse.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Text Origin Decide-icidal
I think everyone would have enough on their hands already during the apocalypse...
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Text Origin Decide-icidal
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?
Who is online
Users browsing this forum: Bing [Bot] and 15 guests