I need to draw an outline of an Emoji glyph bounding box that is drawn in CGContext (macOS 14.4.1). I use NSLayoutManager - (void)drawGlyphsForGlyphRange:(NSRange)glyphsToShow atPoint:(NSPoint)origin; and I can get an emoji glyph bounding box using CoreText CGRect CTFontGetBoundingRectsForGlyphs(CTFontRef font, CTFontOrientation orientation, const CGGlyph *glyphs, CGRect *boundingRects, CFIndex count);. The bounding box is correct until the CGContext to which I draw the string with Emoji is not scaled or rotated. In such a case, an Emoji drawn in context is "sometimes" scaled, so its bounding box is not equal to the bounding box obtained from CoreText. Unfortunately, I can't figure out what the dependencies between glyph size, CGContext rotation, and scale are. I couldn't find any linearity between these variables. For example, an Emoji is drawn correctly at scale 6, rotation 0, when CGContext is rotated by 1 degree, Emoji is downsized by 1 pixel, then back in nominal size when rotation is between 2 and 4 degrees, then downsized for 5 degrees, nominal at 6, etc.
Has anyone solved this?
Post
Replies
Boosts
Views
Activity
Background URLSession adopters are required to have the com.apple.application-identifier entitlement
Hi, I am unable to silence this warning: Background URLSession adopters are required to have the com.apple.application-identifier entitlement.
I am not using any entitlements. This warning appeared when I switched to Xcode15 and Sonoma. I followed the steps mentioned in this link: https://developer.apple.com/library/archive/qa/qa1710/_index.html, but it did not help. The BundleID is correct (I haven't changed it in a couple of years).
Do you have any idea what the issue could be? Thank you.