Page 2 of 2

Re: Bases of Elements

Posted: Fri Aug 29, 2008 8:28 pm
by mike
Green_Hell wrote:2. Count height of whole text line (Font:getHeight( )? Who knows.)
Font:getHeight()
Green_Hell wrote:Isn't solution. Still draws somewhere. I can't explain what I need. :(
You want there to be a function that sets an area (a rectangle) for drawing text so that text aligns itself within that box and aligns accordingly?

Also, do you people want Font:setCenter(love.align_center) This would mean that text would be drawn with the center being the center of the text.

Re: Bases of Elements

Posted: Fri Aug 29, 2008 10:00 pm
by Green_Hell
textometry.png
textometry.png (4.07 KiB) Viewed 3008 times
I need to be able to draw text somewhere and know where are the last pixels of the drawn line on all 4 sides.

Sizes I need and I think I have them are in Fuchsia. Not sure about Height.
Size, which I need, to be able to set base wherever I want is Lime Green.
c1, c2, c3, c4 are corners of the envelope.
You c2 is actually diferent to the current base which is only corner I know where it is but, don't know where is in relation to the envelope.

Screw these colors! :x

Re: Bases of Elements

Posted: Sat Aug 30, 2008 11:17 am
by mike
Aha, I see what you need now. Love the nice little picture.

But I have no idea how to do this, especially with the current system. I'll add Font:getEnvelope() (or something) to the task list, but I'm not promising anything, as this looks horribly confusing. This may be a stupid question, but why do you need this?

Re: Bases of Elements

Posted: Sat Aug 30, 2008 3:16 pm
by Green_Hell
mike wrote:This may be a stupid question, but why do you need this?
As usual. I'm trying to do something what LÖVE isn't designed for. :roll:

The problem is that I can't do it in a different language or a tool-kit. I'll probably write a specification and post it here on the forum hoping that somebody else will do it. I was planing to do this but wanted to have something finished to provide. :cry:

Re: Bases of Elements

Posted: Sun Aug 31, 2008 1:37 pm
by rude
mike wrote:But I have no idea how to do this, especially with the current system. I'll add Font:getEnvelope() (or something) to the task list, but I'm not promising anything, as this looks horribly confusing. This may be a stupid question, but why do you need this?
FreeType provides access to all font metrics. http://www.freetype.org/freetype2/docs/ ... step2.html

Re: Bases of Elements

Posted: Sun Aug 31, 2008 11:25 pm
by qubodup
Green_Hell wrote:
textometry.png
I want to officially thank you in the name of world for using visualization of what'cha talking 'boot.

Thank you! Thumbs up!

Re: Bases of Elements

Posted: Mon Sep 01, 2008 11:22 pm
by mike
rude wrote:
mike wrote:But I have no idea how to do this, especially with the current system. I'll add Font:getEnvelope() (or something) to the task list, but I'm not promising anything, as this looks horribly confusing. This may be a stupid question, but why do you need this?
FreeType provides access to all font metrics. http://www.freetype.org/freetype2/docs/ ... step2.html
Touché. I may be laying this task on you, then.. since you actually fucking read the documentation..