You can use pict2e
. I took the parameters from pigpen.mf
.
\documentclass{article}
\usepackage{pigpen,pict2e}
\DeclareRobustCommand{\pigpenver}{%
\begingroup\pigpenfont
\setlength{\unitlength}{1em}%
\begin{picture}(1,1)
\linethickness{0.09\unitlength}
\roundcap
\polyline(0.16667,0.16667)(0.16667,0.83333)
\polyline(0.83333,0.16667)(0.83333,0.83333)
\end{picture}%
\endgroup
}
\DeclareRobustCommand{\pigpenhor}{%
\begingroup\pigpenfont
\setlength{\unitlength}{1em}%
\begin{picture}(1,1)
\roundcap
\linethickness{0.09\unitlength}
\polyline(0.16667,0.16667)(0.83333,0.16667)
\polyline(0.16667,0.83333)(0.83333,0.83333)
\end{picture}%
\endgroup
}
\begin{document}
X{\pigpenfont E}X\pigpenhor\pigpenver X
{\pigpenfont E}
\pigpenhor{\pigpenfont BC}
\pigpenver{\pigpenfont BC}
\end{document}

A possibly better interface:
\documentclass{article}
\usepackage{pigpen,pict2e,xparse}
\NewDocumentCommand{\pigpenver}{}{%
\begingroup\pigpenfont
\setlength{\unitlength}{1em}%
\begin{picture}(1,1)
\linethickness{0.09\unitlength}
\roundcap
\polyline(0.16667,0.16667)(0.16667,0.83333)
\polyline(0.83333,0.16667)(0.83333,0.83333)
\end{picture}%
\endgroup
}
\NewDocumentCommand{\pigpenhor}{}{%
\begingroup\pigpenfont
\setlength{\unitlength}{1em}%
\begin{picture}(1,1)
\roundcap
\linethickness{0.09\unitlength}
\polyline(0.16667,0.16667)(0.83333,0.16667)
\polyline(0.16667,0.83333)(0.83333,0.83333)
\end{picture}%
\endgroup
}
\ExplSyntaxOn
\NewDocumentCommand{\pp}{m}
{
\group_begin:
\pigpenfont
\tl_map_inline:nn { #1 }
{
\str_case:nnF { ##1 }
{
{h}{\pigpenhor}
{v}{\pigpenver}
}
{##1}
}
\group_end:
}
\ExplSyntaxOff
\begin{document}
\pp{ABCDEFGHIJKLMNOPQRSTUVWXYZhv}
\pp{hLUCASv}
\verb|\pp{h}| $\to$ \pp{h}
\verb|\pp{v}| $\to$ \pp{v}
\end{document}

Just to show the result is as expected (maybe up to some pixels), here's what I get from
\pp{E}\llap{\color{red}\pp{h}}
\pp{h}\llap{\color{red}\pp{E}}

If you need the symbol are at the baseline (the font designer decided to have them raised), change the definition of \pp
in the last code to
\NewDocumentCommand{\pp}{m}
{
\group_begin:
\pigpenfont
\raisebox{-0.16667em}
{
\tl_map_inline:nn { #1 }
{
\str_case:nnF { ##1 }
{
{h}{\pigpenhor}
{v}{\pigpenver}
}
{##1}
}
}
\group_end:
}
so the input
ABC\pp{hLUCASv}DEF
would produce

You can also define a different syntax for the symbols; I use the order “right-bottom-left-top”, so rb
means “right-bottom” filled and “left-top” empty. This way, you don't need to remember the letter corresponding to a given combination.
\documentclass{article}
\usepackage{pigpen,pict2e,xparse}
\NewDocumentCommand{\pigpenver}{}{%
\begingroup\pigpenfont
\setlength{\unitlength}{1em}%
\begin{picture}(1,1)
\linethickness{0.09\unitlength}
\roundcap
\polyline(0.16667,0.16667)(0.16667,0.83333)
\polyline(0.83333,0.16667)(0.83333,0.83333)
\end{picture}%
\endgroup
}
\NewDocumentCommand{\pigpenhor}{}{%
\begingroup\pigpenfont
\setlength{\unitlength}{1em}%
\begin{picture}(1,1)
\roundcap
\linethickness{0.09\unitlength}
\polyline(0.16667,0.16667)(0.83333,0.16667)
\polyline(0.16667,0.83333)(0.83333,0.83333)
\end{picture}%
\endgroup
}
\ExplSyntaxOn
\NewDocumentCommand{\pp}{m}
{% 'l b r t' is the order
\group_begin:
\pigpenfont
\raisebox{-0.16667em}
{
\clist_map_inline:nn { #1 }
{
\str_case:nn { ##1 }
{
{bt}{\pigpenhor}
{lr}{\pigpenver}
{br}{A}
{lbr}{B}
{lb}{C}
{brt}{D}
{lbrt}{E}
{lbt}{F}
{rt}{G}
{lrt}{H}
{lt}{I}
}
}
}
\group_end:
}
\ExplSyntaxOff
\begin{document}
ABC\pp{lr,br,lrt,lt,bt}DEF
\end{document}
