更新 fontspec 中的字体

更新 fontspec 中的字体

我想实现展示 TUG 日历的 TeX 字体

实现涉及使用 Phaeton 等特殊字体。我已经安装了它。但我没有得到与给定相同的输出。我只得到了文本,而不是图像。

这是我使用的代码(在给出的页面中也是相同的):

% save this document as example.tex
% compile this document with: xelatex -shell-escape example.tex
\documentclass{article}

% Needed to make sure your page dimensions
% are the same as that of the calendar.
\usepackage[landscape,a4paper,margin=0pt]{geometry}
\parindent=0pt

\usepackage[svgnames]{xcolor}
\usepackage{tikz}

\usepackage{microtype}

\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Phaeton}

\def\swash#1{{\addfontfeatures{RawFeature=+swsh}#1}}
\def\nfrac#1{{\addfontfeatures{RawFeature=+frac}#1}}
\def\cword#1{{\addfontfeatures{RawFeature=+dlig}#1}}
\def\cwrdb#1{{\addfontfeatures{RawFeature={+dlig,+ss01}}#1}}
\def\baner#1{{\addfontfeatures{RawFeature=+ss02}#1}}

\def\orn{\char"E047\char"E048\hspace{-2pt}\raisebox{20.5pt}{\rotatebox{180}{\char"E047\char"E048}}\hspace{-2pt}}
\def\Orn{\orn\orn\orn\orn\orn\orn\orn\orn}
\def\ORn{\Orn\Orn\Orn\Orn\Orn\Orn\Orn\Orn}
\def\ORN{\ORn\ORn\ORn\ORn\ORn\ORn\Orn\Orn}

\definecolor{bgcolour}{gray}{0.9}

\pagestyle{empty}

\begin{document}
\null\vfill
\centering\begin{tikzpicture}
    % Clipping
    \clip (-0.5\textwidth+1cm,-0.5\textheight) rectangle (0.5\textwidth-1cm,0.5\textheight-2cm) ;
    % Background.
    \draw (0,0) node {\fontsize{48}{20.5}\selectfont\begin{minipage}{1.5\textwidth}\color{bgcolour}\ORN\ORN\end{minipage}} ;
    % Logo.
    \draw (0,0) node {\fontsize{120}{120}\selectfont\baner{6=======6}} ;
    \draw (0,0) node {\fontsize{48}{48}\selectfont\TeX\ \cword{AND} Friends} ;
    \draw (0,1.8) node {PROFESSOR DONALD KNUTH'S WORLD FAMOUS} ;
    \draw (0,4.5) node {\fontsize{120}{120}\selectfont\char"E00E} ;
    \draw (-4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut THE MOST POWERFUL\strut\ PROGRAM\strut}\medskip\hrule\end{minipage}} ;
    \draw (4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut OF ITS KIND AVAILABLE\strut\ TODAY\strut}\medskip\hrule\end{minipage}} ;
    \draw (0,-1.5) node {\fontsize{16}{16}\selectfont\swash{Available for all major operating systems.}} ;
    \draw (0,-5) node {\begin{minipage}{13cm}\fontsize{16}{20}\selectfont\cword{with} SUPPORT \cword{for} UNICODE \cword{and} OPENTYPE FONTS, \TeX\ \cword{and} ITS DERIVATIVES ARE \cword{the} IDEAL SOLUTION \cword{for} ALL YOUR TWENTY-FIRST CENTURY TYPESETTING NEEDS. \cword{the} IN-BUILT MACRO LANGUAGE ALLOWS YOU TO CUSTOMISE IT TO YOUR NEEDS. \cword{with} AUTOMATIC INDEXING \cword{and} REFERENCING, \cword{and} UNPARALLELED MATHEMATICS SUPPORT, THERE'S NO REASON NOT TO SWITCH TODAY.\end{minipage}} ;
    \draw (0,-9) node {\fontsize{120}{120}\selectfont\baner{1====1}} ;
    \draw (0,-8.7) node {ESTABLISHED 1978} ;
\end{tikzpicture}\par
\vfill\null
\end{document}

我不得不将整个文档作为 MWE,因为现在我不知道错误在哪里。我已经通过命令行并使用 TexMaker 进行了编译。这是我得到的输出:

在此处输入图片描述

答案1

看起来你下载了一款名为 Phaeton 的免费字体(可能来自fonts101.com)而不是名为 Phaeton 的商业字体(veer.com)它们完全不一样,也没有相同的特征。

相关内容