Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
It appears that the internal mapping "algorithm" has a bug in it, even for non-Latin characters. For instance, if you use ShowTextAtPoint (Helvetica or Arial) using GetTextEncoding.FontSpecific for the string
Indeed, for characters with int values < 128, everything is shifted by 29. However, if the string consists of lower case letters
So, it suggests that the code does have access to the Latin-1 glyphs, but something is not being mapped right (or I am simply doing something stupid!) because it looks like the int values are shift by 128, 55, and 120 respectively.
BTW: Although I am fairly good at things on the C# side of the world, I am quite new to MT, iOS, etc. So there is a distinct possibility that I don't "get it"! In which case, it would help a great deal if someone could tell me how I could output a string like Ångström on a CGBitmapContext using Arial.
That's a CoreGraphics issue/feature but you can use UIKit to display UFT8 text.
For others who stumble onto this "bug", here's the code that finally made it work for me (because I was getting "flipped" text using Sebatien's link).
//--- select the color you want, e.g., red
//--- "flip" coordinate space
//--- for "Arial Bold" you need to use "Arial-BoldMT"
var font = UIFont.FromName ("Arial-BoldMT", fFontHt);
using (var nsStr = new NSString ("Ångström"))
nsStr.DrawString (new PointF (X, Y), font);
public void MoveOriginToTopLeftGrowingRightAndDown()
//--- flip and move the coordinate space to have the origin
// at the top-left corner (as in Windows Graphics)
CGAffineTransform at = CGAffineTransform.MakeIdentity();