Manipulating glyphs in text layout
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