From 940d8120811c2364959efce4108bfdbb6147079d Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 15 Dec 2023 12:11:00 +0100 Subject: added onum to italic and bolditalic and lnum+tnum to all files; archived fonttable --- archive/fonttable.lua | 36 ++++++++++++++++++++++++++++++++++++ archive/fonttable.tex | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 archive/fonttable.lua create mode 100644 archive/fonttable.tex (limited to 'archive') diff --git a/archive/fonttable.lua b/archive/fonttable.lua new file mode 100644 index 0000000..d50a314 --- /dev/null +++ b/archive/fonttable.lua @@ -0,0 +1,36 @@ +-- the following is adapted from https://tex.stackexchange.com/a/380780 +ft = {} +function ft.print_glyphs(maxCols,maxChars) + local id = font.current() + local fnt = font.getfont(id) + local col = 1 + local maxU4 = 15*(16^3+16^2+16+1) + a = {} + for k, v in pairs(fnt.characters) do + a [#a + 1] = k + end + table.sort(a) + for i, k in ipairs(a) do + if i >= maxChars then break end + if col == 1 then + if k > maxU4 then + tex.sprint(string.format("U+%06x", k)) + else + tex.sprint(string.format("U+%04x", k)) + end + tex.sprint("&") + end + if (i) then + tex.sprint(string.format([[\char%i]], k)) + else + tex.sprint("~") + end + if col == maxCols then + tex.sprint([[\\\cline{2-]] .. maxCols+1 .. "} ") + col = 1 + else + tex.sprint("&") + col = col + 1 + end + end +end diff --git a/archive/fonttable.tex b/archive/fonttable.tex new file mode 100644 index 0000000..5e90225 --- /dev/null +++ b/archive/fonttable.tex @@ -0,0 +1,33 @@ +% arara: lualatex +% arara: lualatex +% arara: lualatex +\documentclass[12pt]{article} +\usepackage{fontspec} + +\usepackage{array} +\usepackage{longtable} +\usepackage{latexcolors} + +\usepackage{luacode} +\luadirect{require("fonttable.lua")} + +\setmainfont{Old Standard} + +\title{\textsc{Old Standard}} +\author{Font Table} +\date{} + +\begin{document} +\maketitle + +\color{cinnamon} + +\begin{longtable}{>{\color{gray}\ttfamily\footnotesize}r| + *{10}{>{\color{black}}p{1.5em}|}} +\cline{2-11} +\endhead + +\luadirect{ft.print_glyphs(10,65463)} \\ \cline{2-11} +\end{longtable} + +\end{document} \ No newline at end of file -- cgit v1.2.3