One thing you might consider is just using an attributed string:
NSAttributedString* attrString = [[NSAttributedString alloc]
initWithString:@"Text" attributes:@[NSFontAttributeName:[NSFont
fontWithName:@"Times" size:16]]];
[attrString drawAtPoint:somePoint];
Something like that, at least.
>
Another alternative, if you’re going to go high-level, is to use a CATextLayer.
—Graham
> On 16 Sep 2016, at 12:46 AM, Alex Kac wrote:
>
> One thing you might consider is just using an attributed string:
>
> NSAttributedString* attrString = [[NSAttributedString alloc]
I am trying to "resurrect" some old code.
There are several deprecated functions in it.
One of them is CGContextSelectFont() . I looked at the documentation , where it
just says I should use Core Text.
I also googled, but it is not clear to me , how I can replace it.
The snippet of code is
The point is supposed to be use Core Text for text not only the font choice.
CG won't give good layout like Core text.
If you are comfortable with CG programming style then Core Text is pretty easy.
> On 15 Sep 2016, at 15:53, Gabriel Zachmann wrote:
>
> I am trying