Text Origin Decide-icidal

General discussion about LÖVE, Lua, game development, puns, and unicorns.

The text origin should be:

Poll ended at Fri Sep 25, 2009 8:43 pm

Top-left
20
100%
Baseline
0
No votes
 
Total votes: 20

User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Text Origin Decide-icidal

Post by Jasoco »

So Top-Left is winning with 94% and a 6% margin of error in its favor.
User avatar
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

Post 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
Take off every Zigg for great rapist.
Now, outgay that!
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Text Origin Decide-icidal

Post by rude »

Thanks, Sardtok. Will probably use that Apple thing when making love.font (in not-so-distant future).
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Text Origin Decide-icidal

Post by Robin »

rude wrote:in not-so-distant future
Will that be pre- or post-apocalypse? :P
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Text Origin Decide-icidal

Post by bartbes »

It is planned during the apocalypse.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Text Origin Decide-icidal

Post by Robin »

I think everyone would have enough on their hands already during the apocalypse...
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Text Origin Decide-icidal

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 228 guests