diff --git a/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js b/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js index e6d662116e3..00438090c91 100644 --- a/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js +++ b/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js @@ -192,10 +192,25 @@ module.exports = function(context) { context.pluginAssets['katex'] = [ { name: 'katex.css' }, { name: 'fonts/KaTeX_Main-Regular.woff2' }, + { name: 'fonts/KaTeX_Main-Bold.woff2' }, + { name: 'fonts/KaTeX_Main-BoldItalic.woff2' }, + { name: 'fonts/KaTeX_Main-Italic.woff2' }, { name: 'fonts/KaTeX_Math-Italic.woff2' }, + { name: 'fonts/KaTeX_Math-BoldItalic.woff2' }, { name: 'fonts/KaTeX_Size1-Regular.woff2' }, { name: 'fonts/KaTeX_Size2-Regular.woff2' }, + { name: 'fonts/KaTeX_Size3-Regular.woff2' }, + { name: 'fonts/KaTeX_Size4-Regular.woff2' }, { name: 'fonts/KaTeX_AMS-Regular.woff2' }, + { name: 'fonts/KaTeX_Caligraphic-Bold.woff2' }, + { name: 'fonts/KaTeX_Caligraphic-Regular.woff2' }, + { name: 'fonts/KaTeX_Fraktur-Bold.woff2' }, + { name: 'fonts/KaTeX_Fraktur-Regular.woff2' }, + { name: 'fonts/KaTeX_SansSerif-Bold.woff2' }, + { name: 'fonts/KaTeX_SansSerif-Italic.woff2' }, + { name: 'fonts/KaTeX_SansSerif-Regular.woff2' }, + { name: 'fonts/KaTeX_Script-Regular.woff2' }, + { name: 'fonts/KaTeX_Typewriter-Regular.woff2' }, ]; }; diff --git a/ReactNativeClient/lib/joplin-renderer/Tools/buildAssets.js b/ReactNativeClient/lib/joplin-renderer/Tools/buildAssets.js index 79c1268d9f4..e46e2f139d6 100644 --- a/ReactNativeClient/lib/joplin-renderer/Tools/buildAssets.js +++ b/ReactNativeClient/lib/joplin-renderer/Tools/buildAssets.js @@ -16,10 +16,25 @@ async function main() { await copyFile(`${rootDir}/node_modules/katex/dist/katex.min.css`, 'katex/katex.css'); await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Main-Regular.woff2`, 'katex/fonts/KaTeX_Main-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Main-Bold.woff2`, 'katex/fonts/KaTeX_Main-Bold.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2`, 'katex/fonts/KaTeX_Main-BoldItalic.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Main-Italic.woff2`, 'katex/fonts/KaTeX_Main-Italic.woff2'); await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Math-Italic.woff2`, 'katex/fonts/KaTeX_Math-Italic.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2`, 'katex/fonts/KaTeX_Math-BoldItalic.woff2'); await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Size1-Regular.woff2`, 'katex/fonts/KaTeX_Size1-Regular.woff2'); await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Size2-Regular.woff2`, 'katex/fonts/KaTeX_Size2-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Size3-Regular.woff2`, 'katex/fonts/KaTeX_Size3-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Size4-Regular.woff2`, 'katex/fonts/KaTeX_Size4-Regular.woff2'); await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_AMS-Regular.woff2`, 'katex/fonts/KaTeX_AMS-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2`, 'katex/fonts/KaTeX_Caligraphic-Bold.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2`, 'katex/fonts/KaTeX_Caligraphic-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2`, 'katex/fonts/KaTeX_Fraktur-Bold.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2`, 'katex/fonts/KaTeX_Fraktur-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2`, 'katex/fonts/KaTeX_SansSerif-Bold.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2`, 'katex/fonts/KaTeX_SansSerif-Italic.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2`, 'katex/fonts/KaTeX_SansSerif-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Script-Regular.woff2`, 'katex/fonts/KaTeX_Script-Regular.woff2'); + await copyFile(`${rootDir}/node_modules/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2`, 'katex/fonts/KaTeX_Typewriter-Regular.woff2'); await copyFile(`${rootDir}/node_modules/highlight.js/styles/atom-one-light.css`, 'highlight.js/atom-one-light.css'); await copyFile(`${rootDir}/node_modules/highlight.js/styles/atom-one-dark-reasonable.css`, 'highlight.js/atom-one-dark-reasonable.css'); diff --git a/ReactNativeClient/lib/joplin-renderer/assets/katex/fonts/KaTeX_Size4-Regular.woff2 b/ReactNativeClient/lib/joplin-renderer/assets/katex/fonts/KaTeX_Size4-Regular.woff2 new file mode 100644 index 00000000000..317c2fa2e75 Binary files /dev/null and b/ReactNativeClient/lib/joplin-renderer/assets/katex/fonts/KaTeX_Size4-Regular.woff2 differ