[Tex/LaTex] How to get the Peso sign (₱) in LaTeX

symbolsunicode

I'm looking for a way to include a Philippine Peso sign (Unicode code point 0x20B1) in a LaTeX document. Using the textcomp package (as shipped with the base latex distribution) in conjunction with times, I get like this:

picture of \textpeso

when what I want is this:

Best Answer

This assumes that the arc of the P is half the height of the letter.

\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\tw@-0.4pt}{\rule{\fontcharwd\font`P}{0.4pt}}\cr
    \raisebox{\dimexpr\dimen\z@+\dimen\tw@-0.2pt}{\rule{\fontcharwd\font`P}{0.4pt}}\cr
    P\cr
  }%
  \,\endgroup
}
\makeatother

\begin{document}

\PHP\quad\textbf{\PHP}\quad{\Large\PHP}

100\PHP

\end{document}

enter image description here