• 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
Practicing What One Preaches (was Panther is flipping my text)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Practicing What One Preaches (was Panther is flipping my text)


  • Subject: Practicing What One Preaches (was Panther is flipping my text)
  • From: Robert Clair <email@hidden>
  • Date: Mon, 14 Jun 2004 18:04:32 -0400

In the end what I did was to lockFocus on my (unflipped) custom view instead
of the NSTextView when using appendBezierPathWithGlyphs:count:inFont:
and adjust my transformations. This now works the same on Panther and Jaguar.
The fact that the advance bug was fixed is neither here nor there for me - my code works
one glyph at a time and I did the advance by hand.

But I have to tweak Apple a bit here. What happened to the (widely lip-serviced)
concept of "Interface as Contract" ??? That appendBezierPathWithGlyphs:count:inFont:
returned a path where the top of the glyph had a smaller y value than the bottom of the
glyph when called with a lockFocus on a flipped view may not have someone's idea of
a correct design choice is one thing, but it is hardly unreasonable and you would have
a hard time convincing a reasonable person that it is an actual bug. Changing it broke
(at least one) working application. (Seriously, this isn't a trivial point - I had better things
to do with this afternoon.) If the idea of "interface as contract" had been followed
rather than just preached to the masses, this would have been handled by keeping the
old function and adding newImprovedAppendBezierPathWithGlyphs:count:inFont: or
some such.

If someone is looking for something to fix, how about the docs ? Much of the documentation
for the font system is incomplete, inscrutable or just plain wrong. ( changeFont is still listed as a
delegate method of NSFontManager and at least for beginner's sakes it would be
nice if the page for appendBezierPathWithGlyphs:count:inFont: noted that you have to lockFocus
on some view or another for it to work).


...cheers


Bob Clair
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Panther is flipping my text (From: Robert Clair <email@hidden>)
 >Re: Panther is flipping my text (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Make an Application active?
  • Next by Date: Re: Make an Application active?
  • Previous by thread: Re: Panther is flipping my text
  • Next by thread: Protocol and other UML patterns
  • Index(es):
    • Date
    • Thread