On 25-03-31 18:37, Ihor Radchenko wrote:
We should really provide some way to select fonts for lualatex and
xelatex automatically...
`x-list-fonts' should give us a way to check if a given font is
available and we can assemble a list of common fonts that might be used.
`font-has-char-p' can check if all the characters in latex
document can be displayed using that font.
Then, we can select the first available font from that list. Or at least
the font that covers most of the characters.
About the "list of common fonts that might be used", I did an extensive
search for an unrelated topic. I came up with this list:
- DejaVu Sans Mono
- Hack
- Cascadia Mono
- JuliaMono
- JetBrains Mono
- FreeMono
- Source Code Pro
- Iosevka Comfy Fixed
- Unifont
- Agave
Those are the fonts that:
- support UNICODE box-drawing characters, block characters, and a few
others such as arrows and squares,
- are mono-spaced
- are mono-spaced for those UNICODEs.
This list was assembled for the Uniline package, on Melpa and here:
https://github.com/tbanel/uniline
Uniline-mode aims at drawing diagrams and sketches in text files, pretty
much like Artist-mode or Picture-mode, but with UNICODEs instead of ASCII.
: ╭───────────────────────╮
: ╷123╭────▶┤ hundred and something │
: ╰───╯ ╰───────────────────────╯
: ╭────▶──╮A╷
: ╭───╮ ┏━━━┓ ╔═══╗ │ ╰─╯
: 0╶─→┤ 1 ┝━━━▶┫ 2 ┣═══▷╣ 3 ╟──●────▶──╮B╷
: ╰───╯ ┗━┯━┛ ╚═╤═╝ │ ╰─╯
: ╰────←───╯ ╰────▶──╮C╷
: ╰─╯
: ╔══════════╗
: ║ 1 ║ ▐▀▀▀▀▀▀▀▀▜
: ║ ╭─────╫───╮ ◁──▷ ▐ 3 ▐
: ╚════╪═════╝ 2 │ ▐▄▄▄▄▄▄▄▄▟
: ╰─────────╯
images/boxes-arrows.png
Have fun
Thierry