일반 글꼴(예: 기본 컴퓨터 현대 글꼴)에서는 아포스트로피 쉼표가 출력에 나타납니다. 하지만 아포스트로피로 Holden 글꼴을 사용하면 \setmainfont{Holden}
출력에 쉼표가 나타나지 않습니다.
내 코드는 -
\documentclass[12pt]{article}
\usepackage[a4paper,left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}
\usepackage{fontspec}
\usepackage[dvipsnames]{xcolor}
\usepackage[object=vectorian]{pgfornament} % also loads tikz
\setmainfont{Holden}
\tikzset{pgfornamentstyle/.style={draw = Periwinkle,
fill = SpringGreen}}
\usetikzlibrary{
positioning, % for left=of, above=of etc.
calc % for let syntax used in second example
}
\begin{document}
\begin{center}
\begin{tikzpicture}[
every node/.append style={inner sep=0},
node distance=5mm
]
\node [Black] (text){Vaijan's Honey};
\path
let
\p1=(text.south west),
\p2=(text.north east),
\n1={\x2-\x1}, % width of text node
\n2={\y2-\y1} % height of text node
in
% in all of the below some fraction of \n1 or \n2 is used to define the width of the ornaments
% set width of these ornaments to half the text node's width
node [anchor=north] (below) at (text.south) {\pgfornament[width=0.5*\n1,symmetry=c]{69}}
node [anchor=south] (above) at (text.north) {\pgfornament[width=0.5*\n1]{69}}
% use \n2 for ornament width here
node [rotate=-90, left=of text, anchor=north] (left) {\pgfornament[width=\n2]{46}}
node [rotate=90, right=of text, anchor=north] (right) {\pgfornament[width=\n2]{46}}
% and \n1 here
node [above=of above] (top) {\pgfornament[width=\n1]{71}}
node [below=of below] (bottom) {\pgfornament[width=\n1,symmetry=h]{71}}
% node [anchor=north] (top) at (text.north) {\pgfornament[width=\n1]{71}}
% node [anchor=south] (bottom) at (text.south) {\pgfornament[width=\n1,symmetry=h]{71}}
% and 25% of width for the corner ornaments
node [anchor=north west] at (top.north -| left.south) {\pgfornament[width=0.25*\n1]{63}}
node [anchor=north east] at (top.north -| right.south) {\pgfornament[width=0.25*\n1,symmetry=v]{63}}
node [anchor=south west] at (bottom.south -| left.south) {\pgfornament[width=0.25*\n1,symmetry=h]{63}}
node [anchor=south east] at (bottom.south -| right.south) {\pgfornament[width=0.25*\n1,symmetry=c]{63}}; % <- note the \path doesn't end until here
% draw frame
\draw [Blue] (current bounding box.south west) rectangle (current bounding box.north east);
\vspace{2cm};
\node [anchor=south] (bellowaddress1) at (below.south) {\pgfornament[width=0.10*\textwidth]{88}};
\setmainfont{Linux Biolinum O}
\tiny
\node [Brown, below, align=center] (bellowaddress3) at (bellowaddress1.south) {Md.Al-Helal, CSE, DU\\ 01515611989};
\node [anchor=south, below] (bellowaddress2) at (bellowaddress3.south) {\pgfornament[width=0.10*\textwidth]{88}};
\end{tikzpicture}
\end{center}
\end{document}
답변1
이 글꼴의 매핑이 완전히 정확하지 않은 것 같습니다. 로그에는 다음이 표시됩니다.
Missing character: There is no ’ in font [Holden.otf]/OT:mapping=tex-text;!
그러나 FontForge에서 볼 수 있듯이 문자가 존재합니다.
FontForge는 캐릭터의 이름을 보여줍니다 "quotesingle"
. 이는 \XeTeXglyphindex
문자를 인쇄하는 데 사용할 수 있는 인덱스 번호를 찾는 매크로에 사용할 수 있습니다 .
\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Holden.otf}
\begin{document}
The apostrophe is at position: \the\XeTeXglyphindex"quotesingle"
Printed: \XeTeXglyph83
\end{document}
여기서는 .otf
글꼴이 사용되지만 버전에서도 동일하게 작동합니다 .ttf
.
MWE에 적용:
\node [Black] (text){Vaijan\XeTeXglyph83 s Honey};
답변2
글꼴은 기본적으로 Ligatures=TeX
. 이 기능은 '
U+2019로 다시 매핑되지만 Holden 글꼴에는 해당 슬롯에 문자 모양이 없습니다. 반대로 표준 ASCII 위치의 아포스트로피는 곱슬입니다.
없이 글꼴을 로드하면 됩니다 Ligatures=TeX
.
\documentclass[12pt]{article}
\usepackage[a4paper,left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}
\usepackage{fontspec}
\usepackage[dvipsnames]{xcolor}
\usepackage[object=vectorian]{pgfornament} % also loads tikz
\newfontface{\holdenfont}{Holden}[
Path=./,
Extension=.otf,
Ligatures=,
]
\tikzset{pgfornamentstyle/.style={draw = Periwinkle,
fill = SpringGreen}}
\usetikzlibrary{
positioning, % for left=of, above=of etc.
calc % for let syntax used in second example
}
\begin{document}
\begin{center}
\begin{tikzpicture}[
every node/.append style={inner sep=0},
node distance=5mm
]
\node [Black] (text){\holdenfont Vaijan's Honey};
\path
let
\p1=(text.south west),
\p2=(text.north east),
\n1={\x2-\x1}, % width of text node
\n2={\y2-\y1} % height of text node
in
% in all of the below some fraction of \n1 or \n2 is used to define the width of the ornaments
% set width of these ornaments to half the text node's width
node [anchor=north] (below) at (text.south) {\pgfornament[width=0.5*\n1,symmetry=c]{69}}
node [anchor=south] (above) at (text.north) {\pgfornament[width=0.5*\n1]{69}}
% use \n2 for ornament width here
node [rotate=-90, left=of text, anchor=north] (left) {\pgfornament[width=\n2]{46}}
node [rotate=90, right=of text, anchor=north] (right) {\pgfornament[width=\n2]{46}}
% and \n1 here
node [above=of above] (top) {\pgfornament[width=\n1]{71}}
node [below=of below] (bottom) {\pgfornament[width=\n1,symmetry=h]{71}}
% node [anchor=north] (top) at (text.north) {\pgfornament[width=\n1]{71}}
% node [anchor=south] (bottom) at (text.south) {\pgfornament[width=\n1,symmetry=h]{71}}
% and 25% of width for the corner ornaments
node [anchor=north west] at (top.north -| left.south) {\pgfornament[width=0.25*\n1]{63}}
node [anchor=north east] at (top.north -| right.south) {\pgfornament[width=0.25*\n1,symmetry=v]{63}}
node [anchor=south west] at (bottom.south -| left.south) {\pgfornament[width=0.25*\n1,symmetry=h]{63}}
node [anchor=south east] at (bottom.south -| right.south) {\pgfornament[width=0.25*\n1,symmetry=c]{63}}; % <- note the \path doesn't end until here
% draw frame
\draw [Blue] (current bounding box.south west) rectangle (current bounding box.north east);
\vspace{2cm};
\node [anchor=south] (bellowaddress1) at (below.south) {\pgfornament[width=0.10*\textwidth]{88}};
\setmainfont{Linux Biolinum O}
\tiny
\node [Brown, below, align=center] (bellowaddress3) at (bellowaddress1.south) {Md.Al-Helal, CSE, DU\\ 01515611989};
\node [anchor=south, below] (bellowaddress2) at (bellowaddress3.south) {\pgfornament[width=0.10*\textwidth]{88}};
\end{tikzpicture}
\end{center}
\end{document}
기본 글꼴로 로드하지 않고 내 설정에 맞게 경로와 확장자를 지정했습니다(해당 글꼴이 내 시스템 글꼴을 방해하는 것을 원하지 않습니다).