Last active
August 29, 2015 14:01
-
-
Save wspr/4e5957b72c306ab63816 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper]{article} | |
\usepackage{fontspec,multicol} | |
\usepackage[margin=2cm]{geometry} | |
\begin{document} | |
\ExplSyntaxOn | |
\DeclareDocumentCommand \fontrange { m m m +m } | |
{ | |
\group_begin: | |
\cs_set:Npn \__typeset:nnn ##1 ##2 ##3 {#4} | |
\fontspec{#1} | |
\int_step_inline:nnnn {#2} {1} {#3} | |
{ | |
\iffontchar\font ##1\relax | |
\__typeset:nnn {##1} { \int_to_Hex:n {##1} } { \char ##1 \relax } | |
\fi | |
} | |
\group_end: | |
} | |
\ExplSyntaxOff | |
\begin{multicols}{5} | |
\fontrange{xits-math.otf}{1}{"FFFFF} | |
{ \texttt{\small U+#2}:\quad #3\par} | |
% #1 = glyph slot, decimal | |
% #2 = glyph slot, hex | |
% #3 = char | |
\end{multicols} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment