symb-imp-cc.mkiv /size: 3161 b    last modification: 2021-10-28 13:50
1%D \module
2%D   [       file=symb-imp-cc,
3%D        version=2013.03.22,
4%D          title=\CONTEXT\ Symbol Libraries,
5%D       subtitle=Creative Commons,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14%D LS/HH: This font has changed over time so there might be diffences
15%D in rendering. The otf, ttf and type1 version can differ too.
16
17\doifelsefontpresent{ccicons.otf} { % redone ctan version
18    \definefontfeature
19      [creativecommons]
20      [mode=base,
21       goodies=ccicons,
22       unicoding=yes]
23    \definefontsynonym
24      [creativecommons]
25      [ccicons*creativecommons]
26} {                                 % official version
27    \definefontfeature
28      [creativecommons]
29      [mode=base,
30       goodies=cc-icons,
31       unicoding=yes]
32    \definefontsynonym
33      [creativecommons]
34      [cc-icons*creativecommons]
35}
36
37\startsymbolset[cc]
38
39    \definesymbol [sa]       [\getnamedglyphdirect{creativecommons}{sa}]
40    \definesymbol [by]       [\getnamedglyphdirect{creativecommons}{by}]
41    \definesymbol [cc]       [\getnamedglyphdirect{creativecommons}{cc}]
42    \definesymbol [nd]       [\getnamedglyphdirect{creativecommons}{nd}]
43    \definesymbol [nc]       [\getnamedglyphdirect{creativecommons}{nc}]
44    \definesymbol [ncus]     [\getnamedglyphdirect{creativecommons}{nc}]
45    \definesymbol [nceu]     [\getnamedglyphdirect{creativecommons}{nceu}]
46    \definesymbol [ncjp]     [\getnamedglyphdirect{creativecommons}{ncjp}]
47    \definesymbol [pd]       [\getnamedglyphdirect{creativecommons}{pd}]
48    \definesymbol [sampling] [\getnamedglyphdirect{creativecommons}{sampling}]
49    \definesymbol [share]    [\getnamedglyphdirect{creativecommons}{share}]
50    \definesymbol [remix]    [\getnamedglyphdirect{creativecommons}{remix}]
51    \definesymbol [zero]     [\getnamedglyphdirect{creativecommons}{zero}]
52    \definesymbol [logo]     [\getnamedglyphdirect{creativecommons}{logo}]
53
54    % \definesymbol [cc-by-sa-nc] [\dontleavehmode\lower.15ex\hbox\bgroup
55    %     \getnamedglyphdirect{creativecommons}{cc}\enspace
56    %     \getnamedglyphdirect{creativecommons}{by}\enspace
57    %     \getnamedglyphdirect{creativecommons}{sa}\enspace
58    %     \getnamedglyphdirect{creativecommons}{nc}%
59    % \egroup]
60    %
61    % % more efficient:
62    %
63    % \definesymbol [cc-by-sa-nc] [\dontleavehmode\lower.15ex\hbox\bgroup
64    %     \directsymbol{cc}{cc}\enspace\directsymbol{cc}{by}\enspace
65    %     \directsymbol{cc}{sa}\enspace\directsymbol{cc}{nc}%
66    % \egroup]
67    %
68    % % more fun:
69
70    \unexpanded\def\creativecommons#1%
71      {\dontleavehmode\lower.15\exheight\hbox\bgroup
72         \overloaded\let\inbetween\relax
73         \processseparatedlist[#1][-]{\inbetween\overloaded\let\inbetween\enspace\directsymbol{cc}}%
74       \egroup}
75
76    \definesymbol [cc-by-sa-nc] [\creativecommons{cc-by-sa-nc}]
77
78\stopsymbolset
79
80\continueifinputfile{symb-imp-cc.mkiv}
81
82\starttext
83
84    \showsymbolset[cc]
85
86    \symbol[cc][cc-by-sa-nc]
87
88\stoptext
89