Ensure that the text matrix is sane (its separate from the current ctm and not stored with the graphics state). > On Oct 14, 2015, at 1:36 PM, Raglan T. Tiger <r...@crusaderrabbit.net> wrote: > > >> On Oct 13, 2015, at 4:42 PM, Wim Lewis <w...@omnigroup.com> wrote: >> >> >> On Oct 13, 2015, at 3:02 PM, Raglan T. Tiger <r...@crusaderrabbit.net> wrote: >>> CGContextShowTextAtPoint (ctx, pt.x,pt.y,(const char*)txt, len ); >>> >>> This has printed my text UNTIL 10.11. >>> >>> I see that CGContextShowTextAtPoint is deprecated in 10.9 ... is it gone in >>> 10.11? >> >> As Quincey Morris says, Core Text > > I have text printing in the correct orientation now using > > CFAttributedStringRef attrString = > CFAttributedStringCreate(kCFAllocatorDefault, cfstr, attributes); > > CTLineRef line = CTLineCreateWithAttributedString(attrString); > > // Set text position and draw the line into the graphics context > CGContextSetTextPosition(ctx, pt.x, pt.y); > CTLineDraw(line, ctx); > > Now, I cannot increase the font size. I set up attributes as: > > CFStringRef keys[] = { kCTFontAttributeName }; > CFTypeRef values[] = { [ NSFont systemFontOfSize:48 ] }; > > CFDictionaryRef attributes = > CFDictionaryCreate(kCFAllocatorDefault, (const void**)&keys, > (const void**)&values, sizeof(keys) / > sizeof(keys[0]), > &kCFTypeDictionaryKeyCallBacks, > &kCFTypeDictionaryValueCallBacks); > > > and see my attributed string as: > > 667 x, 2.3 y{ > NSFont = "\".HelveticaNeueDeskInterface-Regular 48.00 pt. P [] > (0x1128ca30) fobj=0x11d04390, spc=12.93\""; > } > > but the result is like 8 pt not 48. > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com > > This email sent to david.dun...@apple.com
-- David Duncan _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com