Adding UIFont and finding fontfamily file with EXC_BAD_ACCESS

My problem is that when I add the font described here and when I want to get the font family names with [UIFont familyNames], it will work. I did it the same way as described in the example, but for me it does not work.

This is my stack trace:

0x314b9ebe in CFDictionaryGetValue
0x33d79be4 in copy_localized_value
0x33d79bd4 in CGFontNameTableCopyRootName
0x33d796f2 in CGFontNameTableCreate
0x33d79e86 in CGFontCopyFamilyName
0x3414ca00 in AddFontsFromCGFontAndPath
0x3414cb7e in AddFontsFromURLOrPath
0x3414cc98 in Initialize
0x3414ce0a in GSFontCopyFamilyNames
0x323fce84 in +[UIFont familyNames]
...

I am testing it on iOS 3.2.2, and because I don’t want my iPad to be updated, I can’t say if it works on other versions of iOS

What am I doing wrong?

0
source share
1 answer

Are you sure your font file is valid and working?

+1
source

Source: https://habr.com/ru/post/1756860/


All Articles