Re: text orientation/positioning with layout manager

2011-02-01 Thread David F.
On Feb 1, 2011, at 1:38 PM, Aki Inoue wrote: > What the Text System does is to apply an inverted text matrix to compensate > the flipped CTM automatically (inside -[NSFont setInContext:]) so that the > text is rendered correctly regardless of the rendering context flippedness. Aki, is it reall

Re: text orientation/positioning with layout manager

2011-01-31 Thread David F.
Douglas -- Something somewhere must be trying to compensate for the unflipped context, because the text isn't drawn upside-down. Yes, the positioning is calculated with the assumption that the context is flipped, and effects like strikethrough and underline are drawn with the assumption that th

Re: Red spelling underline draws incorrectly in layer-backed views

2010-11-08 Thread David F.
Kyle -- This probably won't help much. But if the root problem was an unflipped context, then I would expect strikethrough and underline to be off as well. I downloaded your test project and added underline and strikethrough to your text and they looked fine. David On Nov 8, 2010, at 5:05 PM

Re: Relation of UIView layer to drawRect:

2010-08-25 Thread David F.
rendered on top of > whatever you draw in drawRect: > > Luke > > Sent from my iPhone. > > On Aug 24, 2010, at 8:47 PM, David F. wrote: > >> What is the relationship of a UIView's layer (and its sublayers) to what >> happens when that UIView's dra

Relation of UIView layer to drawRect:

2010-08-24 Thread David F.
What is the relationship of a UIView's layer (and its sublayers) to what happens when that UIView's drawRect: is called? I would expect the code below to draw a diagonal line across (i.e. on top of) the image, but it looks like the line is drawn behind the image. In other words, all I see is t

Re: advancementForGlyph problem

2010-05-02 Thread David F.
On Apr 30, 2010, at 10:37 AM, Dale Miller wrote: > For character measurements, if you are using the Cocoa text system, use the > font returned by the NSLayoutManager method "subtituteFontForFont:" in order > to get the screen font used by Cocoa text. However, experimentally, I found > that for

Re: advancementForGlyph problem

2010-05-02 Thread David F.
On Apr 30, 2010, at 7:20 AM, Graham Cox wrote: > > On 30/04/2010, at 9:08 PM, steven Hooley wrote: > >>> From your later response it seems like your question is really >> regarding drawing strikethroughs and underlines. If so, the strike >> through and underline are not part of the glyph or fon

Re: advancementForGlyph problem

2010-05-02 Thread David F.
On Apr 30, 2010, at 5:08 AM, steven Hooley wrote: >> The information I am getting back from advancementForGlyph doesn't >> seem to be correct. Here are the glyph bounds and advancement for >> the capital letter 'A' in Georgia 36pt: >> >> == A == >> bounds x: -0.720703 >> bounds y: 0.00 >> b

Re: advancementForGlyph problem

2010-04-29 Thread David F.
ph is actually > to start from *slightly* in the previous character's area? > > Total guess, feel free to ignore etc etc ;) > > Chris Backas > > > On Apr 28, 2010, at 2:49 PM, David F. wrote: > >> The information I am getting back from advancementForGly

Re: advancementForGlyph problem

2010-04-28 Thread David F.
On Apr 28, 2010, at 7:33 PM, Graham Cox wrote: > > On 29/04/2010, at 4:49 AM, David F. wrote: > >> Any ideas on what I am doing/understanding wrong? > > I think that when glyphs are rendered on screen they are tweaked so as to > take advantage of sub-pixel renderi

advancementForGlyph problem

2010-04-28 Thread David F.
The information I am getting back from advancementForGlyph doesn't seem to be correct. Here are the glyph bounds and advancement for the capital letter 'A' in Georgia 36pt: == A == bounds x: -0.720703 bounds y: 0.00 bounds w: 25.699219 bounds h: 25.294922 advance w: 24.152344 advance h:

ABAddressBookRef question

2010-04-25 Thread David F.
[NSNumber numberWithInt: kABPersonAddressProperty]]; personView.allowsEditing = TRUE; [self.navigationController pushViewController: personView animated: TRUE]; CFRelease(addressBook); [personView release]; Thanks, David F. ___