Star Army

Star ArmyⓇ is a landmark of forum roleplaying. Opened in 2002, Star Army is like an internet clubhouse for people who love roleplaying, art, and worldbuilding. Anyone 18 or older may join for free. New members are welcome! Use the "Register" button below.

Note: This is a play-by-post RPG site. If you're looking for the tabletop miniatures wargame "5150: Star Army" instead, see Two Hour Wargames.

  • If you were supposed to get an email from the forum but didn't (e.g. to verify your account for registration), email Wes at [email protected] or talk to me on Discord for help. Sometimes the server hits our limit of emails we can send per hour.
  • Get in our Discord chat! Discord.gg/stararmy
  • 📅 July 2024 is YE 46.5 in the RP.

Monospaced fonts under [code] tag do not render correctly

Status
Not open for further replies.

OsakanOne

Inactive Member
Retired Member
Hey all. Just wanted to say there's an issue with the line-height of monospaced fonts when using the code tag.

For example...

Code:
╓────────────────────────────────────────────────ooo╖
║         [OPSCURUS -  [26-2-35.construct]          ║
╟───────────────────────────────────────────────────╢
║ Render complete  [00hr 04ms 22s]                  ║ 
║┌                                                 ┐║
║ ░▓▓░▓▓▓▌▓▓▓▐▓▓▓▓▓▓▓▓▓▓█▓▐█▓▓▓▓▓▓ ▓▓ ▓▓█▓▓▓▓▌▓▓▓▓▓ ║
║ ▓▓▓▓▓░▓▓▌▓▓▓▓▓▓█░░▓▓▌▓▓▓▓▓▐▓▐█▓▐██▓▓▓▓░▓▓▓▓▓▓▓▌▓▓ ║
║ █░▓▓▓▐▓▓▓▓▓▐▐▐▓█▓█▓▓▓▓▐▓▓▓▓▐█▓▓▓▓░▓▓░▓▓ ▓▓▐▓▐▓▓▓▓ ║
║ ▓▓▓▓▓▌▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓░▓▓ ░▓▓█▓█▓▐██▓▓▓▓▓░▓▓   ║
║ ▓░▓▓▓▓░▓▓▓▌▓█░▓▓▓░▓▓▐█░█▓▐█▓░▓▓▓▓▓▓▓▬▓▓▓▌▓▓ ▓▓ █▓ ║
║ ▓▓▌▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▐▓▓▓▌▓▓▓▐▓▓▓▓▐█░ ▐█▓▓▓▓█░▓▓▓▓ ║
║ ▓▌▓▓▓▓▌▓▓▓█▓▐▓▓▓▓▓▐▓▓▓▓▓▓█▓▓█▓▓░▓▓▓ █▓▓░▓ ▓▓▓▓ ░▓ ║
║ ▓▓▓▓▓▓▐▓▓▓▓▓░▓▓▓▓▓▐██░▓▓░▓░▓▓░▓▓▓█░▓▓▓▐░▓▓▓▓ ▓▓ ▓ ║
║ ▓░▓▌▓▌▓▓▓░▓▓▐▓▓▓▐▓▓▓▓▓▓▓▓▓▓▓░░▓▐▓▓▓░▓▓▐▓▓▓▓▓▓▓▓▓  ║
║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐▓▓▓▓▓▓▓░▓░▓▓▓▓▓▓▓▓▓▓▓█▓▓▓░▓▓▓▌▓▓ ║
║ █▓▓▓▌▓▓█▓▓▓░▓▓▓▐▓▓▓░▓▓▓▓▓▓░▓░▓▓▓▓▐▓▓▓▓▓▓▓█▓▓▓▓▓▓▓ ║
║ ▓▓░▓▓▓▓▓▓▓▓▓▓▓▐▓▓▓▐████▓▓▓▐▓░▓▓▐ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ║
║ ▓▓▓▓▓▓░▓▓▓░▓▓▓▌▓▓▓▓▓▓▓▓▓▓▐▓▓▓▌▓▓▓▓░▓░░░░▓▓▓▓ ▓▓▓▓ ║
║└                                                 ┘║
║                                                   ║
║  Pass [  468548   ]         Sector  [    D1     ] ║
║  Scan [   100%    ]         Phase   [    7B     ] ║
╟───────────────────────────────────────────────────╢
║ ►[OK]    Cancel      Options              Pause   ║
╚═══════════════════════════════════════════════════╝


And this is what it is supposed to look like (ignoring color differences):

ai.imgur.com_nXiIzWL.webp

See the gaps between different rows, messing things up so it looks all choppy?

As a result of this issue, one of my roleplay posts looks kind of derp and is much harder to follow.

Is there any chance of getting that fixed?

Thanks.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

... I don't even understand your post.  It just looks like a bunch of gibberish to begin with.  Changing it doesn't change the gibberish.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

The [code] function only removes any html styles from the text when you copy it to a clipboard. The point isn't to display monospaced fonts well.

Though I'm interested to see what you'd do with these things. Boxes. Things. In roleplay. Could be cool. Just take a screenshot like that and modify it in photoshop to be cool for roleplay?
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

You certainly are helpful, Sigma.

What the post is trying to simulate is a computer screen running a utility in a command line environment, like a defrag utility or check-disc with a visual indicator of progess. I can understand what Osaka is trying to accomplish because I do it in some of my posts too, using quote or code blocks to represent information differently, and make it stand out. I did it recently in the Phoenix.

I think the main problem here is character encoding. Perhaps the font used (Courier New) doesn't support it.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

It's just the vertical spacing between lines that's the problem there. The double pipes in the ASCII set ║ should be contiguous with the lines above and below if there is no padding between lines of text.

But honestly, since the width is mono-spaced correctly, it doesn't look "derp" or "hard to follow" at all.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

[quote]... I don't even understand your post. It just looks like a bunch of gibberish to begin with. Changing it doesn't change the gibberish.[/quote]

That's because, silly, you're not following the story. You just saw a construct AI get compiled from an ST recording of a living breathing person. All the memories, skills, feelings, opinions, pains, anguish and just a few edited bells and whistles thrown in for shits and giggles (Aiesu doesn't speak Trade well at all -- the construct was a cypher for OPSCURUS and also her translator when talking with Miles -- In addition, her room-mate, one copy of a Yamataian, doesn't natively speak Lorath but she added the language to his translational matrix).

This impressive feat of CPU strength all happened over six thousand mainframes out of a possible thirty million, some of the machines as far away as forty lightyears from eachother and still acting as one.

And yet she was still impatient. Still sick of waiting.

Its supposed to show how mundane this insane capacity is to her as a character and what her expectations are, giving a faint slice of just what the Consortium proper is like.

You know. Because show don't tell is how storytelling works?

[quote]I think the main problem here is character encoding. Perhaps the font used (Courier New) doesn't support it.[/quote]
And yet the wiki [url=https://wiki.stararmy.com/doku.php?id=characters:yamatai:aiesu_kalopsia:constructs#sourcecode1]does[/url]?

[quote]But honestly, since the width is mono-spaced correctly, it doesn't look "derp" or "hard to follow" at all.[/quote]

Eh... If Sigma can't tell its a UI of some sort, then it is jibberish.

Plus, look at this:

[code]
╓────────────────────────────────────────────────ooo╖
║        [OPSCURUS -  [26-2-35.construct]           ║
╟───────────────────────────────────────────────────╢
║ Render complete  [00hr 04ms 22s]                  ║ 
║┌                                                 ┐║
║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓┌[Executive Construct Options]─x▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓├────[Cognitive Functions]─────┤▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓│►Specify[nonbody,sansexistent]│▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓├─────[Linguistic Norms]───────┤▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓│► [Trade, Nep, Lor, Hi-Ely]   │▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓├────[Specify Completeness]────┤▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓│►Completeness:[97.7] %        │▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓├───[Permissions/Ownership]────┤▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓│ Perm: 777     Own: Physician │▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓├───[Idiosyncratic Profile]────┤▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓│►Upload [     none          ] │▓▓▓▓▓▓▓▓▓▓ ║
║ ▓▓▓▓▓▓▓└──────[Commit Render]─────────┘▓▓▓▓▓▓▓▓▓▓ ║
║└                                                 ┘║
║                                                   ║
║ Pass  [     --    ]         Sector  [    --     ] ║
║ Scan  [     --    ]         Phase   [    --     ] ║
╟───────────────────────────────────────────────────╢
║  OK     Cancel      Options               Pause   ║
╚═══════════════════════════════════════════════════╝

Those thick bright lines are all meant to be one single block, not a series of lines.

Though I'm interested to see what you'd do with these things. Boxes. Things. In roleplay. Could be cool.

User-interfaces for dummies. I've already used them to create login screens, when Aiesu was breaking into the medicomp on the Akahar -- though she actually made a new username so she wouldn't have to in future -- and didn't hide her tracks, because Keib wants her to be honest with what she does.

It was a bit of a crisis situation. The files on the crew she had when she first came onboard weren't quite accurate -- and she was looking for leverage in her upcoming discussion with the ship's XO, Hakahn, who didn't like the autonomy she operated with.

No more than an hour later, she was brutalized and raped by Hakahn.

This is all part of a snowballing plot-event that'll tie nicely together in a bow when its finally done.

No spoilers. :3

Just take a screenshot like that and modify it in photoshop to be cool for roleplay?
I haven't had access to photoshop now in about.. 8 months? I'm stuck on a dinky little netbook with a 900MHz processor (overclocked from 600MHz), and 504MB of RAM and a 2GB harddrive.

Photoshop wouldn't even FIT on this tiny thing.

Hence the post with the computing power was inspired by the fact my main machine, that's been unavailable to me for a long time due to legal disputes with an insurance company that my bank is bending over its knee in about two months time like the bitches they are -- and the fact that this dinky netbook is about 1/164th of the computing power I'm actually used to. I've had to learn to adapt just a tiny bit.

When I was told this is thousands of times more powerful than the machines they had in DOS' heyday, it inspired me to make that post.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

I had no idea what it was either, Osaka. Not everyone is that computer literate — it looked like gibberish to me too because I had no idea what you were driving at.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

Added some narrative to the post.

Does that help at all?
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

I've made maps using code bricks to get a Retraux feel to the proceedings, like this map from the ISC Phoenix 1, Mission 5.

[code]
TACTICAL PERIMITER MAP - PLANET N357
DE: IPG PROBE E#2M2-1
TO: "Nostrovia" et al.

1 SQUARE = 200 SqM

===LEGEND===
 . = Open Ground/Plains
 " = Shrubland/Cover
 ~ = Water/River/Lake
 ^ = Mountain
 B = Building/Checkpoint
 T = Forest
 # = Roads/Paths/Bridges
 v = Ravine
 L = Safest Insertion Point/Landing Area (at x3,y2)
 S = Possible Sentry Patrol Areas (Beware of 'em.)
 X = Walls

============

.X 12345678911111111112222222222333333333
            01234567890123456789012345678
Y ----------------------------------------
1 |^^^^^^^^^^^^^^^^^TTTT.....XXXXXXXXXXXX|
2 |vvLv^^^^^^^^T^^TTTT.......X..........X|
3 |^^^vvv^^^^^^^TTTTT....."..XXBBBBB....X|
4 |TT^^^Svv^^TTTTTTT...".....X~BBBBB#...X|
5 |TTTT"".vv~".TTT..."".....S~.BBBBB.#BBX|
6 |TTT.."...~.......~~......~XXBBBBB.#BBX|
7 |........"~~.~~~~~~~~~~~.~~X....X..#..X|
8 |...""....~~~""..~~~~".~~~.BB..BBBBBBBB|
9 |##......~......~.......S##BB##BBBBBBBB|
10|S.##"..~.......~......##..BB..BBBBBBBB|
11|....##B.S.....~."#####....X....X.#...X|
12|...~~~.##########S........X.BBBB.#BB.X|
13|~~~.....".....~...........X.BBBB#.BB.X|
14|..............~"..........XTBBBB#....X|
15|TTTT..........~...."".....XTTT..#....X|
16|TTTTTTTT....".~.........^^X^TTT.#.TTTX|
17|^^^^TTTTTT...~..TT^^^^^^^^^^TTTTT..TTX|
18|^^^^^^^^^^^^.~.^^^^^^^^^^^^^^^^XXXXXXX|
  ----------------------------------------
To which, Luca commented how high resolution the display was while everyone else was bewildered.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

Luca's precious.

Leigh, I apologize — in context, it made sense. You didn't need to add more to your post. It was just reading this thread that made me go cross-eyed.
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

Naw, its cool. It gave me an excuse to add some characterization and some explanation to those who wouldn't look up the terms on the wiki.

I see it as a good thing :3
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

Moved to submissions and suggestions.

Refresh the page. Is that better, Osakanone?
 
Re: Monospaced fonts under
Code:
 tag do not render correctl[/b]

[quote="Revolver"]It's just the vertical spacing between lines that's the problem there. The double pipes in the ASCII set ║ should be contiguous with the lines above and below if there is no padding between lines of text.

But honestly, since the width is mono-spaced correctly, it doesn't look "derp" or "hard to follow" at all.[/quote]

I think this is what is happening. The PHPbb code function is designed for displaying, well, code where horizontal spacing is important (but vertical not so much).

[code]
int GameState::onExecute() {
  if(onInit() == false) {
    std::cout << "Failure";
    return -1;
  }

  SDL_Event event;

  while(running) {
    while(SDL_PollEvent(&event)) {
      onEvent(&event);
    }

    onLoop();
    onRender();
  }

  onCleanup();
  return 0;
}
Copying some old code lying around makes it a little more obvious. The spacing between lines is huge. I'm not a typography person so I don't have the proper terminology to explain it, but it looks like the characters sit very low in their boxes (select a single character to see what I mean). It does feel like there may be some very slight horizontal spacing issues as well, but it's difficult to say. Perhaps bad kerning of some kind?

Code:
/*12345678901234567890123
/*|----------|----------|
 *|----------|----------|
 *|----------|----------|
 *|----------|----------|
 *|----------|----------|
 *|----------|----------|
 */

Code:
/*12345678901234567890123
/*|--- ------|----------|
/*|----------|-- -------|
 *|----------|----------|
 *|----------|----------|
 *|----------|----------|
 *|----------|----------|
 */

Nope, looks entirely vertical.
 
Status
Not open for further replies.
RPG-D RPGfix
Back
Top