Closed kaiwk closed 3 years ago
Looks like we should use CTFontManagerCreateFontDescriptorFromData
in loaders::core_text::Font::from_bytes
from this post.
Also, you should consider using CTFontManagerCreateFontDescriptorFromData() or CTFontManagerCreateFontDescriptorsFromURL() and then CTFontCreateWithFontDescriptor(), avoiding CGFont entirely.
The code below keeps increasing memory usage on Mac