Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Chirone

macrumors 6502
Original poster
Mar 2, 2009
279
0
NZ
Hi all,

I was wondering if anyone knows to how to make individual letters inside a string different scales to the rest of a letter in the quartz2d framework

so if i draw the word "hello" i can make the 'h' scaled up from the substring 'ello'
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
You would have to draw each character separately. Easiest way to scale it nicely is with NSAffineTransform/CGAffineTransform.
 

autorelease

macrumors regular
Oct 13, 2008
144
0
Achewood, CA
An NSAttributedString and the drawAtPoint: method might do what you want if you make the font size of the "h" larger than the font size of the "ello."
 

Chirone

macrumors 6502
Original poster
Mar 2, 2009
279
0
NZ
kainjow: i thought as much
the only problem i thought of doing it that way has been solved too...

autorelease: i saw the options of doing it in attributed strings, but i don't think you can use attributed strings inside the quartz's draw text method

thanks for your replies!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.