1
2
3\setuppapersize
4 [S6]
5
6\setupbackgrounds
7 [page]
8 [background=color,
9 backgroundcolor=darkgray]
10
11\setuplayout
12 [backspace=24pt,
13 topspace=20pt,
14 bottomspace=8pt,
15 width=middle,
16 height=middle,
17 footerdistance=8pt,
18 footer=8pt,
19 header=0pt]
20
21\setupcolors
22 [textcolor=white]
23
24\setupbodyfont
25 [dejavu,14.4pt]
26
27\definecolor[trace:o] [s=1]
28\definecolor[trace:r] [s=1]
29\definecolor[trace:do][s=1]
30\definecolor[trace:dr][s=1]
31
32\usemodule[abr03]
33
34\definefontfeature[noligatures][liga=no]
35
36\setuphead
37 [section]
38 [page=yes,
39 style=\bfb,
40 after={\blank[3*medium]}]
41
42\setuphead
43 [subsection]
44 [page=no,
45 style=\bf\addfeature{noligatures},
46 before={\blank[3*medium]},
47 after={\blank}]
48
49\setupfooter
50 [strut=no,
51 style=\bf]
52
53\startdocument
54 [title={Picture Fonts},
55 subtitle={welcome to a (beautiful) mess},
56 author={Hans Hagen},
57 occasion={BachoTUG 2017}]
58
59\startstandardmakeup
60 \vskip32pt
61 \bfd \setupinterlinespace
62 \documentvariable{title}
63 \crlf
64 \bfb \setupinterlinespace
65 \vskip12pt
66 \documentvariable{subtitle}
67 \vfill
68 \bfb \setupinterlinespace
69 \documentvariable{author}
70 \crlf
71 \documentvariable{occasion}
72\stopstandardmakeup
73
74\startsubject[title=A Summary]
75
76\startitemize
77\startitem
78 {\bf the macro packages view:} just a font like any other but it needs to configure
79 some extra color related properties
80\stopitem
81\startitem
82 {\bf the engines view:} depending on the technology a normal font that needs a bit
83 special treatment or needs to be dealt with as collection of graphics
84\stopitem
85\startitem
86 {\bf the viewers view:} regular outline glyphs or images tagged as kind of
87 characters so that their unicode representation can be cut and paste
88\stopitem
89\startitem
90 {\bf the users view:} more pictures than glyphs although some people one can
91 communicate using them
92\stopitem
93\stopitemize
94
95So, in practice, for most \TEX\ users its probably not a high priority font but more a fun
96one.
97
98\stopsubject
99
100\startsubject[title=Technologies]
101
102As each vendor came up with something, we have to deal with a all kinds of formats. And or
103course, as eagerness pushes things on the market before its perfect we now have to deal
104with all of them.
105
106\startitemize
107\startitem
108 {\bf overlapping glyphs:} this technique uses the \type {colr} and \type {cpal} tables
109 and is actually a quite clean technology, you can combine in different ways
110\stopitem
111\startitem
112 {\bf svg graphics:} this technique uses the \type {svg} table that contains a svg vector
113 image
114\stopitem
115\startitem
116 {\bf bitmap graphics:} this technique uses for instance \type {sbix} tables that can have
117 various graphic images
118\stopitem
119\stopitemize
120
121The first two are already supported in the \CONTEXT\ font loader and processor
122for a while, the last one was added recently.
123
124\blank
125
126Only the overlapping method is useable for the tens of thousands of skin tone combinations of
127families, (kissing) couples, and professions.
128
129\stopsubject
130
131\startsubject[title=Preparation]
132
133For now one has to enable the feature:
134
135\startbuffer
136\definefontfeature[overlay][default][ccmp=yes,colr=yes,dist=yes]
137\definefontfeature[svg] [default][svg=yes]
138\definefontfeature[bitmap] [default][sbix=yes]
139
140\definefontfeature [colored] [default]
141 [cmcp=yes,dist=yes,
142 colr=yes,svg=yes,sbix=yes]
143\stopbuffer
144
145\typebuffer \getbuffer
146
147Defining a font is not different from others
148
149\starttyping
150\definefont[MyEmojiFont] [seguiemj*overlay]
151\definefontsynonym[emoji][seguiemj*overlay]
152\stoptyping
153
154As is using:
155
156\starttyping
157{\MyEmojiFont\resolvedemoji{woman}}
158\emoji{woman}
159\stoptyping
160
161\stopsubject
162
163\startsubject[title=Accessing shapes]
164
165\startbuffer
166\definesymbol[man] [\emoji{man}]
167\definesymbol[woman][\emoji{woman}]
168\definesymbol[girl] [\emoji{girl}]
169\definesymbol[boy] [\emoji{boy}]
170
171\definesymbol[family][\emoji{family man woman girl boy}]
172\stopbuffer
173
174\typebuffer \getbuffer
175
176\starttyping
177\definefontsynonym[emoji][file:seguiemj.ttf*default,overlay]
178
179\symbol[boy] \symbol[girl] \symbol[man] \symbol[woman]
180
181\symbol[family]
182\stoptyping
183
184\stopsubject
185
186\startsubject[title=Different fonts]
187
188\def\ShowThem#1#2#3
189 {\NC #1
190 \NC default
191 \NC \definefontsynonym[emoji][#3*default]\symbol[boy] \symbol[girl] \symbol[man] \symbol[woman]
192 \NC \definefontsynonym[emoji][#3*default]\symbol[family]
193 \NC \NR
194 \NC
195 \NC #2
196 \NC \definefontsynonym[emoji][#3*#2]\symbol[boy] \symbol[girl] \symbol[man] \symbol[woman]
197 \NC \definefontsynonym[emoji][#3*#2]\symbol[family]
198 \NC \NR}
199
200\starttabulate[TT]
201 \ShowThem{seguiemj} {overlay}{file:seguiemj.ttf}
202 \ShowThem{emojionecolorsvginot}{svg} {file:emojionecolorsvginot.ttf}
203 \ShowThem{emojionemozilla} {overlay}{file:emojionemozilla.ttf}
204 \ShowThem{applecoloremoji} {bitmap} {file:applecoloremoji.ttc}
205\stoptabulate
206
207\stopsubject
208
209\startsubject[title=Ligatures]
210
211\definefontfeature[seguiemjcl][default][colr=yes,ccmp=yes,dist=yes]
212\definefontfeature[seguiemjbw][default][ccmp=yes]
213
214
215
216\definefont[MyEmoji][seguiemj*seguiemjcl]
217
218
219
220{\MyEmoji 👨🏽🌾 👨🏽🍳 👨🏽🎓 👨🏽🎤 👨🏽🎨 👨🏽🏫 👨🏽🏭 👨🏽💻 👨🏽💼 👨🏽🔧 👨🏽🔬 👨🏽🚀}
221
222\starttabulate[TT]
223\NC character \NC 1F477 \NC \MyEmoji \utfchar{"1F477} \NC \NR
224\NC skin modifier \NC 1F3FE \NC \MyEmoji \utfchar{"1F3FE} \NC \NR
225\NC ligature \NC 1F477 1F3FE \NC \MyEmoji \utfchar{"1F477}
226 \utfchar{"1F3FE} \NC \NR
227\NC zero width joiner \NC 0200D \NC \MyEmoji \utfchar{"0200D} \NC \NR
228\NC female modifier \NC 02640 0FE0F \NC \MyEmoji \utfchar{"02640}
229 \utfchar{"0FE0F} \NC \NR
230\NC the whole lot \NC \NC \MyEmoji \utfchar{"1F477}
231 \utfchar{"1F3FE}
232 \utfchar{"0200D}
233 \utfchar{"02640}
234 \utfchar{"0FE0F} \NC \NR
235\stoptabulate
236
237\starttabulate[TT]
238\NC 1F468 1F3FD 200D 1F33E \NC \MyEmoji 👨🏽🌾 \NC man farmer medium skin tone \NC \NR
239\NC 1F468 1F3FD 200D 1F373 \NC \MyEmoji 👨🏽🍳 \NC man cook medium skin tone \NC \NR
240\NC 1F468 1F3FD 200D 1F393 \NC \MyEmoji 👨🏽🎓 \NC man student medium skin tone \NC \NR
241\NC 1F468 1F3FD 200D 1F3A4 \NC \MyEmoji 👨🏽🎤 \NC man singer medium skin tone \NC \NR
242\NC 1F468 1F3FD 200D 1F3A8 \NC \MyEmoji 👨🏽🎨 \NC man artist medium skin tone \NC \NR
243\NC 1F468 1F3FD 200D 1F3EB \NC \MyEmoji 👨🏽🏫 \NC man teacher medium skin tone \NC \NR
244\NC 1F468 1F3FD 200D 1F3ED \NC \MyEmoji 👨🏽🏭 \NC man factory worker medium skin tone \NC \NR
245\NC 1F468 1F3FD 200D 1F4BB \NC \MyEmoji 👨🏽💻 \NC man technologist medium skin tone \NC \NR
246\NC 1F468 1F3FD 200D 1F4BC \NC \MyEmoji 👨🏽💼 \NC man office worker medium skin tone \NC \NR
247\NC 1F468 1F3FD 200D 1F527 \NC \MyEmoji 👨🏽🔧 \NC man mechanic medium skin tone \NC \NR
248\NC 1F468 1F3FD 200D 1F52C \NC \MyEmoji 👨🏽🔬 \NC man scientist medium skin tone \NC \NR
249\NC 1F468 1F3FD 200D 1F680 \NC \MyEmoji 👨🏽🚀 \NC man astronaut medium skin tone \NC \NR
250\stoptabulate
251
252\stopsubject
253
254\usemodule[fontsemoji]
255
256\startsubject[title=Snippets]
257
258\start
259
260 \definedfont[seguiemj*seguiemjcl @ 32pt]
261
262 \ShowEmojiSnippets
263 [family man light skin tone woman dark skin tone girl medium skin tone boy medium skin tone]
264
265 \vskip1ex
266
267 \ShowEmojiSnippetsOverlay
268 [family man light skin tone woman dark skin tone girl medium skin tone boy medium skin tone]
269
270 \vskip1ex
271
272 \ShowEmojiGlyphs
273 [family man light skin tone woman dark skin tone girl medium skin tone boy medium skin tone]
274
275\stop
276
277\stopsubject
278
279\startsubject[title=Using \type{\ShowEmoji[man]}]
280
281\start
282
283 \MyEmoji
284
285 \ShowEmoji[man]
286
287\stop
288
289\stopsubject
290
291\startsubject[title=Recoloring Seguiem]
292
293\start
294
295\definecolor[emojired] [r=.4]
296\definecolor[emojiblue] [b=.4]
297\definecolor[emojiyellow][y=.4]
298\definecolor[emojigray] [s=.5,t=.5,a=1]
299
300\definefontcolorpalette
301 [emojired]
302 [emojired,emojigray]
303
304\definefontcolorpalette
305 [emojiblue]
306 [emojiblue,emojigray]
307
308\definefontcolorpalette
309 [emojiyellow]
310 [emojiyellow,emojigray]
311
312\definefontfeature[seguiemjr][default][ccmp=yes,dist=yes,colr=emojired]
313\definefontfeature[seguiemjb][default][ccmp=yes,dist=yes,colr=emojiblue]
314\definefontfeature[seguiemjy][default][ccmp=yes,dist=yes,colr=emojiyellow]
315
316\definefont[MyColoredEmojiR][seguiemj*seguiemjr @ 80pt]
317\definefont[MyColoredEmojiB][seguiemj*seguiemjb @ 80pt]
318\definefont[MyColoredEmojiY][seguiemj*seguiemjy @ 80pt]
319
320\MyColoredEmojiR
321 \resolvedemoji{man}
322 \resolvedemoji{woman}
323 \resolvedemoji{baby}
324
325\vskip24pt
326
327\MyColoredEmojiB
328 \resolvedemoji{triangular ruler}
329 \resolvedemoji{rabbit face}
330 \resolvedemoji{family man woman girl boy}
331
332\vskip24pt
333
334\MyColoredEmojiY
335 \resolvedemoji{triangular ruler}
336 \resolvedemoji{rabbit face}
337 \resolvedemoji{family man woman girl boy}
338
339\stop
340
341\page
342
343\starttyping
344\definecolor [emojired] [r=.4]
345\definecolor [emojigray] [s=.5,t=.5,a=1]
346
347\definefontcolorpalette
348 [emojired]
349 [emojired,emojigray]
350
351\definefontfeature
352 [seguiemjr]
353 [default]
354 [ccmp=yes,dist=yes,colr=emojired]
355
356\definefont
357 [MyColoredEmojiR]
358 [seguiemj*seguiemjr @ 80pt]
359
360\MyColoredEmojiR
361 \emoji{man}
362 \emoji{woman}
363 \emoji{baby}
364\stoptyping
365
366\stopsubject
367
368\startsubject[title=Pallet \type{\ShowEmojiPalettes[1]}]
369
370{\MyEmoji \ShowEmojiPalettes[1]}
371
372\stopsubject
373
374\stopdocument
375 |