File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ const GUIDE_FOR_FRONTEND = `
1818
1919const MAX_BUNDLE_SIZE = 2 * 1024 * 1024 ;
2020
21- const DO_EMBED_FONTS = false ; // The embedded mode is not yet ready :-(.
21+ // true: embed KaTeX-fonts into index.html, false: don't embed fonts.
22+ const DO_EMBED_FONTS = true ;
2223
2324function llamaCppBuildPlugin ( ) {
2425 return {
@@ -70,7 +71,7 @@ function llamaCppBuildPlugin() {
7071 // Replace both the original and hashed references
7172 // e.g. url(./KaTeX_Math-Italic.flOr_0UB.ttf) has to be replaces by a base64 data url.
7273 const bufData = Buffer . from ( fontContent ) . toString ( 'base64' ) ;
73- srcUrl = `src:url(' data:application/font-woff2;base64,${ bufData } ' ) format("woff2")` ;
74+ srcUrl = `src:url(data:application/font-woff2;base64,${ bufData } ) format("woff2")` ;
7475 }
7576 } else {
7677 console . log ( 'Missing font file' , fontPath ) ;
You can’t perform that action at this time.
0 commit comments