Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
By including ```rive/text/font_hb.hpp``` in iOS you'll get access to ```HBFont::FromSystem``` along with the ```HBFont::Decode``` (which we've been using so far to generate Font objects to put into the fallback list). You can get a UIFont with [this API](https://developer.apple.com/documentation/uikit/uifont/1619027-systemfontofsize?language=objc). You should be able to cast that to a CTFontRef: ``` CTFontRef ctFont = (__bridge CTFontRef)uiFont; auto fallbackFont = HBFont::FromSystem((void*)ctFont); ``` You can then use that in a fallback font procedure (like the example from the editor below) to load on demand/cache/provide from a list etc: https://github.com/rive-app/rive/blob/b5b930f88f18280afa44683c5756066abaa9b1dc/packages/rive_common/macos/rive_text/rive_text.cpp#L153-L175 Diffs= da1bb7745 Make an HBFont from a CTFontRef. (#7661)
- Loading branch information