Jun 27, 2024
Material Design Icons in LaTeX
\documentclass[margin=0pt, 12pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, calc}
\usepackage{fontspec}
\usepackage{unicode-math}
\setromanfont{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}[Ligatures=NoCommon]
\setmathfont{TeX Gyre Termes Math}
\newfontfamily\MaterialDesignIcons{Material Design Icons}[
% Extension = .ttf,
% UprightFont = materialdesignicons-webfont,
Renderer = OpenType
]
\DeclareTextFontCommand{\texticon}{\MaterialDesignIcons\color{gray!80}}
\begin{document}
\begin{tikzpicture}
\path (0, 0) node[align=center](Bank){{\Huge\texticon{ ^^^^^^0f0070 }} \\ Bank};
\path (8, 0) node[align=center](User){{\Huge\texticon{ ^^^^^^0f0004 }} \\ User};
\path (4, 2.4) node[align=center](Oracle){{\Huge\texticon{ ^^^^^^0f0ce3 }} \\ Oracle};
\path (4, 6) node[align=center](Blockchain){{\Huge\texticon{ ^^^^^^0f0d1c }} \\ Blockchain};
\draw[<-] ($(Bank.east) + (0, 0.1)$) -- ($(User.west) + (0, 0.1)$)
node[midway, above] {(1) What is my balance?};
\draw[->] ($(Bank.east) - (0, 0.1)$) -- ($(User.west) - (0, 0.1)$)
node[midway, below] {(2) Your balance is 100.};
\draw[->] (Oracle.north) -- (Blockchain.south)
node[midway, right, align=center] {(3) I confirm the user's \\ balance is 100.};
\end{tikzpicture}
\end{document}
See also: https://tex.stackexchange.com/questions/714299/lualatex-bugged-out-with-unicode-in-supplementary-planes