FBA The Creator

The True Multiplatform PC / PocketPC Opensource Development Tool - Read Only Mode - Kept only for historical purposes - Thank you all ;)
It is currently Thu Jun 04, 2026 3:48 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Jun 24, 2008 3:02 pm 
Offline
Tutorials Contributor
Tutorials Contributor
User avatar

Joined: Tue Jun 17, 2008 3:39 am
Posts: 59
Location: Midwest, US
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.


Top
   
PostPosted: Tue Jun 24, 2008 6:40 pm 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
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 7616 times ]
File comment: Test font used
numbers.png
numbers.png [ 645 Bytes | Viewed 7616 times ]
Top
   
PostPosted: Tue Jun 24, 2008 6:57 pm 
Offline
Tutorials Contributor
Tutorials Contributor
User avatar

Joined: Tue Jun 17, 2008 3:39 am
Posts: 59
Location: Midwest, US
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited