junicode: 2.204 -> 2.205
Changelog: https://github.com/psb1558/Junicode-font/releases/tag/v2.205 Significant changes throughout TeX style files, including new style file for VF font versions. The latter seems to rely on system font search a lot more than the existing one, requiring a lot more patching.
This commit is contained in:
parent
e4b8d803b6
commit
2b9af27096
5 changed files with 227 additions and 35 deletions
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "junicode";
|
||||
version = "2.204";
|
||||
version = "2.205";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/psb1558/Junicode-font/releases/download/v${version}/Junicode_${version}.zip";
|
||||
hash = "sha256-n0buIXc+xjUuUue2Fu1jnlTc74YvmrDKanfmWtM4bFs=";
|
||||
hash = "sha256-/9vkc6Ic3xyfpKEE64dBpoVM/gcRsLnAcrZWie9lNa4=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "doc" "tex" "texdoc" ];
|
||||
|
@ -14,9 +14,11 @@ stdenvNoCC.mkDerivation rec {
|
|||
patches = [ ./tex-font-path.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace TeX/Junicode.sty \
|
||||
substituteInPlace TeX/junicode.sty \
|
||||
--replace '@@@opentype_path@@@' "$out/share/fonts/opentype/" \
|
||||
--replace '@@@truetype_path@@@' "$out/share/fonts/truetype/"
|
||||
substituteInPlace TeX/junicodevf.sty \
|
||||
--replace '@@@truetype_path@@@' "$out/share/fonts/truetype/"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -28,11 +30,13 @@ stdenvNoCC.mkDerivation rec {
|
|||
|
||||
install -Dm 444 -t $doc/share/doc/${pname}-${version} docs/*.pdf
|
||||
|
||||
install -Dm 444 -t $tex/tex/latex/Junicode TeX/Junicode.sty
|
||||
install -Dm 444 -t $tex/tex/latex/junicode TeX/junicode.sty
|
||||
install -Dm 444 -t $tex/tex/latex/junicodevf TeX/junicodevf.{sty,lua}
|
||||
|
||||
install -Dm 444 -t $texdoc/doc/tex/latex/Junicode TeX/*.pdf
|
||||
install -Dm 444 -t $texdoc/doc/tex/latex/junicode TeX/junicode-package.pdf
|
||||
install -Dm 444 -t $texdoc/doc/tex/latex/junicodevf TeX/junicodevf-package.pdf
|
||||
|
||||
cat >$texdoc/doc/tex/latex/Junicode/nix-font-note.txt <<EOF
|
||||
cat >$texdoc/doc/tex/latex/junicode/nix-font-note.txt <<EOF
|
||||
The style file is patched to refer directly to the corresponding
|
||||
font files; thus, contrary to the documentation, the fonts
|
||||
do *not* have to be installed globally.
|
||||
|
|
46
pkgs/data/fonts/junicode/test-vf.tex
Normal file
46
pkgs/data/fonts/junicode/test-vf.tex
Normal file
|
@ -0,0 +1,46 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage{junicodevf}
|
||||
|
||||
\begin{document}
|
||||
\begin{enumerate}
|
||||
\item {\jBold Bold}
|
||||
\item {\jBoldItalic BoldItalic}
|
||||
\item {\jCond Cond}
|
||||
\item {\jCondItalic CondItalic}
|
||||
\item {\jCondLight CondLight}
|
||||
\item {\jCondLightItalic CondLightItalic}
|
||||
\item {\jCondMedium CondMedium}
|
||||
\item {\jCondMediumItalic CondMediumItalic}
|
||||
\item {\jExp Exp}
|
||||
\item {\jExpItalic ExpItalic}
|
||||
\item {\jExpBold ExpBold}
|
||||
\item {\jExpBoldItalic ExpBoldItalic}
|
||||
\item {\jExpMedium ExpMedium}
|
||||
\item {\jExpMediumItalic ExpMediumItalic}
|
||||
\item {\jExpSmbold ExpSmbold}
|
||||
\item {\jExpSmboldItalic ExpSmboldItalic}
|
||||
\item {\jItalic Italic}
|
||||
\item {\jLight Light}
|
||||
\item {\jLightItalic LightItalic}
|
||||
\item {\jMedium Medium}
|
||||
\item {\jMediumItalic MediumItalic}
|
||||
\item {\jRegular Regular}
|
||||
\item {\jSmbold Smbold}
|
||||
\item {\jSmboldItalic SmboldItalic}
|
||||
\item {\jSmCond SmCond}
|
||||
\item {\jSmCondItalic SmCondItalic}
|
||||
\item {\jSmCondLight SmCondLight}
|
||||
\item {\jSmCondLightItalic SmCondLightItalic}
|
||||
\item {\jSmCondMedium SmCondMedium}
|
||||
\item {\jSmCondMediumItalic SmCondMediumItalic}
|
||||
\item {\jSmExp SmExp}
|
||||
\item {\jSmExpItalic SmExpItalic}
|
||||
\item {\jSmExpBold SmExpBold}
|
||||
\item {\jSmExpBoldItalic SmExpBoldItalic}
|
||||
\item {\jSmExpMedium SmExpMedium}
|
||||
\item {\jSmExpMediumItalic SmExpMediumItalic}
|
||||
\item {\jSmExpSmbold SmExpSmbold}
|
||||
\item {\jSmExpSmboldItalic SmExpSmboldItalic}
|
||||
\end{enumerate}
|
||||
\end{document}
|
|
@ -1,6 +1,6 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage[fonttype=@fonttype@]{Junicode}
|
||||
\usepackage[fonttype=@fonttype@]{junicode}
|
||||
|
||||
\begin{document}
|
||||
\begin{enumerate}
|
||||
|
@ -18,16 +18,16 @@
|
|||
\item {\jExpBoldItalic ExpBoldItalic}
|
||||
\item {\jExpMedium ExpMedium}
|
||||
\item {\jExpMediumItalic ExpMediumItalic}
|
||||
\item {\jExpSmbold ExpSmbold}
|
||||
\item {\jExpSmboldItalic ExpSmboldItalic}
|
||||
\item {\jExpSmBold ExpSmBold}
|
||||
\item {\jExpSmBoldItalic ExpSmBoldItalic}
|
||||
\item {\jItalic Italic}
|
||||
\item {\jLight Light}
|
||||
\item {\jLightItalic LightItalic}
|
||||
\item {\jMedium Medium}
|
||||
\item {\jMediumItalic MediumItalic}
|
||||
\item {\jRegular Regular}
|
||||
\item {\jSmbold Smbold}
|
||||
\item {\jSmboldItalic SmboldItalic}
|
||||
\item {\jSmBold SmBold}
|
||||
\item {\jSmBoldItalic SmBoldItalic}
|
||||
\item {\jSmCond SmCond}
|
||||
\item {\jSmCondItalic SmCondItalic}
|
||||
\item {\jSmCondLight SmCondLight}
|
||||
|
@ -40,7 +40,7 @@
|
|||
\item {\jSmExpBoldItalic SmExpBoldItalic}
|
||||
\item {\jSmExpMedium SmExpMedium}
|
||||
\item {\jSmExpMediumItalic SmExpMediumItalic}
|
||||
\item {\jSmExpSmbold SmExpSmbold}
|
||||
\item {\jSmExpSmboldItalic SmExpSmboldItalic}
|
||||
\item {\jSmExpSmBold SmExpSmBold}
|
||||
\item {\jSmExpSmBoldItalic SmExpSmBoldItalic}
|
||||
\end{enumerate}
|
||||
\end{document}
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
let
|
||||
texliveWithJunicode = texliveBasic.withPackages (p: [ p.xetex junicode ]);
|
||||
|
||||
texTest = { tex, fonttype }:
|
||||
lib.attrsets.nameValuePair "${tex}-${fonttype}" (
|
||||
runCommand "junicode-test-${tex}-${fonttype}.pdf" {
|
||||
texTest = { package, tex, fonttype, file }:
|
||||
lib.attrsets.nameValuePair "${package}-${tex}-${fonttype}" (
|
||||
runCommand "${package}-test-${tex}-${fonttype}.pdf"
|
||||
{
|
||||
nativeBuildInputs = [ texliveWithJunicode ];
|
||||
inherit tex fonttype;
|
||||
inherit tex fonttype file;
|
||||
} ''
|
||||
substituteAll ${./test.tex} test.tex
|
||||
substituteAll $file test.tex
|
||||
HOME=$PWD $tex test.tex
|
||||
cp test.pdf $out
|
||||
'');
|
||||
|
@ -19,5 +20,16 @@ builtins.listToAttrs (
|
|||
(lib.attrsets.cartesianProductOfSets {
|
||||
tex = [ "xelatex" "lualatex" ];
|
||||
fonttype = [ "ttf" "otf" ];
|
||||
package = [ "junicode" ];
|
||||
file = [ ./test.tex ];
|
||||
})
|
||||
++
|
||||
[
|
||||
(texTest {
|
||||
package = "junicodevf";
|
||||
fonttype = "ttf";
|
||||
tex = "lualatex";
|
||||
file = ./test-vf.tex;
|
||||
})
|
||||
]
|
||||
)
|
||||
|
|
|
@ -4,14 +4,16 @@ 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 f46b376..c73e6f8 100644
|
||||
--- a/TeX/Junicode.sty
|
||||
+++ b/TeX/Junicode.sty
|
||||
@@ -136,8 +136,17 @@
|
||||
diff --git a/TeX/junicode.sty b/TeX/junicode.sty
|
||||
index 83bd45d..8fe671c 100644
|
||||
--- a/TeX/junicode.sty
|
||||
+++ b/TeX/junicode.sty
|
||||
@@ -208,7 +208,14 @@
|
||||
|
||||
\RequirePackage{fontspec}
|
||||
\defaultfontfeatures{Ligatures=TeX, Extension=.\junicode@fonttype}
|
||||
|
||||
-\defaultfontfeatures{Ligatures=TeX}
|
||||
+
|
||||
+\def\junicode@fonttype@otf{otf}
|
||||
+
|
||||
+\ifx\junicode@fonttype\junicode@fonttype@otf
|
||||
|
@ -19,18 +21,146 @@ index f46b376..c73e6f8 100644
|
|||
+\else
|
||||
+ \def\junicode@fontpath{@@@truetype_path@@@}
|
||||
+\fi
|
||||
+
|
||||
\setmainfont
|
||||
[Renderer = HarfBuzz,
|
||||
|
||||
\ifxetex
|
||||
\typeout{\junicode@regstylename}
|
||||
@@ -219,6 +226,7 @@
|
||||
ItalicFont = *-\junicode@italstylename,
|
||||
BoldFont = *-\junicode@boldstylename,
|
||||
BoldItalicFont = *-\junicode@boldstylename Italic,
|
||||
+ Path = \junicode@fontpath,
|
||||
Numbers = {\junicode@figurealign,\junicode@figurestyle},
|
||||
SmallCapsFeatures = {Letters=SmallCaps},
|
||||
UprightFont = *-\junicode@regstylename,
|
||||
@@ -152,6 +161,7 @@
|
||||
\newcommand{\junicode@newfont}[2]{
|
||||
\newfontface#1{#2}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Path = \junicode@fontpath,
|
||||
]{Junicode}
|
||||
\fi
|
||||
\ifluatex
|
||||
@@ -230,6 +238,7 @@
|
||||
ItalicFont = *-\junicode@italstylename,
|
||||
BoldFont = *-\junicode@boldstylename,
|
||||
BoldItalicFont = *-\junicode@boldstylename Italic,
|
||||
+ Path = \junicode@fontpath,
|
||||
]{Junicode}
|
||||
\fi
|
||||
|
||||
@@ -242,6 +251,7 @@
|
||||
#3
|
||||
Numbers = {\junicode@figurealign,\junicode@figurestyle},
|
||||
SmallCapsFeatures = {Letters=SmallCaps},
|
||||
+ Path = \junicode@fontpath,
|
||||
]
|
||||
}
|
||||
\fi
|
||||
@@ -252,6 +262,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 7148668..acebe82 100644
|
||||
--- a/TeX/junicodevf.lua
|
||||
+++ b/TeX/junicodevf.lua
|
||||
@@ -148,7 +148,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 c01ccaf..07a99ad 100644
|
||||
--- a/TeX/junicodevf.sty
|
||||
+++ b/TeX/junicodevf.sty
|
||||
@@ -168,11 +168,13 @@ mkwidthcommands(wdindex, adjustment)}}
|
||||
|
||||
% DECLARE THE FONTS
|
||||
|
||||
-\setmainfont{Junicode VF}[
|
||||
- ItalicFont = {*-Italic},
|
||||
- BoldFont = {*},
|
||||
- BoldItalicFont = {*-Italic},
|
||||
+\setmainfont{JunicodeVF-Roman}[
|
||||
+ ItalicFont = {JunicodeVF-Italic},
|
||||
+ BoldFont = {JunicodeVF-Roman},
|
||||
+ BoldItalicFont = {JunicodeVF-Italic},
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
Numbers = {\junicodevf@figurealign,\junicodevf@figurestyle},
|
||||
\MainDef,
|
||||
UprightFeatures = {\MainRegDef
|
||||
@@ -188,6 +190,8 @@ mkwidthcommands(wdindex, adjustment)}}
|
||||
\newcommand*{\junicodevf@newfont}[4]{
|
||||
\setfontface#1{#2}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
Numbers = {\junicodevf@figurealign,\junicodevf@figurestyle},
|
||||
SmallCapsFont = {*},
|
||||
SmallCapsFeatures = {Letters=SmallCaps},
|
||||
@@ -200,43 +204,59 @@ mkwidthcommands(wdindex, adjustment)}}
|
||||
|
||||
% ENLARGED FACES
|
||||
|
||||
-\setfontface\EnlargedOne{JunicodeVF}[
|
||||
+\setfontface\EnlargedOne{JunicodeVF-Roman}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLAOneSizeDef
|
||||
]
|
||||
|
||||
\setfontface\EnlargedOneItalic{JunicodeVF-Italic}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLAOneSizeDef
|
||||
]
|
||||
|
||||
-\setfontface\EnlargedTwo{JunicodeVF}[
|
||||
+\setfontface\EnlargedTwo{JunicodeVF-Roman}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLATwoSizeDef
|
||||
]
|
||||
|
||||
\setfontface\EnlargedTwoItalic{JunicodeVF-Italic}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLATwoSizeDef
|
||||
]
|
||||
|
||||
-\setfontface\EnlargedThree{JunicodeVF}[
|
||||
+\setfontface\EnlargedThree{JunicodeVF-Roman}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLAThreeSizeDef
|
||||
]
|
||||
|
||||
\setfontface\EnlargedThreeItalic{JunicodeVF-Italic}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLAThreeSizeDef
|
||||
]
|
||||
|
||||
-\setfontface\EnlargedFour{JunicodeVF}[
|
||||
+\setfontface\EnlargedFour{JunicodeVF-Roman}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLAFourSizeDef
|
||||
]
|
||||
|
||||
\setfontface\EnlargedFourItalic{JunicodeVF-Italic}[
|
||||
Renderer = HarfBuzz,
|
||||
+ Extension = .ttf,
|
||||
+ Path = @@@truetype_path@@@,
|
||||
\ENLAFourSizeDef
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue