Hi Andreas,
Could you add the ability to access special characters (for the fonts that support them) such as "smart quotes", em dashes, en dashes, ellipsis, etc.?
Thanks.
Special Characters (Fonts)
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Special Characters (Fonts)
You should be able to access these characters by using #ENCODING_UTF8 and passing a string in UTF-8 format to TextOut() or similar functions.
Re: Special Characters (Fonts)
Sounds good!
Can you give me an example of what a string in UTF-8 format looks like?
Can you give me an example of what a string in UTF-8 format looks like?
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Special Characters (Fonts)
All ASCII characters are identical in UTF-8 so you only need to create special codes for non ASCII characters. You can look up these codes using Google or use a text editor of your choice and save the text in UTF-8 and then look at the text file using a hex editor. The copyright sign for example has UTF-8 code $c2a9 (= 2 bytes). To use this inside Hollywood, just do the following:
Here are some more UTF 8 codes:
http://www.utf8-zeichentabelle.de/
Code: Select all
SetFont(#SANS, 16)
TextOut(#CENTER, #CENTER, Chr($c2) .. Chr($a9) .. " Airsoft Softwair", {Encoding = #ENCODING_UTF8})
http://www.utf8-zeichentabelle.de/
Re: Special Characters (Fonts)
Thanks, that works well!
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Special Characters (Fonts)
is not possible to add the euro character using any method? i try different ways with no luck
Re: Special Characters (Fonts)
Try this:
Code: Select all
SetFont(#SANS, 64)
SetFontStyle(#ANTIALIAS)
TextOut(#CENTER, #CENTER, Chr($e2)..Chr($82)..Chr($ac), {Encoding=#ENCODING_UTF8})
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Special Characters (Fonts)
work fine, thank you