Page 1 of 1

Bug when displaying code in old Murga forum?

Posted: Wed Sep 23, 2020 2:33 am
by MochiMoppel
I know, it's a bit late for that. but I discovered it only yesterday.

When posting code it is customary to use the Code button. This would render the code "as is", preserving white-space and breaking lines only at linefeeds. Any characters would be allowed in such code box and BBCode would be rendered literally and not be converted by the BB software. It is the same as using the <pre> tag in HTML.

For good reasons text in such code box is supposed to be rendered in a monospace font. However now it appears that in the Murga forum it never was. Can it really be that in all these years it never worked as expected and nobody cared?
The point is that in the Murga forum the code box is configured to use font-family: Courier, 'Courier New', sans-serif, which means that users like me, who had the fonts Courier or Courier New installed in their system, the code would show in a monospace font, but for most (?) users the third option, sans-serif, would be used, and that's a proportional font.

I occasionally misused the code box to display a table, e.g in my post of May 22,2017. The table looks distorted in a pristine Slacko 5.6 because Courier is not installed. Does it render properly in other distros? One possibilty is that in other distros the MS Windows Courier font was mapped to another monospace font, but this is only a wild guess. At least it would explain why nobody complained.

Re: Bug when displaying code in old Murga forum?

Posted: Wed Sep 23, 2020 3:57 am
by Flash
Well, if nobody noticed until now, all's well that ends well. :)

Re: Bug when displaying code in old Murga forum?

Posted: Wed Sep 23, 2020 4:03 am
by 6502coder
I never complained because I long ago stopped expecting code to be printed in a monospaced font. I can clearly identify four reasons in my own experience for this (YMMV):

1. Verdana
I was working on UNIX systems long before MS Windows came along, but once I started also doing a little coding on Windows, I quickly settled on Verdana as the font of choice for my preferred Windows programming editor (EditPlus). Verdana was nice because it had clearly distinguishable versions of the problematic look-alike characters, such as numeral one, lowercase L, uppercase I; zero versus capital O, etc. This was far more important to me than the ability to line things up nicely in a monospaced font.

2. Proportional-font text editors/readers
Once text editors capable of rendering proportional fonts became commonplace, proportional fonts became the normal default, which makes sense because ordinary text is a lot easier to read in a proportional font than in a monospaced font. Although carefully formatted code that ASSUMES a monospaced font looks all messed up when rendered in a proportional font, for most people, reading text is a far more common task than reading code, so accepting a proportional font as the default made sense.

3. WYSIWYG docs
Once MS Word and other WYSIWYG document prep tools became widespread, I stopped wasting a lot of effort writing documentation directly into source code and instead shifted that stuff into WYSIWYG documentation, which had far better tools for handling tables and such, not to mention things like flow-charts, tree diagrams, and other such graphics that are ridiculously tedious to try to do when all you've got is monospaced text characters.

4. Printing...not!
In the Stone Age, printing out your source code was essential to debugging. But once hi-res displays and full-screen programming editors came along, there was a lot less need to generate hard-copy of source code, and therefore less reason to complain about how the proportional font used by the printer was messing up your carefully spaced source code comments.

Re: Bug when displaying code in old Murga forum?

Posted: Wed Sep 23, 2020 7:28 am
by Makoto
MochiMoppel wrote: Wed Sep 23, 2020 2:33 am The point is that in the Murga forum the code box is configured to use font-family: Courier, 'Courier New', sans-serif, which means that users like me, who had the fonts Courier or Courier New installed in their system, the code would show in a monospace font, but for most (?) users the third option, sans-serif, would be used, and that's a proportional font.
I think (but don't hold me to it) that browsers should recognize Courier/New as a monospace font, and switch to another such font (or whatever you have set as the monospace font to use in your browser's preferences... are you sure you didn't have it mapped to a proportional font instead?)

Also, that it was set to Courier/Courier New is probably the fault of whoever created that specific style theme (one of phpBB's defaults?). :lol:

Re: Bug when displaying code in old Murga forum?

Posted: Wed Sep 23, 2020 8:59 am
by MochiMoppel
Makoto wrote: Wed Sep 23, 2020 7:28 amAlso, that it was set to Courier/Courier New is probably the fault of whoever created that specific style theme (one of phpBB's defaults?).
Setting it to Courier/Courier New is no fault. It is perfectly OK.
What is not OK is to set it to sans-serif , which will be used if you don't have Courier. It really looks like a mistake in the original subSilver theme for phpBB version 2+.

[Edit]. A few minutes ago and for a short period of time the Murga site again displayed its infamous "Maintenance" page :shock:
It seems that someone corrected the stylesheet and the style section. Thanks! Who is this someone?