From 535aea460ee66f78059e2cd0a6742c78b2946ba0 Mon Sep 17 00:00:00 2001 From: daniel-j Date: Wed, 10 Apr 2019 15:34:40 +0200 Subject: [PATCH] Enable hyphenation and ligatures! --- src/style/style.styl | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/style/style.styl b/src/style/style.styl index a064f01..fa63f3c 100644 --- a/src/style/style.styl +++ b/src/style/style.styl @@ -12,8 +12,18 @@ body { background-color: white; color: black; text-align: justify; - hyphens: auto; + -epub-hyphens: auto; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + + font-kerning: normal; + font-variant: common-ligatures lining-nums; + -webkit-font-feature-settings: "kern", "liga", "clig", "lnum"; + font-feature-settings: "kern", "liga", "clig", "lnum"; + } a, u { @@ -25,6 +35,19 @@ p { margin-bottom: 0; text-indent: 0; + -epub-hyphens: auto; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + + -webkit-hyphenate-limit-before: 3; + -webkit-hyphenate-limit-after: 2; + -ms-hyphenate-limit-chars: 6 3 2; + hyphenate-limit-chars: 6 3 2; + -webkit-hyphenate-limit-lines: 2; + hyphenate-limit-lines: 2; + &.double { margin-top: 1em; } @@ -42,8 +65,12 @@ div p { h1, h2, h3, h4, h5, h6, header { text-align: left !important; - hyphens: none; + adobe-hyphenate: none; -epub-hyphens: none; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; } em { @@ -256,6 +283,7 @@ code { } pre { margin: 1em 0; + -epub-hyphens: none; -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none;