On Sun, Dec 23, 2012, at 09:32 PM, Graham Cox wrote:
> I need to use Quartz to draw a single character - a check mark - in a
> graphics context. I don't need anything elaborate, no typesetting etc, I
> just want to draw a single checkmark.

By far the simplest approach here is going to be to make an image that
contains a checkmark. Developers are discouraged from using low-level
text attributes because it completely ignores all the important
high-level stuff that goes in to making text look good. You're not
really drawing text here.

> However, Quartz seemingly makes the trivial very difficult. Why for
> example, does this code not work? Specifically, it returns 0 from
> CGFontGetGlyphWithGlyphName meaning that the glyph name is unknown.

CGFontGetGlyphWithGlyphName (and all of CGFont) deals in TrueType/AAT
concepts, NOT Unicode concepts. Unicode does not even name glyphs; it
names codepoints. The glyph names you provide to this function are the
kind that would be found in the font's `post` table, not Unicode
codepoint names.

--Kyle Sluder
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to