From 30ffef8ba34f6e7322252a49479540445e0fc933 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 14 Mar 2020 16:26:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A8=D1=80=D0=B8=D1=84=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xespdfont.sty | 59 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/xespdfont.sty b/xespdfont.sty index 479e97f..3e3cb0b 100644 --- a/xespdfont.sty +++ b/xespdfont.sty @@ -27,13 +27,21 @@ \newcommand{\XESPDfontSetBaseLineStretch}{% \renewcommand{\baselinestretch}{\XESPDfontBaseLineStretch}} -\newcommand{\XESPDfontShape}{\slshape} + +\RequirePackage{ifxetex} +\ifxetex + \RequirePackage{fontspec} + \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} +\fi + +\newcommand{\XESPDfontShape}{\rmfamily} \newcommand{\XESPDfontIIsize}{\fontsize{8pt}{10pt}} -\newcommand{\XESPDfontIIIsize}{\fontsize{10pt}{12pt}} -\newcommand{\XESPDfontVsize}{\fontsize{16pt}{18pt}} -\newcommand{\XESPDfontVIIsize}{\fontsize{20pt}{23pt}} -\newcommand{\XESPDfontXsize}{\fontsize{32pt}{38pt}} +\newcommand{\XESPDfontIIIsize}{\fontsize{10pt}{13pt}} +\newcommand{\XESPDfontIVsize}{\fontsize{12pt}{16pt}} +\newcommand{\XESPDfontVsize}{\fontsize{14pt}{18pt}} +\newcommand{\XESPDfontVIIsize}{\fontsize{18pt}{24pt}} +\newcommand{\XESPDfontXsize}{\fontsize{32pt}{40pt}} \newcommand{\XESPDfontII}{% \XESPDfontSetBaseLineStretch @@ -41,6 +49,9 @@ \newcommand{\XESPDfontIII}{% \XESPDfontSetBaseLineStretch \XESPDfontIIIsize\selectfont\XESPDfontShape} +\newcommand{\XESPDfontIV}{% + \XESPDfontSetBaseLineStretch + \XESPDfontIVsize\selectfont\XESPDfontShape} \newcommand{\XESPDfontV}{% \XESPDfontSetBaseLineStretch \XESPDfontVsize\selectfont\XESPDfontShape} @@ -51,6 +62,40 @@ \XESPDfontSetBaseLineStretch \XESPDfontXsize\selectfont\XESPDfontShape} -\newcommand{\XESPDfontTabHead}{\XESPDfontIII} -\newcommand{\XESPDfontTabBody}{\XESPDfontIII} +\RequirePackage{ifxetex} +\ifxetex + \RequirePackage[T2A]{fontenc} + \newfontfamily\gostafont{GOST A} + \newcommand{\XESPDfontGostIII}{% + \XESPDfontSetBaseLineStretch\XESPDfontIIIsize\gostafont} + \newcommand{\XESPDfontGostIV}{% + \XESPDfontSetBaseLineStretch\XESPDfontIVsize\gostafont} + \setsansfont[Mapping=tex-text]{Arial} + \setromanfont[Mapping=tex-text]{XITS} + \setmainfont[Ligatures=TeX]{Times New Roman} + \newfontfamily\cyrillicfont{Times New Roman}[Script=Cyrillic] + \setmonofont[Mapping=tex-text]{Pragmata Pro Mono} + \newfontfamily\listingsfont{Pragmata Pro Mono Bold} + \newfontfamily\listingsfontinline{Pragmata Pro Mono Bold} + \RequirePackage{amsmath} + \DeclareSymbolFont{letters}{\encodingdefault}{\rmdefault}{m}{it} + \usepackage{unicode-math} + \setmathfont{XITS Math} +\else + \RequirePackage[T2A]{fontenc} + \RequirePackage{mathptmx} + \RequirePackage{gostfont} + \RequirePackage[defaultroman]{mstimes} + \RequirePackage[defaultsans]{msarial} + \RequirePackage[defaultmono]{pragmatapro} + \newcommand{\XESPDfontGostIII}{% + \XESPDfontSetBaseLineStretch + \XESPDfontIIIsize\selectfont\GostBFont} + \newcommand{\XESPDfontGostIV}{% + \XESPDfontSetBaseLineStretch + \XESPDfontIVsize\selectfont\GostBFont} +\fi + +\newcommand{\XESPDfontTabHead}{\XESPDfontV} +\newcommand{\XESPDfontTabBody}{\XESPDfontV}