I have a unit test to check if a font from a file is registered. When the CGFontCreateWithDataProvider is called, the check freezes (I added a breakpoint and when I go through the breakpoint it’s not connected and check that the logic does not continue). Any advice? When I run the application, this method works fine.
Thank,
CFErrorRef fonterror;
NSURL * fonturl = [NSURL fileURLWithPath:finalFolder];
CGDataProviderRef fontDataProvider = CGDataProviderCreateWithURL((__bridge CFURLRef)fonturl);
CGFontRef newFont = CGFontCreateWithDataProvider(fontDataProvider);
if (newFont) {
if (CTFontManagerRegisterGraphicsFont(newFont, &fonterror)) {
CGFontRelease(newFont);
...
} else ...
} else ...
source
share