答案1
假设 P 的弧度是字母高度的一半。
\documentclass{article}
\makeatletter
\DeclareRobustCommand{\PHP}{%
\begingroup
\leavevmode\,\vphantom{P}%
\dimen\z@=.5\fontcharht\font`P\relax
\dimen\tw@=0.33333\dimen\z@
\ooalign{%
\raisebox{\dimexpr\dimen\z@+2\dimen\[email protected]}{\rule{\fontcharwd\font`P}{0.4pt}}\cr
\raisebox{\dimexpr\dimen\z@+\dimen\[email protected]}{\rule{\fontcharwd\font`P}{0.4pt}}\cr
P\cr
}%
\,\endgroup
}
\makeatother
\begin{document}
\PHP\quad\textbf{\PHP}\quad{\Large\PHP}
100\PHP
\end{document}
答案2
如果需要调整十字线之间的垂直空间,那么可以这样做:
\documentclass[10pt]{article}
\usepackage{stackengine}
\newcommand\pesos{%
\stackengine{-1.38ex}{P}{\stackengine{-1.2ex}{$-$}{$-$}{O}{c}{F}{F}{S}}{O}{c}{F}{T}{S}}
\begin{document}
35\pesos ~\sffamily 35\pesos ~\ttfamily 35\pesos
\end{document}
如果使用\scriptstyle=
符号就足够了,则可以避免使用嵌套堆栈,但代价是\scalebox
:
\documentclass[10pt]{article}
\usepackage{stackengine,graphicx}
\newcommand\pesos{\stackengine{-.85ex}{P}{\scalebox{1.15}[1]{$\scriptstyle=$}}{O}{c}{F}{T}{S}}
\begin{document}
35\pesos ~\sffamily 35\pesos ~\ttfamily 35\pesos
\end{document}