Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kThemeCurrentContextFont?




On Nov 15, 2004, at 12:59 AM, Bryan Pietrzak wrote:

I think we need a new kThemeCurrentContextFont ThemeFontID.

I have a simple problem (riiight ;) I want to draw "large" text as part of my custom hiview. In this case, "large" is generally about 33% larger than the font used in the menu bar. Specifically, it's 24 pt Verdana. The text will be in CFStrings and I don't know (or care) what the encoding is.

So... how can I do this without relying on the QD port? Sure, I can set the font and size in the port and use kThemeCurrentPortFont along with HIThemeDrawTextBox, but I'm trying to move away from port usage where possible (and practical).

I don't want to drop to the CG level and use CGContextShowText as it's not CFString savvy (and therefore I assume not unicode savvy). I certainly don't want to use CGContextShowGlyphs and deal with getting the glyphs myself.

I guess I wonder if I could do this (at some point, I can put in a radar if needed)

   CGContextSetFontSize(ctx, 24.0);
   CGContextSetFont(ctx, someFontRef);

And then call HIThemeDrawTextBox using "kThemeCurrentContextFont"

Seems like a logical progression and would give me the flexibility I need without getting down and dirty with CG and glyphs.

Well, the other option, of course, is to avoid HIThemeDrawTextBox and just use ATSUI directly.


Scott

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >kThemeCurrentContextFont? (From: Bryan Pietrzak <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.