FBA The Creator
http://www.fbacreator.com/fbaforum/

Quotation Marks in GFX Font
http://www.fbacreator.com/fbaforum/viewtopic.php?f=5&t=59
Page 1 of 1

Author:  phrebh [ Tue Jun 24, 2008 3:02 pm ]
Post subject:  Quotation Marks in GFX Font

Is there a way to include both single quotes (') and double quotes (") in a gfx font? I haven't played around too much with it, but I couldn't get the double quotes in, even when trying to escape it.

If I can't come up with anything, I plan on using two single quotes for the double quotes as a workaround.

Author:  evilmaio [ Tue Jun 24, 2008 6:40 pm ]
Post subject:  Re: Quotation Marks in GFX Font

Mmmmh...it should work simply escaping chars that could break the strings.
This works for me:

Code:
pic = loadimage("numbers.png")
font = loadgfxfont(pic, "0123456789.-|\"'", 3)

function onmainloop()
        drawgfxtext(font,50,50,"\"'",255,255,255)
end


Attachments:
File comment: Running program
result.png
result.png [ 2.38 KiB | Viewed 7618 times ]
File comment: Test font used
numbers.png
numbers.png [ 645 Bytes | Viewed 7618 times ]

Author:  phrebh [ Tue Jun 24, 2008 6:57 pm ]
Post subject:  Re: Quotation Marks in GFX Font

Great, thanks!

I think I was hesitant to try it because the IDE doesn't show the escaped character as being escaped. In other words, the highlighting for the string stops at the second quote even though it is escaped.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/