Why `scan system fonts` take time even `text(fallback: false)`?

Start Duration Name Details
0.909s 1.521us func call
0.909s 186.49us func call
0.909s 2.055us strong
0.909s 1.437ms realize
0.909s 1.752ms block
0.908s 19.361us finalize
0.908s 36.726us linebreak_simple
0.017s 878.08ms scan system fonts
0.017s 888.65ms discover fonts
0.017s 891.19ms prepare
0.017s 2.496us collect
0.017s 891.28ms collect
0.017s 891.35ms block
0.017s 902.79ms page run
0.009s 910.90ms layout document
0.009s 910.92ms iter (1)
0.000s 931.79ms compile
0s 953.17ms compile once
// / only Typst CLI embedded fonts
#set text(
  fallback:false, 
  font:("Libertinus Serif", "DejaVu Sans Mono",
  "New Computer Modern", "New Computer Modern Math"))

= English Heading  
// font perhaps: Libertinus Serif
= Greek Ηεαδινγ  
// font perhaps: Libertinus Serif
= Math Heading \u{1d6ae}\u{1d6c6}\u{1d6c2}... 
// font perhaps:New Computer Modern Math

/* Sure, the math heading is gen by 
    unicode hex calc functions,
    not type one by one.
    and those functions runs in μs */

Libertinus Serif installed in the system takes precedence over Libertinus Serif embedded in the compiler. The same applies to DejaVu Sans Mono and New Computer Modern (Math) as well. I guess this is the cause?

2 Likes

I can’t answer the question, but maybe the following helps. You can use the command line flag --ignore-system-fonts to prevent the compiler from loading system fonts at all.