• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Low-level text, why so hard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Low-level text, why so hard?


  • Subject: Re: Low-level text, why so hard?
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 23 Dec 2012 23:25:44 -0800

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Low-level text, why so hard?
      • From: Jeff Schriebman <email@hidden>
References: 
 >Low-level text, why so hard? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Window resizing autolayout?
  • Next by Date: Re: Window resizing autolayout?
  • Previous by thread: Re: Low-level text, why so hard?
  • Next by thread: Re: Low-level text, why so hard?
  • Index(es):
    • Date
    • Thread