4

Some keyboards provide a key with the € currency symbol (U+20AC), but the Linux Biolinum Keyboard font is missing it, though:

  • it does provide some currency symbols,
  • Linux Libertine does provide this symbol,

as shown by the following MCE:

\documentclass{article}
\usepackage{libertine}
\begin{document}
€ \LKey{uni00A5} \LKey{uni0024} \LKey{uni00A3} \fbox{\LKey{uni20AC}}
\end{document}

enter image description here

Is there a way (even a poor man's one) to get the € in Linux Biolinum Keyboard?

Edit

BTW, the same deficiency is affecting the Libertinus fonts fork of Linux Libertine.

Denis Bitouzé
  • 9,652
  • 4
  • 27
  • 85

3 Answers3

9

Bad hack: use the keyboard centered dot, cover the dot with a white larger centered dot and print the Euro symbol above it.

\documentclass{article}
\usepackage{libertine}
\usepackage{xcolor,graphicx}

\newcommand{\LKeyEuro}{{% \ooalign{% \LKey{uni00B7}\cr % the keyboard centered dot \hidewidth % a centered dot in white to mask off \sffamily \kern-0.06em \raisebox{-0.03ex}{\scalebox{1.1}{\color{white}\char"B7}}% \hidewidth\cr \hidewidth % the Euro sign \sffamily \kern-0.075em \raisebox{0.125ex}{\scalebox{0.75}{€}}% \hidewidth\cr }% }}

\begin{document}

\LKeyEuro\ \LKey{uni00A5} \LKey{uni0024} \LKey{uni00A3}

\end{document}

enter image description here

egreg
  • 1,121,712
  • 3
    This bad hack works nicely! Except if the background color of the page isn't white :) And https://tex.stackexchange.com/q/559826/18401 leaves little hope... – Denis Bitouzé May 04 '22 at 05:33
  • 3
    @DenisBitouzé I’m wondering why the authors of the font didn’t think to add a blank key shape. – egreg May 04 '22 at 07:23
  • 1
    @DenisBitouzé Another strategy could be to produce with standalone a picture of one key, edit the PDF to remove the character inside and use it as above. – egreg May 04 '22 at 15:24
4

Linux Biolinum Keyboard is licensed under the GPL, so you can modify the font to add the Euro glyph using an application such as FontForge. You should be able to copy an existing character to create the key-shaped border. If another variant of Linux Biolinum includes a Euro glyph, you can combine the existing glyph with the border. The FontForge editor works like other vector graphics applications, with nodes and handles for adjusting the shapes. Design with FontForge offers helpful instructions.

3

There is a new package on ctan: circledtext. Something to play with and postpone the boring things. See yourself:

\documentclass[24pt, parskip=full]{scrartcl}

\usepackage{libertine} \usepackage{circledtext, xcolor} \circledtextset{boxtype=OO, boxlinewidth=0.5pt, charf=\sffamily, charshrink=0.5, yscale=1.5, width=2em, resize=real} \newcommand{\clb}[1]{\circledtext*{#1}} \newcommand{\cls}[1]{\circledtext{#1}} \begin{document}

\cls{T} \cls{y} \cls{p} \cls{e},\clb{:} \cls{€}

\clb{T} \clb{y} \clb{p} \clb{e},\cls{:} \clb{€}

Or even:

\circledtextset{boxtype=O, boxlinewidth=0.5pt, charf=\sffamily\bfseries, charshrink=0.5, yscale=1.5, width=2em, boxfill=red!50, charcolor=white, resize=real}

\circledtext{€}

\end{document} % Local Variables: % TeX-engine: luatex % End:

Circledtext picture

Keks Dose
  • 30,892