View Full Version : DX Fonts?

28-07-2004, 10:40 PM
Can anyone possibly give me a (or a link to) walk-through on using TDXFonts... Theres no documentation on it so im at a loss, but i do need it! Thanks :)

29-07-2004, 05:42 AM
Lets for a moment ignore TDXFonts - why? because I dont know it :)

So how do we do fonts in DelphiX. There are two ways one is slow and easy the second is more difficult but definitly gives a massive performance improvement.

The easy way is to use the canvas option (my syntax might be wrong) -

DXSurface1.Canvas.Font.Size := 20;
DXSurface1.Canvas.TextOut(100,100,'This is big');

The hard way (and the way that DXFont does it) is to create an image that contains all the charaters you want to be able to write. When you want to write text you copy parts of the image onto the screen character by character.

Image1.CopyRect(Rect(0,0,10,16),Surface1,100,100) or something similar.

Based on that you should be able to write your own DXFont object.

13-08-2004, 09:39 AM
[quote="xGTx"]Can anyone possibly give me a (or a ]

Are you still interested in TDxFont?
I use it in my program, so if you still have questions, maybe I can help you.