字体管理问题

字体管理问题

我正在尝试在 Peter Wilson 的例子中重新创建一个标题,ftp://tug.org/tex-archive/info/latex-samples/TitlePages/titlepages.pdf我下载了免费字体 Bergamo,还购买了字体 Mona Lisa FS 并安装了它们,但不知何故我无法访问这些字体。似乎5基点5毫升不是访问它们的正确方法。我看到字体安装在 Font Book (Mac) 上,但如何访问它们?

\documentclass[12pt,twoside,openright]{memoir}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{xcolor} 
\usepackage[paperwidth=4.25in, paperheight=6.875in,bindingoffset=.75in]{geometry}
\newlength{\drop}% for my convenience
%% select a (FontSite) font by its font family ID
\newcommand*{\FSfont}[1]{\fontencoding{T1}\fontfamily{#1}\selectfont}
%% if you don’t have the FontSite fonts either \renewcommand*{\FSfont}[1]{}
%% or use your own choice of family.
%% select a (TeX Font) font by its font family ID
\newcommand*{\TXfont}[1]{\fontencoding{T1}\fontfamily{#1}\selectfont}
%% Generic publisher’s logo
\newcommand*{\plogo}{\fbox{$\mathcal{PL}$}}
\newcommand*{\titleAT}{\begingroup% Anatomy of a Typeface
\FSfont{5bp} % FontSite Bergamo (Bembo)
\drop=0.1\textheight
\vspace*{\drop}
\rule{\textwidth}{1pt}\par
\vspace{2pt}\vspace{-\baselineskip}
\rule{\textwidth}{0.4pt}\par
\vspace{0.5\drop}
\centering
\textcolor{red}{
{\FSfont{5ml} % FontSite Mona Lisa
\Huge Lectures}\\[0.5\baselineskip]
{\FSfont{5ml}
\Large On}\\[0.75\baselineskip]
{\FSfont{5ml}
\Huge Microeconomics}}\par
\vspace{0.25\drop}
\rule{0.3\textwidth}{0.4pt}\par
\vspace{\drop}
{\Large \scshape S\'ergio O. Parreiras }\par
\vfill
{\large \textcolor{red}{\plogo}}\\[0.5\baselineskip]
{\large\scshape the publisher}\par
\vspace*{\drop}
\endgroup}
%%% BEGIN DOCUMENT
\begin{document}
\titleAT
\let\cleardoublepage\clearpage
\mainmatter
BOOK TEXT GOES HERE
\end{document}

答案1

我不再有 Mona Lisa 字体,但这里有一个修改 Peter Wilson 使用的字体以外的字体代码的示例。代码更简单fontspec

% xetex or luatex
\documentclass[12pt,twoside,openright]{memoir}
\usepackage{fontspec,xcolor}
\newfontface\bmb{Bembo Book MT Pro}[Numbers=OldStyle]% or use \setmainfont if the main matter will be in Bembo
\newfontface\had{LTC Hadriano Pro Stone Cut}
\usepackage[a5paper,bindingoffset=.75in]{geometry}
\newlength{\drop}
%% Generic publisher’s logo
\newcommand*{\plogo}{\fbox{$\mathcal{PL}$}}
\newcommand*{\titleAT}{\begingroup% Anatomy of a Typeface
\bmb
\drop=0.1\textheight
\vspace*{\drop}
\rule{\textwidth}{1pt}\par
\vspace{2pt}\vspace{-\baselineskip}
\rule{\textwidth}{0.4pt}\par
\vspace{0.5\drop}
\centering
\textcolor{red}{
{\had\Huge Lectures}\\[0.5\baselineskip]
{\had\Large on}\\[0.75\baselineskip]
{\had\Huge Microeconomics}}\par
\vspace{0.25\drop}
\rule{0.3\textwidth}{0.4pt}\par
\vspace{\drop}
{\Large\scshape Sérgio O. Parreiras }\par
\vfill
{\large\textcolor{red}{\plogo}}\\[0.5\baselineskip]
{\large\scshape the publisher}\par
\vspace*{\drop}
\endgroup}
\begin{document}
\frontmatter
\thispagestyle{empty}
\titleAT
\let\cleardoublepage\clearpage
\mainmatter
BOOK TEXT GOES HERE
\end{document}

代码输出

这个想法很简单,就是删除\usepackage[T1]{fontenc}并替换宏\newcommand*{\FSfont}[1]{\fontencoding{T1}\fontfamily{#1}\selectfont},并使用\newfontface来自的命令fontspec

相关内容