Investigating loading system fonts with fontkit-rs/fontdb
messense opened this issue · 2 comments
messense commented
MuPDF does not, by default, make use of fonts present on the underlying system (for instance, on Windows, MuPDF will not look for fonts in C:/Windows/). Should you wish to implement this kind of ‘system font’ loading, however, MuPDF does provide hooks for this to be done. The
fz_install_load_system_font_funcs
call takes a set of function pointers that can be used for this purpose.
https://github.com/servo/font-kit
https://github.com/RazrFalcon/fontdb
messense commented
fz_install_load_system_font_funcs
example: https://github.com/sumatrapdfreader/sumatrapdf/blob/020e94ed151e3f747edcbf6246cd526f5d4d03fd/ext/mupdf_load_system_font.c#L785