[MonoDevelop] UTF-16 support?

Steve Lessard s_lessard at yahoo.com
Thu Mar 29 01:17:54 UTC 2012



What if you first converted your rendered text to a graphic via the ImageMagik libraries for iOS?

http://www.imagemagick.org/script/binary-releases.php#iOS

 



________________________________
 From: Michael Hutchinson <m.j.hutchinson at gmail.com>
To: Megan Clodfelter <megan.clodfelter at gmail.com> 
Cc: monodevelop-list at lists.ximian.com; "MonoTouch at lists.ximian.com" <monotouch at lists.ximian.com> 
Sent: Wednesday, March 28, 2012 1:12 PM
Subject: Re: [MonoDevelop] UTF-16 support?
 
On 26 March 2012 19:21, Megan Clodfelter <megan.clodfelter at gmail.com> wrote:
> Michael -
>
> Many thanks for your reply, unfortunately, I am still having issues.   I
> changed the font display for the entire project to a UTF-16 font
> (AppleGothic) and my characters appeared just fine.
>
> So far so good.  Now, the next step was to display my characters on the
> iPad.  I verified that AppleGothic is a standard iPad font.  My objective is
> to overlay my UTF-16 characters onto an image.  I create the UIGraphics
> context, perform a "SelectFont" using "AppleGothic", a point size and with
> CGTextEncoding set to "FontSpecific"  I see nothing.   Obviously, my
> characters exist in that font, as I can now see them in the code window.
>  When I change the encoding to the incorrect "MacRoman", I see little boxes
> where my characters should be.
>
> What do I need to do to ensure that UTF-16 characters are displayed as part
> of a UIGraphics object?

I'm not familair with MonoTouch Text rendering, but I found some
StackOverflow posts that seem to indicate that CGContext has no
support for anything other than ASCII/MacRoman text, and that you
should use CoreText or UIView.DrawString:

http://stackoverflow.com/questions/7190005/iphone-using-cgcontextshowtextatpoint-to-draw-special-characters
http://stackoverflow.com/questions/1564577/converting-a-nsstring-to-a-cstring-for-use-with-cgcontextshowtextatpoint
http://stackoverflow.com/questions/7672453/custom-font-does-not-render-correctly-when-using-showtext
http://stackoverflow.com/questions/275437/unicode-character-not-showing

I've cc'd the message to the MonoTouch list, maybe someone there can
help with this.

-- 
Michael Hutchinson
http://mjhutchinson.com
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20120328/a3386e77/attachment.html>


More information about the Monodevelop-list mailing list