SolvedFont with border?

Posts 19 of 9 · Page 1 of 1
Font with border?
the title says all anyone know how to draw the font with every single char bordered? it's so sexy :Q_
I do not know ...
You can either write a rederer for your text or take the easy way out and just write the text 5 times. Both will be a bit laggy but writing it 5 times may have a worse strain on your processor.(Unless of course you have a good one)

Draw your text but each time count one pixel off, like so.
Drawing text at 50 x and 100 y


Code:
topleftx + 51, toplefty + 100 // Right      draw this black
topleftx + 49, toplefty + 100 // Left      draw this black
topleftx + 50, toplefty + 101 // Down      draw this black
topleftx + 50, toplefty + 99 // Up      draw this black
topleftx + 50, toplefty + 100 // Original text      draw this white
Quote Originally Posted by f13 View Post
You can either write a rederer for your text or take the easy way out and just write the text 5 times. Both will be a bit laggy but writing it 5 times may have a worse strain on your processor.(Unless of course you have a good one)

Draw your text but each time count one pixel off, like so.
Drawing text at 50 x and 100 y


Code:
topleftx + 51, toplefty + 100 // Right      draw this black
topleftx + 49, toplefty + 100 // Left      draw this black
topleftx + 50, toplefty + 101 // Down      draw this black
topleftx + 50, toplefty + 99 // Up      draw this black
topleftx + 50, toplefty + 100 // Original text      draw this white
i used this way thank you, it works fine ^^ i don't think that the CPU will be angry with me for making it drawing x4 texts xD
Humm.. try drawing Two Text Example
DrawText( PosX +10,PosY + 10,"XD",RED,pDevice);//Font size = 12
DrawText( PosX +10,PosY + 10,"XD",RED,pDevice);//font Size = 12.1 or 13... i dont know... it must be 1 or 2 pixels more big

I dont tried it never :P
Quote Originally Posted by wicho_koz View Post
Humm.. try drawing Two Text Example
DrawText( PosX +10,PosY + 10,"XD",RED,pDevice);//Font size = 12
DrawText( PosX +10,PosY + 10,"XD",RED,pDevice);//font Size = 12.1 or 13... i dont know... it must be 1 or 2 pixels more big

I dont tried it never :P
You could do that but it wont look as good, nor will it be properly aligned. If you start drawing both on the same X & Y The left side wouldn't be outlined. Given, they are both started in the same place it will extend further right.

DirectX DrawText method with outline - DirectX and XNA - GameDev.net
This would have a fix for it though.
Quote Originally Posted by f13 View Post
You could do that but it wont look as good, nor will it be properly aligned. If you start drawing both on the same X & Y The left side wouldn't be outlined. Given, they are both started in the same place it will extend further right.

DirectX DrawText method with outline - DirectX and XNA - GameDev.net
This would have a fix for it though.
Oh true, I did not think about it
Oops, wrong thread, Draw a box around it, or add it to the Function that draw's the text to get the length of it
DrawText(x - 1, y - 1)
DrawText(x + 1, y + 1)

It should work
/closed
Posts 19 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?