Also copy font licenses when copy-fonts is enabled
This commit is contained in:
parent
122c988477
commit
7e090ca42f
|
@ -181,6 +181,9 @@ impl HtmlHandlebars {
|
||||||
)?;
|
)?;
|
||||||
if html_config.copy_fonts {
|
if html_config.copy_fonts {
|
||||||
write_file(destination, "fonts/fonts.css", theme::fonts::CSS)?;
|
write_file(destination, "fonts/fonts.css", theme::fonts::CSS)?;
|
||||||
|
for (file_name, contents) in theme::fonts::LICENSES.iter() {
|
||||||
|
write_file(destination, file_name, contents)?;
|
||||||
|
}
|
||||||
for (file_name, contents) in theme::fonts::OPEN_SANS.iter() {
|
for (file_name, contents) in theme::fonts::OPEN_SANS.iter() {
|
||||||
write_file(destination, file_name, contents)?;
|
write_file(destination, file_name, contents)?;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
pub static CSS: &[u8] = include_bytes!("fonts.css");
|
pub static CSS: &[u8] = include_bytes!("fonts.css");
|
||||||
// An array of (file_name, file_contents) pairs
|
// An array of (file_name, file_contents) pairs
|
||||||
|
pub static LICENSES: [(&str, &[u8]); 2] = [
|
||||||
|
(
|
||||||
|
"fonts/OPEN-SANS-LICENSE.txt",
|
||||||
|
include_bytes!("OPEN-SANS-LICENSE.txt"),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"fonts/SOURCE-CODE-PRO-LICENSE.txt",
|
||||||
|
include_bytes!("SOURCE-CODE-PRO-LICENSE.txt"),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
// An array of (file_name, file_contents) pairs
|
||||||
pub static OPEN_SANS: [(&str, &[u8]); 10] = [
|
pub static OPEN_SANS: [(&str, &[u8]); 10] = [
|
||||||
(
|
(
|
||||||
"fonts/open-sans-v17-all-charsets-300.woff2",
|
"fonts/open-sans-v17-all-charsets-300.woff2",
|
||||||
|
|
Loading…
Reference in New Issue