Skip to content

Commit

Permalink
Disable kern for default fonts
Browse files Browse the repository at this point in the history
To optimize Chinese puncutation with Noto Sans CJK + Firefox.
Also sassc replaces scss in Makefile and CSS file is regenerated.
  • Loading branch information
taoky committed Apr 26, 2024
1 parent 6770792 commit 22ab6d9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ all:
css: docs/css/extra.css

docs/css/extra.css: docs/css/extra.scss
scss -t compact $^ > $@
sassc -t compact $^ > $@
17 changes: 17 additions & 0 deletions docs/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,36 @@

:root { --md-text-font: Roboto; --md-code-font: Roboto Mono; }

.md-typeset { font-feature-settings: "kern" 0; }

.md-typeset #references, .md-typeset .no-underline { margin-bottom: 0; padding-bottom: 0; border: none; }

.md-typeset h2 { padding-bottom: 0.2em; border-bottom: 1px solid #d3d3d3; }

.md-typeset h3 { padding-bottom: 0.2em; border-bottom: 1px dashed #d3d3d3; }

.md-typeset h4 { font-size: 1.17em; }

.md-typeset h5 { font-size: 1.08em; }

.md-typeset h6 { font-size: 1em; }

.md-typeset dt { font-weight: bold; }

.md-typeset img { display: block; margin-left: auto; margin-right: auto; }

.md-typeset .img-inline { display: inline-block; vertical-align: text-bottom; }

.md-typeset .img-border { border: 1px solid black; }

.md-typeset kbd { box-shadow: 0 0 0 0.05rem var(--md-default-fg-color--lighter), 0 0.1rem 0 var(--md-default-fg-color--lighter), inset 0 -0.1rem 0.2rem var(--md-default-bg-color); }

.md-typeset .admonition, .md-typeset details { font-size: 0.9em; }

.md-typeset .md-typeset__table { display: block; margin-left: auto; margin-right: auto; }

.md-typeset .md-typeset__table > table { display: table; width: auto; margin: 0 auto; }

.md-typeset p.caption { text-align: center; font-size: 0.94em; color: grey; margin: -0.7em 0 0; }

.md-typeset .footnote hr { margin-top: 0.2em; }
2 changes: 2 additions & 0 deletions docs/css/extra.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ $color-codes: red, darkred, orangered, green, limegreen, cyan, darkcyan;
}

.md-typeset {
font-feature-settings: "kern" 0;

#references,
.no-underline {
margin-bottom: 0;
Expand Down

0 comments on commit 22ab6d9

Please sign in to comment.