servo / font-kit

A cross-platform font loading library written in Rust
Apache License 2.0
678 stars 100 forks source link

Perf select_best_match #166

Closed xiaopengli89 closed 3 years ago

xiaopengli89 commented 3 years ago

When create_handles_from_core_text_collection, we only need to read the same path file once, and change handle to memory mode, so when load font from the handle next time, we can use the memory data.

before:

截屏2020-11-18 下午12 19 34

after:

截屏2020-11-19 下午8 41 29
jdm commented 3 years ago

@bors-servo r+

bors-servo commented 3 years ago

:pushpin: Commit 9f6a54a has been approved by jdm

bors-servo commented 3 years ago

:hourglass: Testing commit 9f6a54acaf36d79485c9a62bcd935e6316631cd1 with merge 31fb9c96f64cb120fbadd094c53b91cc8568b5f7...

bors-servo commented 3 years ago

:sunny: Test successful - checks-travis Approved by: jdm Pushing 31fb9c96f64cb120fbadd094c53b91cc8568b5f7 to master...