Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: CGContextMeasurePlainText (in Python interface)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGContextMeasurePlainText (in Python interface)




On Dec 8, 2004, at 1:46 PM, Joseph Maurer wrote:

On Dec 8, 2004, at 11:33 AM, R. Scott Thompson wrote:

The Python interface has a routine called CGContextMeasurePlainText. This routine appears to be stand-alone (by that I mean it's not a member of the CGContext class). The routine takes a fontSize, but what is not clear to me is how does it decide what font it should measure with?

The other two variations on this routine, for handling RTF and HTML might have a font designation embedded within them, what font does CGContextMeasurePlainText uses?



It uses [NSFont userFontOfSize:fontSize], which sets the "Aqua Application font".

Is there no way, then, to measure a string as it would be rendered if you used the current font that is "selected" inside a context?


Scott

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >CGContextMeasurePlainText (in Python interface) (From: "R. Scott Thompson" <email@hidden>)
 >Re: CGContextMeasurePlainText (in Python interface) (From: Joseph Maurer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.