You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix font package detection for fonts with spaces in names (#478) (#479)
Font names with spaces (e.g., "Noto Emoji", "DejaVu Sans") now work correctly
in automatic package installation. The font_ext() function replaces spaces
with \s* regex pattern to match actual font files that lack spaces
(e.g., NotoEmoji-Regular.ttf, DejaVuSans-Bold.ttf).
assert('detect_files() can detect filenames from LaTeX log', {
4
12
# Fonts are also tested in test-tlmgr.R
5
13
(detect_files("! Font U/psy/m/n/10=psyr at 10.0pt not loadable: Metric (TFM) file not found") %==% font_ext("psyr"))
6
14
(detect_files('! The font "FandolSong-Regular" cannot be found.') %==% font_ext("FandolSong-Regular"))
7
15
(detect_files('!pdfTeX error: /usr/local/bin/pdflatex (file tcrm0700): Font tcrm0700 at 600 not found') %==% font_ext('tcrm0700'))
8
16
(detect_files('(fontspec) The font "LibertinusSerif-Regular" cannot be') %==% font_ext('LibertinusSerif-Regular'))
9
17
(detect_files('! Font \\JY3/mc/m/n/10=file:HaranoAjiMincho-Regular.otf:-kern;jfm=ujis at 9.24713pt not loadable: metric data not found or bad.') %==% 'HaranoAjiMincho-Regular.otf')
18
+
# Fonts with spaces in names (issue #478)
19
+
(detect_files('! The font "Noto Emoji" cannot be found.') %==% font_ext("Noto Emoji"))
20
+
(detect_files('! The font "DejaVu Sans" cannot be found.') %==% font_ext("DejaVu Sans"))
10
21
11
22
(length(detect_files("asdf qwer")) ==0)
12
23
(detect_files("! LaTeX Error: File `framed.sty' not found.") %==% 'framed.sty')
0 commit comments