From 038c2fdf08bd7e6fe4859a4634fbf08a068b6d16 Mon Sep 17 00:00:00 2001 From: therealmarv <1050582+therealmarv@users.noreply.github.com> Date: Fri, 15 Dec 2023 23:55:01 +0200 Subject: [PATCH 1/3] Activate EPUB font download This reverts commit 7f9e34de661b51353a4bead5d79737854157e8b7. --- bakery-js/src/index.ts | 5 +---- dockerfiles/steps/step-bake.bash | 1 + dockerfiles/steps/step-pdf.bash | 1 + dockerfiles/steps/step-prebake.bash | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bakery-js/src/index.ts b/bakery-js/src/index.ts index 1bba5688..5909e802 100644 --- a/bakery-js/src/index.ts +++ b/bakery-js/src/index.ts @@ -195,10 +195,7 @@ epubCommand ) writeFileSync( `${destinationDir}/${opfFile.parsed.slug}/the-style-epub.css`, - cssContents.replace( - /@import ([^\n]+)\n/g, - '/* commented_for_epub @import $1 */\n' - ) + cssContents ) writeFileSync( diff --git a/dockerfiles/steps/step-bake.bash b/dockerfiles/steps/step-bake.bash index e6378cc3..0534049b 100644 --- a/dockerfiles/steps/step-bake.bash +++ b/dockerfiles/steps/step-bake.bash @@ -1 +1,2 @@ source $DOCKERFILES_ROOT/steps/bake-util.bash default + cp -R "$BOOK_STYLES_ROOT/downloaded-fonts" "$IO_BAKED" diff --git a/dockerfiles/steps/step-pdf.bash b/dockerfiles/steps/step-pdf.bash index 18f821b6..b72035d5 100644 --- a/dockerfiles/steps/step-pdf.bash +++ b/dockerfiles/steps/step-pdf.bash @@ -3,6 +3,7 @@ parse_book_dir # Style needed because mathjax will size converted math according to surrounding text cp "$IO_BAKED/the-style-pdf.css" "$IO_LINKED" +cp -R "$IO_BAKED/downloaded-fonts" "$IO_LINKED" shopt -s globstar nullglob for collection in "$IO_LINKED/"*.linked.xhtml; do slug_name=$(basename "$collection" | awk -F'[.]' '{ print $1; }') diff --git a/dockerfiles/steps/step-prebake.bash b/dockerfiles/steps/step-prebake.bash index 3d982149..06dd19fd 100644 --- a/dockerfiles/steps/step-prebake.bash +++ b/dockerfiles/steps/step-prebake.bash @@ -24,6 +24,7 @@ fi style_resource_root="$IO_INITIAL_RESOURCES/styles" generic_style="webview-generic.css" [[ ! -e "$style_resource_root" ]] && mkdir -p "$style_resource_root" +cp -R "$BOOK_STYLES_ROOT/downloaded-fonts" "$style_resource_root" while read -r slug_name; do style_name=$(read_style "$slug_name") web_style="$style_name-web.css" From 5fc8a2940cde35337a054c0e6e98c36f8394140f Mon Sep 17 00:00:00 2001 From: therealmarv <1050582+therealmarv@users.noreply.github.com> Date: Fri, 15 Dec 2023 23:58:38 +0200 Subject: [PATCH 2/3] point to ce-styles branch with activated font download --- ce-styles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ce-styles b/ce-styles index 4546ab2e..a12848ae 160000 --- a/ce-styles +++ b/ce-styles @@ -1 +1 @@ -Subproject commit 4546ab2ed0d33fccb0ad70319a38e94232ae3878 +Subproject commit a12848aec5923fc5fec67f34abc8f62a5dd05c0f From e97bb01b09a0adc4df74a79df32c41d76da8d31b Mon Sep 17 00:00:00 2001 From: therealmarv <1050582+therealmarv@users.noreply.github.com> Date: Tue, 16 Jul 2024 22:06:24 +0300 Subject: [PATCH 3/3] fox: ce-styles branch should be epub-font-download-activate --- ce-styles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ce-styles b/ce-styles index c87aa99c..e39a62ff 160000 --- a/ce-styles +++ b/ce-styles @@ -1 +1 @@ -Subproject commit c87aa99c9bf96b49de70a122c9a9f8269182cf5c +Subproject commit e39a62ff43412bcbcf7553a61b1b115c96f8a12b