On 27.03.2008, at 09:32, Gerriet M. Denkmann wrote:
float widthOfTab = [usedFont advancementForGlyph:(NSGlyph)' '].width * 4;
I'm pretty new to the text engine myself, but I don't think an NSGlyph can be generated by typecasting a char. Since Monaco or Courier are monospaced, it just so happens that you get the same width as the space would be. But the glyph with number 0x20 is probably a completely different width than the glyph corresponding to a space in other languages.
Have you tried asking the glyph storage (I think that's a category that the layout manager adheres to, or maybe it was the text storage) for the correct glyph for the character ' ' ?
Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]