• 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: How to get NSGlyph from unichar?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get NSGlyph from unichar?


  • Subject: Re: How to get NSGlyph from unichar?
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 14 Feb 2005 12:10:26 -0800

On 2005-02-14 01:43:49 -0800 Magnus Strand <email@hidden> wrote:

||But I don't know how to make a NSGlyph from a unichar, except when it is a-z when
you can use the character directly as name for glyphWithName method?

There is no simple to-one mapping from characters to glyphs. The glyph used depends on the font and potentially also on the context of the character within the text. One character may map to multiple glyphs, or multiple characters may map to a single glyph. In the Cocoa text system, the mapping is managed by NSLayoutManager, which calls upon NSGlyphGenerator to perform a first-pass mapping, which may subsequently be modified during layout by NSTypesetter. You can use NSGlyphGenerator directly, but it may be more convenient to use an NSLayoutManager to manage the process.


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to get NSGlyph from unichar?
      • From: Magnus Strand <email@hidden>
References: 
 >How to get NSGlyph from unichar? (From: Magnus Strand <email@hidden>)

  • Prev by Date: RE: Vertically centering the disclosure triangle in and outline view subclass cell
  • Next by Date: Re: adding contextual menu items to an NSTextView subclass menu
  • Previous by thread: How to get NSGlyph from unichar?
  • Next by thread: Re: How to get NSGlyph from unichar?
  • Index(es):
    • Date
    • Thread