Click here to Skip to main content
11,576,060 members (57,794 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# XNA4.0
I want to draw special characters like: "π,Ω,θ,ξ" in XNA by using method
spriteBatch.DrawString() but unsuccessful. Problem in file SpriteFont? Have any solution for it?
Posted 5-Nov-12 14:28pm
Sergey Alexandrovich Kryukov at 5-Nov-12 21:51pm
Who "invented" this question about special characters?! These characters are not special at all. Just Greek. There is no such thing as "special character". Well, your font should support sufficient Unicode repertoire.
haitrieu749 at 5-Nov-12 22:07pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question and read on Unicode just a bit, to have an idea. You don't need any special to do to support it. Nearly all modern systems support Unicode by default, and of course, such a popular "Unicode range" as Greek is included, also by default. Some weird fonts which do not support Unicode are gradually phased out...[^],[^],[^],[^];[^],[^].

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I've solved this myself! In my class spritefont. I've been edit it flowing:
        <start>& #32;</start>
        <end>& #126;</end>
        <start>& #913;</start>
        <end>& #969;</end>
& #913 -> & # 969 are Greek charaters like "π,Ω,θ,ξ". It begin "A" and the end "ω"
haitrieu749 at 8-Nov-12 13:32pm
Note: & # 913 and & # 969 write consecutive.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 305
1 F-ES Sitecore 145
2 OriginalGriff 125
3 Abhinav S 98
4 Dave Kreskowiak 80
0 OriginalGriff 705
1 Sergey Alexandrovich Kryukov 600
2 Abhinav S 438
3 F-ES Sitecore 410
4 Suvendu Shekhar Giri 365

Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100