Skip to content

Commit

Permalink
fix: use relURL for fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Sep 11, 2019
1 parent 376ed1a commit de6916f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 87 deletions.
11 changes: 0 additions & 11 deletions assets/scss/_common/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,3 @@
font-family: $fontFamilyBody;
}
}

@if variable-exists("glyph") {
@font-face {
font-family: 'glyph-correction';
font-display: swap;
src: url("/fonts/glyph-correction.eot");
src: url("/fonts/glyph-correction.eot") format('embedded-opentype'), url("/fonts/glyph-correction.woff2") format('woff2'), url("/fonts/glyph-correction.woff") format('woff'), url("/fonts/glyph-correction.ttf") format('truetype');
font-weight: inherit;
font-style: inherit;
}
}
12 changes: 11 additions & 1 deletion assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@

{{ if .Site.Params.enableChinesePunctuationGlyphCorrection }}
{{ .Scratch.Set "glyph" "'glyph-correction', " }}
$glyph: true;
@font-face {
font-family: 'glyph-correction';
font-display: swap;
font-weight: inherit;
font-style: inherit;
src: url("{{ "fonts/glyph-correction.eot" | relURL }}");
src: url("{{ "fonts/glyph-correction.eot?#iefix" | relURL }}") format('embedded-opentype'),
url("{{ "fonts/glyph-correction.woff2" | relURL }}") format('woff2'),
url("{{ "fonts/glyph-correction.woff" | relURL }}") format('woff'),
url("{{ "fonts/glyph-correction.ttf" | relURL }}") format('truetype');
}
.drop-cap {
margin-top: $fontSize !important;
}
Expand Down
75 changes: 0 additions & 75 deletions exampleSite/assets/scss/_common/fonts.scss

This file was deleted.

0 comments on commit de6916f

Please sign in to comment.