> On Oct 13, 2015, at 4:56 PM, Graham Cox wrote:
>
> Converting this to use string drawing is easy enough:
>
> NSDictionary* attributes = @{NSFontAttributedName:sysFont};
> NSString* myText = [NSString stringWithUTF8String:txt]; //
> check encoding if
> On Oct 14, 2015, at 8:54 AM, Raglan T. Tiger wrote:
>
> I did all the above ... now my text prints upside down andI cannot get it to
> size up regardless of the font size.
The view is probably using flipped coordinates. Look up flipped coordinates in
the Cocoa view
t; in the Cocoa view documentation to understand what they are and how to work
>> around the problem.
>>
>> As for the size, have you set the size of the NSFont in ‘sysFont’?
>>
>
> I am using -graphicsContextWithBitmapImageRep and then adding text
> annotations.
>>
>>
>> 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 CGCon
> 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
-rags
> On Oct 14, 2015, at 2:37 PM, David Duncan wrote:
>
> Ensure that the text matrix is sane
I have been doing this:
CGAffineTransform t = CGAffineTransformMakeScale (1.0, -1.0);
CGContextSetTextMatrix (ctx, t);
changing the
for the size, have you set the size of the NSFont in ‘sysFont’?
>
I am using -graphicsContextWithBitmapImageRep and then adding text annotations.
The reason for using CGContextShowTextAtPoint in the first place was to solve
this problem when drawing NSStrings.
I guess the real question is "H
);
CGContextSetTextDrawingMode(ctx, kCGTextFill);
Then:
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?
-rags
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
ont(ctx, [sysFontName
> cStringUsingEncoding:NSASCIIStringEncoding], 90, kCGEncodingMacRoman);
> CGContextSetTextDrawingMode(ctx, kCGTextFill);
> CGContextShowTextAtPoint (ctx, pt.x,pt.y,(const char*)txt, len );
Converting this to use string drawing is easy enough:
NSDictionary* attributes = @{NSFontAtt
On Oct 13, 2015, at 15:02 , Raglan T. Tiger <r...@crusaderrabbit.net> wrote:
>
> I see that CGContextShowTextAtPoint is deprecated in 10.9 ... is it gone in
> 10.11?
Apparently. There’s this:
https://developer.apple.com/library/prerelease/mac/documentation/GraphicsIma
(@This is
an up arrow character \u2B06);
I have not found a way to use CGContextShowTextAtPoint to easily display such
a character and the examples I have found using CGContextShowGlyphsAtPoint()
seem to require me to use a font containing the upwards arrow glyph. Is there
a generic all inclusive
CGContextShowTextAtPoint to easily display such a
character and the examples I have found using CGContextShowGlyphsAtPoint() seem
to require me to use a font containing the upwards arrow glyph. Is there a
generic all inclusive unicode font? What is the right approach to this issue?
Suggestions are appreciated
On Mar 30, 2012, at 9:18 AM, Jeff Schriebman wrote:
I have not found a way to use CGContextShowTextAtPoint to easily display such
a character and the examples I have found using CGContextShowGlyphsAtPoint()
seem to require me to use a font containing the upwards arrow glyph.
I'm
character \u2B06);
I have not found a way to use CGContextShowTextAtPoint to easily display such
a character and the examples I have found using CGContextShowGlyphsAtPoint()
seem to require me to use a font containing the upwards arrow glyph. Is there
a generic all inclusive unicode font? What
On Mar 30, 2012, at 9:31 AM, Jens Alfke wrote:
On Mar 30, 2012, at 9:18 AM, Jeff Schriebman wrote:
I have not found a way to use CGContextShowTextAtPoint to easily display
such a character and the examples I have found using
CGContextShowGlyphsAtPoint() seem to require me to use a font
This is what I have figured out so far:
According to the Quartz 2D programming guide Quartz 2D provides a limited,
low-level interface for drawing text encoded in the MacRoman text encoding and
for drawing glyphs which probably explains my problem with using
CGContextShowTextAtPoint().
I
On Mar 30, 2012, at 11:45 AM, Jeff Schriebman wrote:
I'm not sure how to use the string drawing APIs to directly put a unicode
UTF8 character onto a specific X,Y location given a CGContextRef.
Both AppKit and UIKit have methods for making a CGContextRef current. Lookup
the NSGraphicsContext
Thanks David.
My CGContextRef is the current context. I'm just unfamiliar with how to draw a
unicode character into it when I don't know the font containing a specific
unicode glyph.
I'm doing this for OS X 10.7 which is all I need to support.
Thanks.
On Mar 30, 2012, at 11:56 AM, David
On Mar 30, 2012, at 12:19 PM, Jeff Schriebman wrote:
Thanks David.
My CGContextRef is the current context. I'm just unfamiliar with how to draw
a unicode character into it when I don't know the font containing a specific
unicode glyph.
I'm doing this for OS X 10.7 which is all I need to
Still having problems.
I've unsuccessfully tried drawAtPoint:withAttributes: but I'm not sure what the
best way to accomplish what I need to do. I'm not too familiar with the
NSString methods so any advice is appreciated.
On Mar 30, 2012, at 12:47 PM, David Duncan wrote:
On Mar 30, 2012, at
On Mar 30, 2012, at 1:21 PM, Jeff Schriebman wrote:
Still having problems.
I've unsuccessfully tried drawAtPoint:withAttributes: but I'm not sure what
the best way to accomplish what I need to do. I'm not too familiar with the
NSString methods so any advice is appreciated.
What aspects of
The following code fragment properly displays an up arrow on my view.
Thanks for everyone's patience and help.
NSDictionary* fontAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
[NSColor redColor], NSForegroundColorAttributeName,
[NSFont
On Mar 30, 2012, at 1:21 PM, Jeff Schriebman wrote:
I've unsuccessfully tried drawAtPoint:withAttributes: but I'm not sure what
the best way to accomplish what I need to do. I'm not too familiar with the
NSString methods so any advice is appreciated.
What was unsuccessful?
Did you try it
did i miss something, I thought is - (void)drawAtPoint:(NSPoint)point not
NSAttributedString not NSString.
Cheers
kevin
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
The final code ended up looking like this
NSDictionary* fontAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
[NSColor redColor], NSForegroundColorAttributeName,
[NSFont systemFontOfSize:12], NSFontAttributeName,
nil];
, 0.0, 1.0, 1.0 );
CGContextSetShadowWithColor( ctxt, CGSizeMake(0,0), 10, blue );
CGContextShowTextAtPoint( ctxt, theLayer.bounds.origin.x + 7.0,
theLayer.bounds.origin.y + 7.0, str, strlen(str) );
CFRelease( blue );
}
}
I have checked that 'str' does actually hold
On 09/08/2011, at 10:43 PM, Gabriel Zachmann wrote:
I have checked that 'str' does actually hold a valid string at the user's
instance. (I logged it and had him send me the log file.)
I have also tried different font sizes.
I have also googled around.
All to no avail.
Does anybody
On 09/08/2011, at 10:43 PM, Gabriel Zachmann wrote:
I have checked that 'str' does actually hold a valid string at the user's
instance. (I logged it and had him send me the log file.)
CGContextSelectFont( ctxt, AndaleMono, 14, kCGEncodingMacRoman ); //
Andale Mono doesn't work
Thanks a lot for your response ...
I've found the Core Graphics text handling methods to be gnarly and awkward
the few times I've attempted to use them, and always ended up going some
other route to render text.
Could you please point me to a few of them?
In your case, the choice seems
On 10/08/2011, at 12:48 AM, Gabriel Zachmann wrote:
Could you please point me to a few of them?
NSString, NSAttributedString, Core Text
Can CATextLayer render text with a shadow?
Like this:
CGContextSetShadowWithColor( ctxt, CGSizeMake(0,0), 10, blue );
I really need the shadow to be
On Aug 9, 2011, at 9:48 AM, Gabriel Zachmann wrote:
Thanks a lot for your response ...
I've found the Core Graphics text handling methods to be gnarly and awkward
the few times I've attempted to use them, and always ended up going some
other route to render text.
Could you please
CGContextSelectFont( ctxt, AndaleMono, 14, kCGEncodingMacRoman );
// Andale Mono doesn't work either
Perhaps he doesn't have Andale Mono on his machine? I'm not sure what CG
does with text if the font isn't there, does it fall back to something else
or just silently fail?
I think
On 10/08/2011, at 2:06 AM, Gabriel Zachmann wrote:
Just checked the doc of CATextLayer but couldn't find a hint on how it helps
me determine whether or not a font is installed ... can you tell me?
I doesn't. But it falls back gracefully, AFAIK.
If you need a specific non-standard font, you
34 matches
Mail list logo