aboutsummaryrefslogtreecommitdiff
path: root/test/writer.context
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-06 14:58:32 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-06 14:58:32 +0200
commit2f3d62cb8612139ee1695aee962007be86cc636e (patch)
tree10cdc9a4e00992ce2bdb45582c1a3d78b00af454 /test/writer.context
parentbf44b885228ae2352777372c7f06b800560d3914 (diff)
downloadpandoc-2f3d62cb8612139ee1695aee962007be86cc636e.tar.gz
ConTeXt template: improved font handling.
simplefonts is now obsolete in ConTeXt. This patch comes from Pablo Rodríguez via jgm/pandoc-templates#247.
Diffstat (limited to 'test/writer.context')
-rw-r--r--test/writer.context13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/writer.context b/test/writer.context
index 04df66178..eafc56f2a 100644
--- a/test/writer.context
+++ b/test/writer.context
@@ -6,19 +6,28 @@
style=,
color=,
contrastcolor=]
+
% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
\setupinteractionscreen[option=bookmark]
\setuptagging[state=start]
+
% use microtypography
\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes]
\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes]
\setupalign[hz,hanging]
\setupitaliccorrection[global, always]
+
\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted
-\usemodule[simplefonts]
-\setmainfontfallback[DejaVu Serif][range={greekandcoptic, greekextended}, force=yes, rscale=auto]
+
+\definefallbackfamily[mainface][rm][DejaVu Serif][preset=range:greek, force=yes]
+\definefontfamily[mainface][rm][Latin Modern Roman]
+\definefontfamily[mainface][mm][Latin Modern Math]
+\definefontfamily[mainface][ss][Latin Modern Sans]
+\definefontfamily[mainface][tt][Latin Modern Typewriter][features=none]
+\setupbodyfont[mainface]
+
\setupwhitespace[medium]
\setuphead[chapter] [style=\tfd,header=empty]