Request for monospaced font

User avatar
Blaise170
ALPS キーボード

03 May 2018, 19:20

Would love to have a monospaced font to use on the forums. I know that the code feature exists, but since it only displays the first 10 lines or so, it's not very useful. Not sure the difficulty in adding a new font to select, but...
Last edited by Blaise170 on 03 May 2018, 20:46, edited 1 time in total.

cml

03 May 2018, 19:27

I use Liberation Mono. It prints ilL1| in a different enough manner so works for me.

User avatar
webwit
Wild Duck

03 May 2018, 20:04

It doesn't show as a button in the editor, but try the 'monospace' tag.

cml

03 May 2018, 20:09

Oh I think I misunderstood your request, sorry for intruding... :D

User avatar
ramnes
ПБТ НАВСЕГДА

03 May 2018, 20:23

let's try this
one space
two spaces
three spaces
four spaces

.
.
.
.
.
.


It works, but it doesn't handle front spaces nor multiple spaces.

User avatar
Blaise170
ALPS キーボード

03 May 2018, 20:31

ramnes wrote: let's try this
one space
two spaces
three spaces
four spaces

.
.
.
.
.
.


It works, but it doesn't handle front spaces nor multiple spaces.
Hmmm... I wonder if BBCode requires non-breaking spaces to display monospace correctly.

User avatar
webwit
Wild Duck

03 May 2018, 20:36

There's also 'fixed' and 'financial'.

User avatar
Blaise170
ALPS キーボード

03 May 2018, 20:40

Fixed:
0
 1
  2
   3
    4
     5
Financial:
0
 1
  2
   3
    4
     5

User avatar
Blaise170
ALPS キーボード

03 May 2018, 20:42

Nice.
┌──────────┬──────────┬──────────┐
│  Alpha   │   Beta   │  Gamma   │
├──────────┼──────────┼──────────┤
│ 1        │ 2        │ 3        │
│ AB       │ CD       │ EF       │
│ QWE      │ RTY      │ UIO      │
│ XXXX     │ WWWW     │ MMMM     │
│        A │        B │        C │
└──────────┴──────────┴──────────┘

User avatar
webwit
Wild Duck

03 May 2018, 20:48

Monospace: <span style="font-family: monospace">{TEXT}</span>

Fixed: <pre style="font-size: 10px; line-height: 16px; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word">{TEXT}</pre>

Financial: <pre style="font-size: 10px; line-height: 16px; overflow: auto">{TEXT}</pre>

So 'monospace' collapses white space and wraps lines if it doesn't fit (it behaves like non-monospace text), 'fixed' preserves white space and wraps lines if it doesn't fit, and financial goes all the way: it preserves white-space and doesn't wrap until it encounters a newline, and shows a horizontal scrollbar if it doesn't fit.

User avatar
Blaise170
ALPS キーボード

03 May 2018, 20:51

Very useful information. Thanks for that webwit. I just updated a chart in my GB thread and now it actually looks somewhat nice. Looks like in general I'll be using
 to format any tables I make (the PHP table generator is extremely hard to use, FYI).

Post Reply

Return to “Deskthority talk”