From 5b81f695c760bef2635ddd62b865292509c81d52 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 8 Aug 2022 20:58:40 +0000 Subject: yfonts-otf (8aug22) git-svn-id: svn://tug.org/texlive/trunk@64075 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/yfonts-otf/oldgerm-otf.sty | 93 ++-------------------- .../texmf-dist/tex/latex/yfonts-otf/yfonts-otf.sty | 54 +++++++++++++ 2 files changed, 60 insertions(+), 87 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/yfonts-otf/yfonts-otf.sty (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/yfonts-otf/oldgerm-otf.sty b/Master/texmf-dist/tex/latex/yfonts-otf/oldgerm-otf.sty index e58caaeb909..57a513f88be 100644 --- a/Master/texmf-dist/tex/latex/yfonts-otf/oldgerm-otf.sty +++ b/Master/texmf-dist/tex/latex/yfonts-otf/oldgerm-otf.sty @@ -1,89 +1,8 @@ \NeedsTeXFormat{LaTeX2e}[2019-01-01] -\def\fileversion{0.30} -\def\filedate{2022-07-18} -\ProvidesPackage{oldgerm-otf}[\filedate\space\fileversion] -\RequirePackage{iftex}[2019-10-24] -\newif\ifOGotf@oldumlaut -\newif\ifOGotf@gothlongs -\DeclareOption{oldumlaut}{\OGotf@oldumlauttrue} -\DeclareOption{gothvarlongs}{\OGotf@gothlongstrue} -\ProcessOptions -\iftutex - \RequirePackage{fontspec} - \ifOGotf@gothlongs - \newfontfamily\gothfamily{ygoth.otf}% - [Alternate=1, RawFeature=+hist;+rlig;+liga;+dlig;+hlig;+alig;+calt] - \else - \newfontfamily\gothfamily{ygoth.otf}% - [RawFeature=+hist;+rlig;+liga;+dlig;+hlig;+alig;+calt] - \fi - \ifOGotf@oldumlaut - \newfontfamily\swabfamily{yswab.otf}% - [Alternate=0, RawFeature=+hist;+rlig;+liga;+dlig;+hlig;+calt] - \newfontfamily\frakfamily{yfrak.otf}% - [Alternate=0, RawFeature=+hist;+rlig;+liga;+dlig;+hlig;+calt] - \else - \newfontfamily\swabfamily{yswab.otf}% - [RawFeature=+hist;+rlig;+liga;+dlig;+hlig;+calt] - \newfontfamily\frakfamily{yfrak.otf}% - [RawFeature=+hist;+rlig;+liga;+dlig;+hlig;+calt] - \fi - \DeclareTextFontCommand{\textgoth}{\gothfamily} - \DeclareTextFontCommand{\textswab}{\swabfamily} - \DeclareTextFontCommand{\textfrak}{\frakfamily} - \DeclareTextCommand{\Jvar}{TU}{\textfrak{\char"E960}} - \DeclareTextCommand{\etc}{TU}{\textfrak{\char"E961}} - \ifluatex - % This function adds character U+200B (zero width space) when an "s" - % is followed by a TeX space (glue or penalty or a disc) - % so that it is not turned into a long "s" by the "calt" feature. - \directlua{% - function add_eow_char (head) - local eow = 0x200B - local GLUE = node.id("glue") - local GLYPH = node.id("glyph") - local PENALTY = node.id("penalty") - local DISC = node.id("disc") - local Longs = - {[string.byte("s")] = true} - local new_node = node.new - local copy_node = node.copy - local insert_node_after = node.insert_after - % Perserve TeX's kerning - head = node.kerning(head) - % wordbd is the zero width node to add - local wordbd = new_node(GLYPH) - for item in node.traverse_id(GLYPH, head) do - if Longs[item.char] then - local fid = item.font - % Check if char U+200B is available in the current font: - % code borrowed from file "luaotfload-auxiliary.lua". - local fontdata = fonts.hashes.identifiers[fid] - if fontdata and fontdata.characters[eow] then - local nxt = item.next - if not nxt or nxt.id == GLUE or nxt.id == PENALTY - or nxt.id == DISC then - wordbd.font = fid - wordbd.char = eow - wordbd.attr = item.attr - insert_node_after(head,item,copy_node(wordbd)) - end - end - end - end - end - } - % Register in callback "kerning". - \AtBeginDocument{% - \directlua{ - luatexbase.add_to_callback("kerning", add_eow_char, - "add_end_of_word_boundary"); - }% - } - \fi -\else - \PackageWarning{oldgerm-otf}% - {This package requires LuaTeX or XeTeX engines. - With other engines, consider using `oldgerm.sty', reported} -\fi +\PackageWarning{yfonts-otf}{% + The "oldgerm-otf.sty" file has been renamed\MessageBreak + to "yfonts-otf.sty". Please consider using\MessageBreak + this name instead. Reported} +% +\input{yfonts-otf.sty} \endinput diff --git a/Master/texmf-dist/tex/latex/yfonts-otf/yfonts-otf.sty b/Master/texmf-dist/tex/latex/yfonts-otf/yfonts-otf.sty new file mode 100644 index 00000000000..b283dd5d9cb --- /dev/null +++ b/Master/texmf-dist/tex/latex/yfonts-otf/yfonts-otf.sty @@ -0,0 +1,54 @@ +\NeedsTeXFormat{LaTeX2e}[2019-01-01] +\def\fileversion{0.40} +\def\filedate{2022-08-08} +\ProvidesPackage{yfonts-otf}[\filedate\space\fileversion] +\RequirePackage{iftex}[2019-10-24] +\newif\ifYHf@oldumlaut +\newif\ifYHf@gothlongs +\DeclareOption{oldumlaut}{\YHf@oldumlauttrue} +\DeclareOption{varumlaut}{\YHf@oldumlauttrue} +\DeclareOption{gothvarlongs}{\YHf@gothlongstrue} +\ProcessOptions +\iftutex + \RequirePackage{fontspec} + \newopentypefeature{Style}{longs}{+ss11} + \ifYHf@gothlongs + \newfontfamily\gothfamily{ygoth.otf}% + [Extension = .otf, + Alternate=1, + Ligatures=TeX, RawFeature=+ss11;+rlig;+liga;+hlig] + \else + \newfontfamily\gothfamily{ygoth.otf}% + [Extension = .otf, + Ligatures=TeX, RawFeature=+ss11;+rlig;+liga;+hlig] + \fi + \ifYHf@oldumlaut + \newfontfamily\swabfamily{yswab.otf}% + [Extension = .otf, + Alternate=0, + Ligatures=TeX, RawFeature=+ss11;+rlig;+liga] + \newfontfamily\frakfamily{yfrak}% + [Extension = .otf, + Alternate=0, + Ligatures=TeX, RawFeature=+ss11;+rlig;+liga] + \else + \newfontfamily\swabfamily{yswab.otf}% + [Extension = .otf, + Ligatures=TeX, RawFeature=+ss11;+rlig;+liga] + \newfontfamily\frakfamily{yfrak.otf}% + [Extension = .otf, + Ligatures=TeX, RawFeature=+ss11;+rlig;+liga] + \fi + \DeclareTextFontCommand{\textgoth}{\gothfamily} + \DeclareTextFontCommand{\textswab}{\swabfamily} + \DeclareTextFontCommand{\textfrak}{\frakfamily} + \DeclareTextCommand{\Jvar}{TU}{\textfrak{\char"E960}} + \DeclareTextCommand{\etc}{TU}{\textfrak{\char"E961}} + \DeclareTextCommand{\longs}{TU}{\char"200C\char"17F} + \DeclareTextCommand{\shorts}{TU}{s\char"200C} +\else + \PackageWarning{yfonts-otf}% + {This package requires LuaTeX or XeTeX engines. + With other engines, consider using `yfonts.sty', reported} +\fi +\endinput -- cgit v1.2.3