Here, I introduce \varhash
and \varfhash
to be used in tandem (or for sans font, \sfvarhash
and \sfvarfhash
). I started with a \sffamily
f
to build things from there. In the last line, I overlay the two glyphs to see if they compare.
Since I use the current font for the f
, this answer will depend on the font chosen for the document. Bu the answer can be tailored to suit.
EDITED to provide both sans and roman versions.
\documentclass{article}
\usepackage{stackengine,graphicx}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][.5]{\mbox{%
\sbox{\foobox}{#2}%
\hskip\wd\foobox
\pdfsave
\pdfsetmatrix{1 0 #1 1}%
\llap{\usebox{\foobox}}%
\pdfrestore
}}
%%%%%% SF ITSHAPE VERSION
\def\sfvarfhash{%
\stackinset{c}{}{b}{1.5pt}{\rule{1.45ex}{\sfrlthk}\kern1pt}{%
\stackinset{c}{}{b}{3.7pt}{\rule{1.45ex}{\sfrlthk}\kern1pt}{%
\textsf{\itshape ff}%
}}%
}
\def\sfvarhash{%
\kern1pt%
\stackinset{c}{}{b}{1.5pt}{\rule{1.45ex}{\sfrlthk}\kern1pt}{%
\stackinset{c}{}{b}{3.7pt}{\rule{1.45ex}{\sfrlthk}\kern1pt}{%
\slantbox[.2]{\mysfrule\kern2pt\mysfrule\kern2.3pt}%
}}%
\kern1pt%
}
\def\sfrlthk{.17ex}
\def\mysfrule{\rule{\sfrlthk}{1.4ex}}
%%%%%% RM ITSHAPE VERSION
\def\varfhash{%
\kern -1.5pt%
\stackinset{c}{}{c}{-1.7pt}{\kern1pt\rule{1.7ex}{\rlthk}}{%
\stackinset{c}{}{c}{1.7pt}{\kern1pt\rule{1.7ex}{\rlthk}}{%
\kern2pt\itshape ff\kern2pt%
}}%
}
\def\varhash{%
\kern-.5pt%
\stackinset{c}{}{c}{-1.7pt}{\kern1pt\rule{1.7ex}{\rlthk}}{%
\stackinset{c}{}{c}{1.7pt}{\kern1pt\rule{1.7ex}{\rlthk}}{%
\kern2pt\kern.2pt\slantbox[.2]{\myrule\kern2.4pt\myrule}\kern.2pt\kern2pt%
}}%
\kern1pt%
}
\def\rlthk{.13ex}
\def\myrule{\rule[-.33ex]{\rlthk}{1.8ex}}
\begin{document}
\sfvarfhash\sfvarhash\par
\ooalign{z\sfvarhash x\cr z\sfvarfhash x} overlaid\par
\varfhash\varhash\par
\ooalign{z\varhash x\cr z\varfhash x} overlaid\par
\par \# for comparison
\end{document}
And here is a version with \int
instead of f
, which allows more flexibility with the placement of the horizontal bars:
\documentclass{article}
\usepackage{stackengine,graphicx}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][.5]{\mbox{%
\sbox{\foobox}{#2}%
\hskip\wd\foobox
\pdfsave
\pdfsetmatrix{1 0 #1 1}%
\llap{\usebox{\foobox}}%
\pdfrestore
}}
%%%%%% RM ITSHAPE VERSION
\def\varfhash{%
\kern-4.1pt%
\stackinset{c}{}{c}{-1.4pt}{\kern1pt\rule{1.6ex}{\rlthk}}{%
\stackinset{c}{}{c}{1.4pt}{\kern1pt\rule{1.6ex}{\rlthk}}{%
\kern3.1pt${\int}\kern-4pt{\int}$\kern2.1pt%
}}%
\kern-2.2pt%
}
\def\varhash{%
\kern-.7pt%
\stackinset{c}{}{c}{-1.4pt}{\kern.5pt\rule{1.6ex}{\rlthk}}{%
\stackinset{c}{}{c}{1.4pt}{\kern.5pt\rule{1.6ex}{\rlthk}}{%
\kern2.4pt\slantbox[.09]{\myrule\kern2.1pt\myrule}\kern2.4pt%
}}%
\kern.6pt%
}
\def\rlthk{.16ex}
\def\myrule{\rule[-.23ex]{\rlthk}{1.6ex}}
\begin{document}
$\varfhash\varhash$\par
$x\varfhash y\varhash z$\par
\ooalign{z\varhash x\cr z\varfhash x} overlaid\par
\par \# for comparison
\end{document}