servo / font-kit

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

load font extremely slowly on macos than in windows and linux. #209

Open lencil opened 1 year ago

lencil commented 1 year ago

use example match_font, run it with following arguments in macos. ./match-font "PingFang SC" "PingFang SC" is a macos default CJK font. This call will cost 3~5 seconds. I discovered that if you put the font in user ~/Library/fonts, it runs fast. But loading fonts in system fonts path will cost more time.

lencil commented 1 year ago

on macos the example of the crate "./list-fonts" will cost several minutes, really realy slow.