revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.06k stars 196 forks source link

refactor(font): deprecate reason-font-manager in favor of Skia #937

Closed zbaylin closed 4 years ago

zbaylin commented 4 years ago

This PR moves to a purely Skia-based font-discovery and management API.

This fixes #894 and will help when we add font-fallback. @EduardoRFS also noted on Discord that it will help on mobile platforms that dont have OS-based font discovery primitives baked in.

zbaylin commented 4 years ago

Looks like we don't get any performance loss with this PR, which is always good :)

This PR:

+----------------------------------------------------------------+-------------+---------------------+
|  Draw: drawText                                                |  10000      |  0.0862729549408    |
+----------------------------------------------------------------+-------------+---------------------+

Master:

+----------------------------------------------------------------+-------------+---------------------+
|  Draw: drawText                                                |  10000      |  0.0877161026001    |
+----------------------------------------------------------------+-------------+---------------------+
github-actions[bot] commented 4 years ago

I have updated your lock dirs and formatted the code. Please @zbaylin pull the last commit before pushing any more changes.

bryphe commented 4 years ago

With this change - it seems like we don't really need reason-font-manager here anymore. Were you planning on removing it in a separate change?

github-actions[bot] commented 4 years ago

I have updated your lock dirs and formatted the code. Please @zbaylin pull the last commit before pushing any more changes.