It is currently Mon Oct 20, 2014 4:42 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 19 posts ] 
Author Message
PostPosted: Thu Sep 17, 2009 8:55 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
How do you get monospace fonts on the wiki ?

I've looked online and several pages suggest <tt> tags or actual html font tags or `monospace` or {{{monospace}}} but I cannot get any of these to render correctly on the Wiki, although putting my code into the main wikipedia site without any special tags rendered ok :?: Go Figure !

For example this code

lll ; some comments
AAA ; some more comments

should appear on the Wiki something like this
Code:
 lll ; some comments
 AAA ; some more comments     


But it doesn't, I've created a Wiki test page (http://www.retrosoftware.co.uk/wiki/ind ... _Monospace)to see the effect using <tt> tags which as far as I've read should work. Here is the Wiki page code

<tt>
lll ; some comments
AAA ; some more comments
</tt>

Can anyone explain what I'm doing wrong, it's driving me nuts. I can't put my code up without monospace as it'd ruin the readability


Top
 
PostPosted: Thu Sep 17, 2009 8:59 am 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
Looks monospaced to me!

(Windows XP, Firefox 3.0.14)


Top
 
PostPosted: Thu Sep 17, 2009 9:00 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Ha ha, I've just tested in Firefox and it's monospaced but... looks crap for me, way too small.

In Internet Explorer 8 it doesn't render, I can post screen shots if required.


Top
 
PostPosted: Thu Sep 17, 2009 9:01 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
I even looked at code pages you submitted and they don't look good in Explorer or Firefox on my machine,

In Exporer they are not monospaced but are a comfortable size
In Firefox it's monospaced but too small to confortably read


Top
 
PostPosted: Thu Sep 17, 2009 9:10 am 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
Yes, I agree that it's rather too small in Firefox.

Just tried it on a Mac - in Firefox it renders monospaced, and a little bigger (though I think this is due to the implementation of the font). In Opera, it renders as a proportionally-spaced font.

Something up with this I guess...


Top
 
PostPosted: Thu Sep 17, 2009 9:10 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Here's the screenshot (in Explorer) of one of your pages where I guess it shouldn't look like this;

Image

and here's how Firefox renders a code page of yours

Image


Top
 
PostPosted: Thu Sep 17, 2009 9:11 am 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
ugghh... put ClearType on, maaaan....!!! ;)


Top
 
PostPosted: Thu Sep 17, 2009 9:13 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
RichTW wrote:
ugghh... put ClearType on, maaaan....!!! ;)


??? Err... what ???


Top
 
PostPosted: Thu Sep 17, 2009 9:14 am 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
That 'diagram' from the hardware scrolling page makes me cry. Really should submit an image illustrating that sometime....


Top
 
PostPosted: Thu Sep 17, 2009 9:17 am 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
ohhhh... just a Windows thing which smooths the edges of fonts... not to everyone's taste, but I love it - removes all traces of aliasing even in small characters.

(Right click desktop -> Properties -> Appearance -> Effects... ->
"Use the following method to smooth edges of screen fonts" ->
ClearType)

Only mentioned it because of the hideous pixellated appearance of the Courier font in your screengrab :)


Top
 
PostPosted: Thu Sep 17, 2009 9:20 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Didn't know about that, I've put it on and although still a bit small for my old eyes it is clearer, I like it :)


Top
 
PostPosted: Thu Sep 17, 2009 9:23 am 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
You can 'tune' it too, so that it renders best according to your monitor, here:

http://www.microsoft.com/typography/cle ... /tune.aspx

(Requires IE; installs an ActiveX plugin)


Top
 
PostPosted: Thu Sep 17, 2009 9:45 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Cheers, I've now 'tuned' it.


Top
 
PostPosted: Fri Sep 18, 2009 3:22 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
I'm experiencing a bit of déjà vu ...

How do you put code in a Wiki page ?

Are you OK with this now, Steve? I guess it's not incredibly aesthetically pleasing now you've drawn attention, but I've never had any problems reading monospace text on the wiki before.

Sam.


Top
 
PostPosted: Fri Sep 18, 2009 7:09 pm 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Not exactly deja vue, in that thread it wasn't putting nice boxes round, I hadn't noticed (or it didn't do it) that the text wasn't spacing correctly. As you know in monospace all characters should occupy the same space. Just like they do when your coding in virtully all code editors. There's not many coders who would code in a proportional font (though obviously someone will somewhere).

The reason being for most people it makes code easier to read and see the flow of. When viewed in Explorer the comments and indentation showing program flow/ grouping is all over the shop and looks a mess, look at Rich's ASCII diagram to see what I mean.

I'm now only viewing the Wiki using FireFox and I've increased the font size on my latest Wiki page so I can read it ok ;)


Top
 
PostPosted: Sat Sep 19, 2009 12:53 am 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
Sorry, only had time for a quick glance at the whole topic earlier, as I was at work.

Now I've had a chance to try it out with IE 8 and I can see what you mean.

The text size issue appears to have been raised as a bug with MediaWiki

https://bugzilla.wikimedia.org/show_bug.cgi?id=20706

But I think the issue with IE 8 needs looking into. For some reason it's using the wrong non-monospaced font. I'll have a think about it over the weekend.

Sam.


Top
 
PostPosted: Sat Sep 19, 2009 9:36 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Thanks Sam, <BootLick>you're a unsung hard working hero of our web sites</BootLick>


Top
 
PostPosted: Sat Mar 03, 2012 4:10 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
Hah. Not quite.

That hard-working hero has stretched a weekend into nearly two and a half years. :o

I finally remembered that I never replied to this issue.

I think the situation has probably improved in later versions of MediaWiki, but upgrading isn't trivial due to the forum integration.

It is possible, though, to do proper mono-spacing on our wiki. I've hijacked and expanded on your Test Monospace page, Steve, and included some explicit cut 'n' paste examples of how to achieve it, using the <code> tag, &nbsp; and <br/> tags.

I've tested it on IE 9 and Firefox, and it seems fine.

Apologies for the lengthy delay in looking at this. :shock:

Sam.


Top
 
PostPosted: Fri Apr 27, 2012 10:09 pm 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Cheers Sam :)


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron