Results 1 to 9 of 9
  1. #1
    Sixx93's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    673
    Reputation
    21
    Thanks
    250
    My Mood
    Cool

    Font with border?

    the title says all anyone know how to draw the font with every single char bordered? it's so sexy :Q_

  2. #2
    pDevice's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    d3d9.h
    Posts
    1,306
    Reputation
    15
    Thanks
    420
    My Mood
    Stressed
    I do not know ...



  3. #3
    f13's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Posts
    6
    Reputation
    13
    Thanks
    15
    My Mood
    Flirty
    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
    Last edited by f13; 04-30-2012 at 01:28 PM.

  4. #4
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    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
    |^^^^^^^^^^\||____
    |The[MPGH]Truck |||'""|""\__,_
    | _____ 4ever __ l||__|__|___|)
    |(@)@)"""""""**|(@)(@)**|(@)


  5. #5
    f13's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Posts
    6
    Reputation
    13
    Thanks
    15
    My Mood
    Flirty
    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.

  6. #6
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    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
    |^^^^^^^^^^\||____
    |The[MPGH]Truck |||'""|""\__,_
    | _____ 4ever __ l||__|__|___|)
    |(@)@)"""""""**|(@)(@)**|(@)


  7. #7
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    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
    Last edited by topblast; 04-30-2012 at 10:58 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  8. #8
    Sixx93's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    673
    Reputation
    21
    Thanks
    250
    My Mood
    Cool
    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

  9. #9
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    DrawText(x - 1, y - 1)
    DrawText(x + 1, y + 1)

    It should work
    /closed
    No I do not make game hacks anymore, please stop asking.

Similar Threads

  1. [Help] Help with font size and text alignment while using an id
    By pwnagebeef in forum Web Languages
    Replies: 2
    Last Post: 12-26-2011, 09:44 AM
  2. Whats up with the forum fonts?
    By Velocity in forum General
    Replies: 24
    Last Post: 09-10-2011, 11:26 AM
  3. [REQ] Purple Tiger Intervention with font - Proxy
    By iMarkYouZ in forum Call of Duty Modern Warfare 2 Texture Requests
    Replies: 0
    Last Post: 06-17-2011, 09:13 AM
  4. Help with font D3DX
    By |Maveric| in forum Combat Arms Coding Help & Discussion
    Replies: 3
    Last Post: 01-03-2011, 07:05 AM
  5. Combined Base v2 [ Supports Sprites and 2 fonts with working hook]
    By whit in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 201
    Last Post: 11-16-2010, 03:53 PM