diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
commit | 5c6357cdb820b4f628d036ba7b2248f221d50c0b (patch) | |
tree | 6365552f2737faaffe63a395272da242ee2c4f03 /Master/texmf-dist/tex/context/base/mkiv/mtx-context-fonts.tex | |
parent | b4568bc71e054f3d1fd6404b45d2322631778284 (diff) |
ConTeXt version 2019.02.22 19:35
git-svn-id: svn://tug.org/texlive/trunk@50086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/mtx-context-fonts.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/mtx-context-fonts.tex | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-fonts.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-fonts.tex new file mode 100644 index 00000000000..f1f74c9e9ae --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-fonts.tex @@ -0,0 +1,98 @@ +%D \module +%D [ file=mtx-context-fonts, +%D version=2018.10.10, +%D title=\CONTEXT\ Extra Trickry, +%D subtitle=Show Font Info, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% begin help +% +% usage: context --extra=fonts [options] name +% +% --topspace=dimension : distance above first line +% --backspace=dimension : distance before left margin +% --paperformat=spec : paper*print or paperxprint +% --compact : small margins, 8pt font +% --verycompact : small margins, 7pt font +% +% example: context --extra=fonts --name=dejavu-serif +% end help + +\input mtx-context-common.tex + +\usemodule[fonts-charts] +\usemodule[fonts-tables] + +\input mtx-context-common.tex + +\doifdocumentargument {compact} { + \setdocumentargument{topspace} {5mm} + \setdocumentargument{backspace}{5mm} + \setdocumentargument{bodyfont} {8pt} +} + +\doifdocumentargument {verycompact} { + \setdocumentargument{topspace} {5mm} + \setdocumentargument{backspace}{5mm} + \setdocumentargument{bodyfont} {7pt} +} + +\setupbodyfont + [dejavu,9pt,tt,\getdocumentargument{bodyfont}] % dejavu is more complete + +\setuplayout + [header=0cm, + footer=1.5cm, + topspace=\getdocumentargumentdefault{topspace}{1.5cm}, + backspace=\getdocumentargumentdefault{backspace}{1.5cm}, + width=middle, + height=middle] + +\setuppapersize + [\getdocumentargument{paperformat_paper}] + [\getdocumentargument{paperformat_print}] + +\starttexdefinition unexpanded showfontdetails [#1] + \starttitle[title=#1] + \startsubject[title=Properties] + \showfontproperties[#1] + \stopsubject + \startsubject[title=Parameters] + \showfontparameters[#1] + \stopsubject + \startsubject[title=Positionings] + \showfontpositionings[#1] + \stopsubject + \startsubject[title=Substitutions] + \showfontsubstitutions[#1] + \stopsubject + \startsubject[title=Unicodevariants] + \showfontunicodevariants[#1] + \stopsubject + \startsubject[title=Ligatures] + \showfontligatures[#1] + \stopsubject + \showfontchart[#1,page=yes] + \stoptitle +\stoptexdefinition + +\starttext + + \startluacode + local files = document.files + if #files > 0 then + for i=1,#files do + context.showfontdetails { name = files[i] .. "*default" } + end + else + context("No font name(s) given.") + end + \stopluacode + +\stoptext |