From f9be636a4a3e65d90da043730443bcbbbc1f6a5d Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Wed, 13 Nov 2019 12:05:38 +0200 Subject: [PATCH] add fonts --- editors/default/config-overrides.js | 12 ++++++++++++ editors/editoria/config-overrides.js | 12 ++++++++++++ wax-prosemirror-layouts/package.json | 4 ++++ wax-prosemirror-themes/package.json | 9 ++++++++- wax-prosemirror-themes/src/coko-theme/index.js | 4 ++-- 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/editors/default/config-overrides.js b/editors/default/config-overrides.js index 3ef5dcd48..82c74c17d 100644 --- a/editors/default/config-overrides.js +++ b/editors/default/config-overrides.js @@ -22,6 +22,18 @@ module.exports = function override(config, env) { { test: /\.svg$/, use: "svg-inline-loader" + }, + { + test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, + use: [ + { + loader: "file-loader", + options: { + name: "[name].[ext]", + outputPath: "fonts/" + } + } + ] } ] } diff --git a/editors/editoria/config-overrides.js b/editors/editoria/config-overrides.js index 3ef5dcd48..82c74c17d 100644 --- a/editors/editoria/config-overrides.js +++ b/editors/editoria/config-overrides.js @@ -22,6 +22,18 @@ module.exports = function override(config, env) { { test: /\.svg$/, use: "svg-inline-loader" + }, + { + test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, + use: [ + { + loader: "file-loader", + options: { + name: "[name].[ext]", + outputPath: "fonts/" + } + } + ] } ] } diff --git a/wax-prosemirror-layouts/package.json b/wax-prosemirror-layouts/package.json index eadd0ca4b..5fa8b0426 100644 --- a/wax-prosemirror-layouts/package.json +++ b/wax-prosemirror-layouts/package.json @@ -7,5 +7,9 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "@pubsweet/ui-toolkit": "^2.2.13", + "styled-components": "^4.1.1" } } diff --git a/wax-prosemirror-themes/package.json b/wax-prosemirror-themes/package.json index 5950199f2..7b3decf88 100644 --- a/wax-prosemirror-themes/package.json +++ b/wax-prosemirror-themes/package.json @@ -8,5 +8,12 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "dependencies": {} + "dependencies": { + "@pubsweet/ui-toolkit": "^2.2.13", + "cokourier-prime-sans": + "git+https://gitlab.coko.foundation/julientaq/cokourier-sans-prime.git", + "styled-components": "^4.1.1", + "typeface-fira-sans-condensed": "^0.0.54", + "typeface-vollkorn": "^0.0.54" + } } diff --git a/wax-prosemirror-themes/src/coko-theme/index.js b/wax-prosemirror-themes/src/coko-theme/index.js index c430fb03e..a8f8b87d9 100644 --- a/wax-prosemirror-themes/src/coko-theme/index.js +++ b/wax-prosemirror-themes/src/coko-theme/index.js @@ -1,6 +1,6 @@ /* eslint-disable import/extensions */ -// import "typeface-fira-sans-condensed"; -// import "typeface-vollkorn"; +import "typeface-fira-sans-condensed"; +import "typeface-vollkorn"; const cokoTheme = { /* Colors */ -- GitLab