-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc-fonts-han-sans-jp.saty
54 lines (48 loc) · 1.24 KB
/
doc-fonts-han-sans-jp.saty
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
@require: stdjabook
@require: lipsum/lipsum
let inconsolata-block-text =
'<
+p{\lipsum(1);}
+p{\wagahai(1);}
+p{\wagahai(2);}
>
let add-inline-fil ib = ib ++ inline-fil
let-block ctx +show-font fontname =
let header-ctx =
ctx
|> set-font-size 14pt
|> set-paragraph-margin 30pt 0pt
in
let font-ctx =
ctx
|> set-font Latin (fontname, 1.0, 0.0)
|> set-font Kana (fontname, 0.88, 0.0)
|> set-font HanIdeographic (fontname, 0.88, 0.0)
in
let fontname-bb =
fontname
|> embed-string
|> read-inline header-ctx
|> add-inline-fil
|> line-break true true header-ctx
in
let example-bb =
inconsolata-block-text
|> read-block font-ctx
in
fontname-bb +++ example-bb
in
document (|
title = {\SATySFi;-fonts-han-sans-jp};
author = {Naoki Kaneko};
show-title = true;
show-toc = false;
|) '<
+show-font(`fonts-han-sans-jp:HanSansJP-ExtraLight`);
+show-font(`fonts-han-sans-jp:HanSansJP-Light`);
+show-font(`fonts-han-sans-jp:HanSansJP-Normal`);
+show-font(`fonts-han-sans-jp:HanSansJP-Regular`);
+show-font(`fonts-han-sans-jp:HanSansJP-Medium`);
+show-font(`fonts-han-sans-jp:HanSansJP-Bold`);
+show-font(`fonts-han-sans-jp:HanSansJP-Heavy`);
>