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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
Upstream style file relies on font files being present on the system
globally. This is not quite how Nix usually does thing, so this patch
changes the style file to instead look fonts up in hardcoded
locations, which are later patched up to refer to the package outputs,
thus ensuring the style always uses the fonts packaged with it.
diff --git a/TeX/junicode.sty b/TeX/junicode.sty
index 3f80068..af3e3ba 100644
--- a/TeX/junicode.sty
+++ b/TeX/junicode.sty
@@ -211,7 +211,14 @@
\RequirePackage{fontspec}
\defaultfontfeatures{Ligatures=TeX, Extension=.\junicode@fonttype}
-\defaultfontfeatures{Ligatures=TeX}
+
+\def\junicode@fonttype@otf{otf}
+
+\ifx\junicode@fonttype\junicode@fonttype@otf
+ \def\junicode@fontpath{@@@opentype_path@@@}
+\else
+ \def\junicode@fontpath{@@@truetype_path@@@}
+\fi
\ifxetex
\typeout{\junicode@regstylename}
@@ -222,6 +229,7 @@
ItalicFont = *-\junicode@italstylename,
BoldFont = *-\junicode@boldstylename,
BoldItalicFont = *-\junicode@boldstylename Italic,
+ Path = \junicode@fontpath,
]{Junicode}
\fi
\ifluatex
@@ -233,6 +241,7 @@
ItalicFont = *-\junicode@italstylename,
BoldFont = *-\junicode@boldstylename,
BoldItalicFont = *-\junicode@boldstylename Italic,
+ Path = \junicode@fontpath,
]{Junicode}
\fi
@@ -245,6 +254,7 @@
#3
Numbers = {\junicode@figurealign,\junicode@figurestyle},
SmallCapsFeatures = {Letters=SmallCaps},
+ Path = \junicode@fontpath,
]
}
\fi
@@ -255,6 +265,7 @@
#3
Numbers = {\junicode@figurealign,\junicode@figurestyle},
SmallCapsFeatures = {Letters=SmallCaps},
+ Path = \junicode@fontpath,
]
}
\fi
diff --git a/TeX/junicodevf.lua b/TeX/junicodevf.lua
index 9c58f79..6ddcb55 100644
--- a/TeX/junicodevf.lua
+++ b/TeX/junicodevf.lua
@@ -118,7 +118,7 @@ function mkfontcommands()
romfontcmd = "jRegular"
italfontcmd = "jItalic"
end
- tex.print("\\junicodevf@newfont{\\" .. romfontcmd .. "}{JunicodeVF}{\\" .. defcmd .. "}{\\" .. defsizecmd .. "}")
+ tex.print("\\junicodevf@newfont{\\" .. romfontcmd .. "}{JunicodeVF-Roman}{\\" .. defcmd .. "}{\\" .. defsizecmd .. "}")
tex.print("\\junicodevf@newfont{\\" .. italfontcmd .. "}{JunicodeVF-Italic}{\\" .. defcmd .. "}{\\" .. defsizecmd .. "}")
end
end
diff --git a/TeX/junicodevf.sty b/TeX/junicodevf.sty
index da987d0..4475add 100644
--- a/TeX/junicodevf.sty
+++ b/TeX/junicodevf.sty
@@ -132,10 +132,12 @@ mkmainfontcommand(style_idx, weight_option, weight_adjust, width_option, width_a
% Set the main font, then the alternate styles. It appears that
% the fonts aren't embedded in the PDF unless actually used.
-\setmainfont{JunicodeVF}[
- ItalicFont = {*-Italic},
- BoldFont = {*},
- BoldItalicFont = {*-Italic},
+\setmainfont{JunicodeVF-Roman}[
+ ItalicFont = {JunicodeVF-Italic},
+ BoldFont = {JunicodeVF-Roman},
+ BoldItalicFont = {JunicodeVF-Italic},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
Renderer = {\junicodevf@renderer},
Numbers = {\junicodevf@figurealign,\junicodevf@figurestyle},
\MainDef,
@@ -152,6 +154,8 @@ mkmainfontcommand(style_idx, weight_option, weight_adjust, width_option, width_a
\newcommand*{\junicodevf@newfont}[4]{
\setfontface#1{#2}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
Numbers = {\junicodevf@figurealign,\junicodevf@figurestyle},
SmallCapsFont = {*},
SmallCapsFeatures = {Letters=SmallCaps},
@@ -164,43 +168,60 @@ mkmainfontcommand(style_idx, weight_option, weight_adjust, width_option, width_a
% ENLARGED FACES
-\setfontface\EnlargedOne{JunicodeVF}[
+\setfontface\EnlargedOne{JunicodeVF-Roman}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLAOneSizeDef
]
\setfontface\EnlargedOneItalic{JunicodeVF-Italic}[
Renderer = {\junicodevf@renderer},
+ Renderer = HarfBuzz,
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLAOneSizeDef
]
-\setfontface\EnlargedTwo{JunicodeVF}[
+\setfontface\EnlargedTwo{JunicodeVF-Roman}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLATwoSizeDef
]
\setfontface\EnlargedTwoItalic{JunicodeVF-Italic}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLATwoSizeDef
]
-\setfontface\EnlargedThree{JunicodeVF}[
+\setfontface\EnlargedThree{JunicodeVF-Roman}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLAThreeSizeDef
]
\setfontface\EnlargedThreeItalic{JunicodeVF-Italic}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLAThreeSizeDef
]
-\setfontface\EnlargedFour{JunicodeVF}[
+\setfontface\EnlargedFour{JunicodeVF-Roman}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLAFourSizeDef
]
\setfontface\EnlargedFourItalic{JunicodeVF-Italic}[
Renderer = {\junicodevf@renderer},
+ Extension = .ttf,
+ Path = @@@truetype_path@@@,
\ENLAFourSizeDef
]
|