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.

3
  • Not satisfactory, but the only thing I can think of is to create a small image in the style of the other currency symbols, and use that.
    – Ingmar
    May 3, 2022 at 14:02
  • A quick mockup: i.ibb.co/c62n6Lm/euro.png
    – Ingmar
    May 3, 2022 at 14:12
  • @Ingmar Hey, not that bad! :) I'll adopt this workaround if nothing less dirty comes up ;) May 3, 2022 at 14:16

3 Answers 3

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

3
  • 3
    This bad hack works nicely! Except if the background color of the page isn't white :) And tex.stackexchange.com/q/559826/18401 leaves little hope... May 4, 2022 at 5:33
  • 3
    @DenisBitouzé I’m wondering why the authors of the font didn’t think to add a blank key shape.
    – egreg
    May 4, 2022 at 7: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 4, 2022 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.

1
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .