• 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
Manipulating glyphs in text layout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Manipulating glyphs in text layout


  • Subject: Manipulating glyphs in text layout
  • From: Aleksandr Skobelev <email@hidden>
  • Date: Mon, 05 Jun 2006 20:48:56 +0400

Hello,

I am trying implement a custom hyphenation support in NSTextView. There
are some methods in NSTypesetter and NSAttributedString that can be used
for this purpose (shouldBreakLineByHyphenatingBeforeCharacterAtIndex: and
hyphenCharacterForGlyphAtIndex: for NSTypesetter,
lineBreakByHyphenatingBeforeIndex:withinRange: for NSAttrinbutedString).

But there is a problem. Just inserting a hyphen is not enough sometime,
in some languages it might require to replace/remove/add some characters
around the hyphen.

So, I suppose I could use NSLayoutManager's deleteGlyphsInRange:,
insertGlyph:atGlyphIndex:characterIndex:, etc. But I can not figure out
when is a proper moment for this. Could anybody help me with this,
please?

And it is not clear to me also, if it is possible at all to implement
this basing on the existed hyphenation support in Cocoa's text system? Or
I need to subclass NSATSTypesetter (or even worse NSTypesetter) and
implement layoutParagraphAtPoint: by myself?


Thanks in advance,
Aleksandr

 _______________________________________________
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

  • Prev by Date: Re: providing Apple Help in cocoa app
  • Next by Date: Re: XXFinderView?
  • Previous by thread: Re: nsslider subclass not responding to mouseUp:
  • Next by thread: Modal dialogs and system edit menu items
  • Index(es):
    • Date
    • Thread