On 26 Sep 2012, at 02:08, Aki Inoue a...@apple.com wrote:
2. I thought the core text route would be more efficient. I have cached my
CTLineRefs. Doesn't -drawWithRect:options:attributes: require instantiating
an NSLayoutManager on each call?
We don't instantiate NSLayoutManager on each
1. Why is -drawWithRect:options:attributes: more compatible with
NSLayoutManager?
It's not about either is compatible. When using line fragment origin layout,
we're using typesetter behavior 10.2 compatibility for historical reasons.
NSLayoutManager, by default, uses the latest behavior.
On 23 Sep 2012, at 17:33, Kyle Sluder k...@ksluder.com wrote:
Attributes are specified on a character, rather than glyph, basis. So if
you need to draw your characters with a separate color, you should
probably override
-showCGGlyphs:positions:count:font:matrix:attributes:inContext: to push
On 24 Sep 2012, at 12:49, jonat...@mugginsoft.com wrote:
On 23 Sep 2012, at 17:33, Kyle Sluder k...@ksluder.com wrote:
Attributes are specified on a character, rather than glyph, basis. So if
you need to draw your characters with a separate color, you should
probably override
To be compatible with NSLayoutManager, you should use
-drawWithRect:options:attributes: here instead of using CT.
Your source of trouble is using -drawAtPoint: which uses
NSStringDrawingUsesLineFragmentOrigin option (layout glyphs from the top
instead of the glyph origin).
Aki
On 2012/09/24,
On 24 Sep 2012, at 19:19, Aki Inoue a...@apple.com wrote:
To be compatible with NSLayoutManager, you should use
-drawWithRect:options:attributes: here instead of using CT.
Using -drawWithRect:options:attributes: works.
2 questions:
1. Why is -drawWithRect:options:attributes: more compatible
On 22 Sep 2012, at 01:33, Graham Cox graham@bigpond.com wrote:
You might investigate an alternative (and much easier) solution.
NSLayoutManager adopts the NSGlyphStorage protocol. That protocol declares a
method, -layoutOptions, and one of the flags it can return is
On Sun, Sep 23, 2012, at 01:55 AM, jonat...@mugginsoft.com wrote:
On 22 Sep 2012, at 01:33, Graham Cox graham@bigpond.com wrote:
You might investigate an alternative (and much easier) solution.
NSLayoutManager adopts the NSGlyphStorage protocol. That protocol declares
a
On Sep 21, 2012, at 8:33 PM, Graham Cox graham@bigpond.com wrote:
NSLayoutManager adopts the NSGlyphStorage protocol. That protocol declares a
method, -layoutOptions, and one of the flags it can return is
NSShowInvisibleGlyphs. Simply returning that flag may be all you need to do.
I
The following is used to draw a glyph representing a tab character in an
NSLayoutManager subclass.
When using say the Monaco font everything looks fine.
When switching to Menlo however the glyphs drawn in the method below are
positioned lower on the line than those drawn by the super
On Sep 21, 2012, at 6:54 AM, jonat...@mugginsoft.com
jonat...@mugginsoft.com wrote:
The following is used to draw a glyph representing a tab character in an
NSLayoutManager subclass.
When using say the Monaco font everything looks fine.
When switching to Menlo however the glyphs drawn in
On Fri, Sep 21, 2012, at 03:54 AM, jonat...@mugginsoft.com wrote:
There is obviously something about the layout that I am missing here
which is implemented by the super implementation.
Any pointers would be appreciated.
1. Consider asking your question on the coretext-dev list.
2. Watch the
On 21 Sep 2012, at 17:12, Ross Carter rosscarter...@me.com wrote:
On Sep 21, 2012, at 6:54 AM, jonat...@mugginsoft.com
jonat...@mugginsoft.com wrote:
The following is used to draw a glyph representing a tab character in an
NSLayoutManager subclass.
When using say the Monaco font
On 21/09/2012, at 8:54 PM, jonat...@mugginsoft.com wrote:
The following is used to draw a glyph representing a tab character in an
NSLayoutManager subclass.
You might investigate an alternative (and much easier) solution.
NSLayoutManager adopts the NSGlyphStorage protocol. That protocol
On Fri, Sep 21, 2012, at 05:33 PM, Graham Cox wrote:
Another approach is to override
-showCGGlyphs:positions:count:font:matrix:attributes:inContext: which is
the primitive drawing method. All of the positioning and context
flippedness has been handled by this point, so you can usually just go
15 matches
Mail list logo