Template talk:Text art
Latest comment: 10 August 2021 by Flyingpig in topic Use of non-ASCII characters
Use of non-ASCII characters
I suppose this is briefly mentioned by the w:Text art link in w:ASCII art#Unicode, but should the use of non-ASCII characters be explicitly discouraged? It seems that certain characters (e.g. U+25B6 aka ▶) have different widths depending on the reader's monospaced font which can offset lines in a Template:Text art.
For example, consider the text art in Data-at-rest encryption#Basic principle. This looks fine with certain fonts but not with others (in Firefox) [1]:
Font family | Screenshot | Looks fine? |
---|---|---|
DejaVu Sans Mono | https://i.imgur.com/6nqF2Wg.png | Yes |
Noto Sans Mono | https://i.imgur.com/qgFuirc.png | No |
Terminus | https://i.imgur.com/tOpINdC.png | Yes |
Ubuntu Mono | https://i.imgur.com/7pRmCTY.png | No |
-- Flyingpig (talk) 00:35, 10 August 2021 (UTC)
- Just for reference, this topic was briefly touched upon in Talk:Dm-crypt/Encrypting an entire system#Why the ASCII diagrams?.
- I'm not sure if calling them "non-ASCII characters" would be correct. Translated pages using this template could contain non-ASCII characters.
- -- nl6720 (talk) 09:44, 10 August 2021 (UTC)
- Yes, that's a good point. I can't think of a better name at the moment though. Maybe something along the lines of "non-ASCII characters that are not used for textual information". -- Flyingpig (talk) 17:37, 10 August 2021 (UTC)
- Alternatively, we might try setting font-family or even @font-face for this template. — Lahwaacz (talk) 11:34, 10 August 2021 (UTC)
- I'm not extremely familiar with CSS, but
@font-face
sounds good since the font can be loaded from a "remote server". I believe DejaVu Sans Mono is the default monospaced font for Firefox (if ttf-dejavu is installed) and it seems fine as mentioned above, so maybe this should be the specified font family if@font-face
is to be used. - -- Flyingpig (talk) 17:37, 10 August 2021 (UTC)
- I'm not extremely familiar with CSS, but