Creating stroked text in PHP

Discussion in 'PHP' started by m0nkeymafia, Feb 6, 2008.

  1. #1
    Hi, can anyone offer any advice on how to create stroke on text in PHP?
    I have had a look around google and the docs but cannot find anything obvious.

    Any help would be much appreciated
    Thanks
     
    m0nkeymafia, Feb 6, 2008 IP
  2. CreativeClans

    CreativeClans Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What is stroked text?
     
    CreativeClans, Feb 6, 2008 IP
  3. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #3
    Text with stroke, i.e. imagine you have white text, with a thin [or X pixel] coloured line around it.
     
    m0nkeymafia, Feb 6, 2008 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    Can you post an example?
     
    nico_swd, Feb 6, 2008 IP
  5. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #5
    m0nkeymafia, Feb 6, 2008 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #6
    Hm, perhaps you can write the text to the image twice. Once in black, and another time with a smaller font in white.

    Take a look at the examples of the imagestring() function. This shows you how to write text to an image.
     
    nico_swd, Feb 6, 2008 IP
  7. CreativeClans

    CreativeClans Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry, I misunderstood. If you mean the text in the image, I guess they made that with an image editor.
    I know nothing about image manipulation with PHP, sorry
     
    CreativeClans, Feb 6, 2008 IP
  8. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #8
    ^ Er, you can't change the text on an image with CSS.
     
    nico_swd, Feb 6, 2008 IP
  9. CreativeClans

    CreativeClans Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I know, I misunderstood the question. Already edited my answer ;)
     
    CreativeClans, Feb 6, 2008 IP
  10. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #10
    Yeah I already have text written on my image using ImageString.

    Unfortunately writing it in a bigger font first doesn't work properly, as it becomes disproportionate the further you are away from the align point of the text [i.e. left, center, right].

    That does not photo shop it's images, it is all done via PHP, so I know it is possible.

    Thanks for responses!
     
    m0nkeymafia, Feb 6, 2008 IP