• 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: Generating ligature glyphs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generating ligature glyphs


  • Subject: Re: Generating ligature glyphs
  • From: Rolland Bryan <email@hidden>
  • Date: Thu, 27 Oct 2005 10:36:35 +0200
  • Thread-topic: Generating ligature glyphs

Thank you for your response.

I am writing a typesetter.

I use getGlyphsInRange:... to obtain the necessary information to calculate
line breaks etc. So my precise question is, how do I use the font
information to (a) determine which glyph sequence should be replaced with
ligature glyph(s) and (b) to obtain the actual NSGlyph representing the
ligature?

What determines that Œf¹ followed by Œi¹ should be a ligature, and, how does
one get the Œfi¹ ligature glyph to do the replacement?

This would probably also answer the question as to how to get the right
hyphen glyph. I see that NSATSTypesetter uses the undocumented call
hyphenGlyphForLocale: on NSFont.

One of the reasons I need to write my own typesetter (in addition to it
being really interesting) is that I need different behaviour to the way
NSATSTypesetter lays out text on a line interrupted by a shape:
NSATSTypesetter treats the left and right sides as independent lines; I want
a common baseline and height.

Rolland Bryan


On 10/26/05 8:00 PM, "Douglas Davidson" <email@hidden> wrote:

>
> On Oct 26, 2005, at 4:40 AM, Rolland Bryan wrote:
>
>>
>> How does one force NSLayoutManager to generate ligature glyphs?
>>
>
> There are many sorts of ligatures, but for e.g an "fi" ligature, what will
> happen is that during glyph generation, the glyph generator will generate the
> standard "f" and "i" glyphs.  During layout, the typesetter will determine
> from font information that an "fi" ligature is available, and then replace the
> "f" glyph with the "fi" ligature glyph and the "i" glyph with a padding null
> glyph.  Generation of the ligature happens during layout because it depends on
> the "f" and the "i" actually appearing adjacent to each other on the same line
> of text.  The process is controlled to some extent by text attributes; for
> example, NSLigatureAttributeName can be set to 0 to suppress ligatures of this
> sort.  
>
> If you would explain what it is that you are trying to do, and what you are
> seeing, perhaps it would be possible to give more detailed guidance.
>
> 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: Generating ligature glyphs
      • From: Aki Inoue <email@hidden>
References: 
 >Re: Generating ligature glyphs (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Removing objects from the array controller but not from the persistent store (Newbie)
  • Next by Date: CGImageSourceCopyPropertiesAtIndex returns nil?
  • Previous by thread: Re: Generating ligature glyphs
  • Next by thread: Re: Generating ligature glyphs
  • Index(es):
    • Date
    • Thread