Hi, I am trying to write heaps of text to the screen using a custom font. It all works well but I am having a bit of trouble getting it to work with strings containing a Umlaut. I tried all sorts of encodings with no success. This is what I did... I think it goes wrong when getting the C-Version of a string. the cars-array doesnt contain that character then, hence it wont get added to the glyphs array and finally NOT drawn... :-(
Any suggestions? Thanks Tom
CGGlyph* Glyphs = malloc(sizeof(CGGlyph) * [textToDraw length]);
char* Chars = malloc(sizeof(char) * ([textToDraw length] + 1));
[textToDraw getCString:Chars maxLength: ([textToDraw length] + 1) encoding: NSNEXTSTEPStringEncoding];
for(int CurrentChar = 0; CurrentChar < [textToDraw length]; ++CurrentChar)
{
Glyphs[CurrentChar] = Chars[CurrentChar]- 29;
}
CGContextShowGlyphs(UIGraphicsGetCurrentContext(), Glyphs, [textToDraw length])