Page 1 of 1

[11 Feb 2010] Font rendering

Posted: Sat Jun 13, 2020 5:32 pm
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

[13 Feb 2010] Re: Font rendering

Posted: Sat Jun 13, 2020 5:32 pm
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...