diff --git a/.fantasticonrc.js b/.fantasticonrc.js index e3d90f4..00c3eea 100644 --- a/.fantasticonrc.js +++ b/.fantasticonrc.js @@ -7,6 +7,7 @@ const config = { codepoints: require('./images/icons/template/mapping.json'), inputDir: './images/icons', outputDir: './dist', + fontsUrl: '#{root}/dist', // @ts-ignore fontTypes: ['woff2'], normalize: true, diff --git a/images/icons/template/styles.hbs b/images/icons/template/styles.hbs index 441cd28..81adda6 100644 --- a/images/icons/template/styles.hbs +++ b/images/icons/template/styles.hbs @@ -1,8 +1,15 @@ -@font-face { - font-family: '{{ name }}'; - font-display: block; - src: {{{ fontSrc }}}; -} +/* + +Must be placed at the end of body in the HTML file of any webview that needs it (because of CSP) + + +*/ .glicon { font: normal normal normal 16px/1 {{ name }}; diff --git a/src/webviews/apps/commitDetails/commitDetails.html b/src/webviews/apps/commitDetails/commitDetails.html index 417e69a..9955fea 100644 --- a/src/webviews/apps/commitDetails/commitDetails.html +++ b/src/webviews/apps/commitDetails/commitDetails.html @@ -66,8 +66,8 @@ href="#" data-action="commit-actions" data-action-type="graph" - aria-label="Show Commit on Commit Graph" - title="Show Commit on Commit Graph" + aria-label="Show in Commit Graph" + title="Show in Commit Graph" > @font-face { font-family: 'codicon'; - src: url('#{webroot}/codicon.ttf?404cbc4fe3a64b9a93064eef76704c79') format('truetype'); + font-display: block; + src: url('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa') format('truetype'); + } + + diff --git a/src/webviews/apps/home/home.html b/src/webviews/apps/home/home.html index 58c076d..819c660 100644 --- a/src/webviews/apps/home/home.html +++ b/src/webviews/apps/home/home.html @@ -19,7 +19,8 @@ diff --git a/src/webviews/apps/plus/graph/graph.html b/src/webviews/apps/plus/graph/graph.html index 38c77d1..fb2a3f3 100644 --- a/src/webviews/apps/plus/graph/graph.html +++ b/src/webviews/apps/plus/graph/graph.html @@ -12,7 +12,15 @@ + diff --git a/src/webviews/apps/plus/timeline/timeline.html b/src/webviews/apps/plus/timeline/timeline.html index 98f3bca..81bac30 100644 --- a/src/webviews/apps/plus/timeline/timeline.html +++ b/src/webviews/apps/plus/timeline/timeline.html @@ -51,7 +51,8 @@ diff --git a/src/webviews/apps/rebase/rebase.html b/src/webviews/apps/rebase/rebase.html index 83607e8..37d6c55 100644 --- a/src/webviews/apps/rebase/rebase.html +++ b/src/webviews/apps/rebase/rebase.html @@ -58,7 +58,8 @@ diff --git a/src/webviews/apps/settings/settings.html b/src/webviews/apps/settings/settings.html index fc47918..bdf13bb 100644 --- a/src/webviews/apps/settings/settings.html +++ b/src/webviews/apps/settings/settings.html @@ -327,7 +327,8 @@ diff --git a/src/webviews/apps/shared/glicons.scss b/src/webviews/apps/shared/glicons.scss index 02ec56c..b06f1ac 100644 --- a/src/webviews/apps/shared/glicons.scss +++ b/src/webviews/apps/shared/glicons.scss @@ -1,8 +1,15 @@ -@font-face { - font-family: 'glicons'; - font-display: block; - src: url("./glicons.woff2?2e51fe40df2abdf6a27fbae6c29587b1") format("woff2"); -} +/* + +Must be placed at the end of body in the HTML file of any webview that needs it (because of CSP) + + +*/ .glicon { font: normal normal normal 16px/1 glicons; diff --git a/src/webviews/apps/welcome/welcome.html b/src/webviews/apps/welcome/welcome.html index 1c43a0a..04f5d5a 100644 --- a/src/webviews/apps/welcome/welcome.html +++ b/src/webviews/apps/welcome/welcome.html @@ -526,7 +526,8 @@ diff --git a/webpack.config.js b/webpack.config.js index aaf5084..2d4e610 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -315,10 +315,6 @@ function getWebviewsConfig(mode, env) { ), to: path.posix.join(__dirname.replace(/\\/g, '/'), 'dist', 'webviews'), }, - { - from: path.posix.join(__dirname.replace(/\\/g, '/'), 'dist', 'glicons.woff2'), - to: path.posix.join(__dirname.replace(/\\/g, '/'), 'dist', 'webviews'), - }, ], }), ];