[11 Feb 2010] Font rendering

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
Robin
Posts: 16
Joined: Sun Feb 14, 2010 6:29 pm

[11 Feb 2010] Font rendering

Post by Robin »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 11 Feb 2010 16:00:37 +0100 (CET)

Hi,

My prob is tested only with windows and a few fonts. To get back into hw-programming I'm playing around. When I use a textobject with some fonts there are pixels cut off to the left and the bottom. [1] When I put " "..txt then I can work around the missing part to the left. [2] Is there a way I can put a "margin" around the text ?

Code: Select all

@FONT 1, "Komika Axis", 36 ;[3]

Function p_setFontObj(n,txt,x,y)
	Undo(#TEXTOBJECT, n)
	CreateTextObject(n ,ToString(txt))
	DisplayTextObject(n, x, y)
EndFunction
[1] http://my.morphosi.net/hw_prob.png [2] http://my.morphosi.net/hw_ok.png [3] http://www.urbanfonts.com/fonts/Komika_Axis.htm
User avatar
airsoftsoftwair
Posts: 5848
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[13 Feb 2010] Re: Font rendering

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 13 Feb 2010 22:51:55 +0100
Hi,

My prob is tested only with windows and a few fonts. To get back into hw-programming I'm playing around. When I use a textobject with some fonts there are pixels cut off to the left and the bottom. [1] When I put " "..txt then I can work around the missing part to the left. [2] Is there a way I can put a "margin" around the text ?

Code: Select all

@FONT 1, "Komika Axis", 36 ;[3]

Function p_setFontObj(n,txt,x,y)
	Undo(#TEXTOBJECT, n)
	CreateTextObject(n ,ToString(txt))
	DisplayTextObject(n, x, y)
EndFunction
Hmm, seems like a bug. I'll fix it. You can use TextOut() as a work-around. This is much easier to use than text objects any way. Text objects are pretty obsolete nowadays...
Locked