From 75a6d65e5a25c4394f5fd2404d559d2309057df9 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 13 May 2023 08:49:17 -0700 Subject: [PATCH] Don't warn on copy-fonts=true (the default) when fonts.css is overridden. --- src/renderer/html_handlebars/hbs_renderer.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 479f5a78..986b81c2 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -291,19 +291,12 @@ impl HtmlHandlebars { } if let Some(fonts_css) = &theme.fonts_css { if !fonts_css.is_empty() { - if html_config.copy_fonts { - warn!( - "output.html.copy_fonts is deprecated.\n\ - Set copy-fonts=false in book.toml and ensure the fonts you want are in \ - the `theme/fonts/` directory." - ); - } write_file(destination, "fonts/fonts.css", &fonts_css)?; } } if !html_config.copy_fonts && theme.fonts_css.is_none() { warn!( - "output.html.copy_fonts is deprecated.\n\ + "output.html.copy-fonts is deprecated.\n\ This book appears to have copy-fonts=false in book.toml without a fonts.css file.\n\ Add an empty `theme/fonts/fonts.css` file to squelch this warning." );