summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-effects.mkiv
blob: 9b712938bd0eac7d21e6da69a3d0c1dce8d173ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%D \module
%D   [      file=s-fonts-basics, % was s-fnt-01,
%D        version=2006.10.10, % guess
%D          title=\CONTEXT\ Style File,
%D       subtitle=Listing Glyphs in Large Fonts,
%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.

%D This module is just a check for \type {luatex-basics-prepare}.

\startmodule[fonts-effects]

\startluacode
moduledata.fonts         = moduledata.fonts         or { }
moduledata.fonts.effects = moduledata.fonts.effects or { }

function moduledata.fonts.effects.showfonteffect()
    local effect = fonts.hashes.properties[true].effect
    if effect then
        local context = context
        local BC, NC, EQ, NR = context.BC, context.NC, context.EQ, context.NR
        context.starttabulate { "||||||||" }
            BC() context("id")      EQ() context(font.current())
            BC() context("factor")  EQ() context(effect.factor)
            BC() context("wdelta")  EQ() context(effect.wdelta)
            NC() NR()
            BC() context("effect")  EQ() context(effect.effect)
            BC() context("hfactor") EQ() context(effect.hfactor)
            BC() context("hdelta")  EQ() context(effect.hdelta)
            NC() NR()
            BC() context("width")   EQ() context(effect.width)
            BC() context("vfactor") EQ() context(effect.vfactor)
            BC() context("ddelta")  EQ() context(effect.ddelta)
            NC() NR()
        context.stoptabulate()
    end
end
\stopluacode

\installmodulecommandluasingle \showfonteffect {moduledata.fonts.effects.showfonteffect}

\stopmodule

\continueifinputfile{s-fonts-effects.mkiv}

\usemodule[art-01]

\starttext

    \definedfont[Serif*default,boldened] An example.

    \showfonteffect

\stopmodule