This page has moved


This page can now be found on the Wikka Documentation Server.
Thanks for updating your bookmarks!

An archive of old revisions of this page is still available for reference.

 


CategoryMigratedDocs
Comments
Comment by DarTar
2004-11-29 08:54:53
Great news! I only find that the highlighted code is a little pale, maybe we should change the code box background to increase contrast...
Comment by JsnX
2004-11-29 12:34:43
Go for it. The presentation is handled by CSS. Take a peak at the /CSS files. You'll see that I added the geshi coloring codes at the bottom. The only other place you'll need to modify is the .code class.
Comment by DarTar
2004-11-29 13:34:40
Actually it's the color of the highlighted tags, rather than the background, which has to be improved. I'll see if I can find some better color combinations (and understand Geshi classes).
And, hey, I hadn't noticed that php functions are now clickable in code boxes! That's just great!
Comment by JavaWoman
2004-12-14 19:08:23
Have a look at my javawoman.css stylesheet - spent some time tweaking, I think the colors are better there now. Not as "pale".
Comment by DarTar
2004-12-17 00:26:13
Nope, I just discovered where the problem comes from. On Mac OS X, Courier New is a font with extremely light typefaces, which results in almost illisible code with the default CSS settings. Just leaving "monospace" as font-family for code blocks works fine (the default monospace on Mac OS X is Courier).
Comment by DarTar
2004-12-17 09:29:21
Considering the problem I mentioned above, what about changing the default font-family to something like "Bitstream Vera Sans Mono", "Courier", monospace; ?
For ideas about cross-platform font compatibility take a look at http://www.codestyle.org/css/font-family/
I'd also like to make the font size a little larger. Font size specifications should BTW always be in points or ems (which adapt to the screen resolution), not in pixels!
Comment by JavaWoman
2004-12-17 11:51:51
He - the Win-Mac conflict: Courier may be a bad font for legibility on Mac, but the reverse is also true: Courier is almost illegible on Win. ;-) That means you can't put either one first. And "Bitstream Vera Sans Mono" is almost unheard-of (probably happened to be on the machine of whoever wrote this code first, and included because (s)he liked it). "Lucida Console" is a good font for code, and certainly more common than the Bistream one (it comes with almost any MS package) - but I don't know how common it is on Macs.
Maybe something simple like "Lucida Console", monospace; would be a good compromise - but I'd have to test with just monospac to see how good the default is on Win machines. I'll be back ;-)
Comment by JavaWoman
2004-12-17 11:58:39
OK, monospace looks OK (it looks like Courier New is the default on Win), but Lucida Console is much clearer. I'll adapt accordingly on WikkaGeshiIntegration (note that you need to have pre within .code shown with the same font-family for consistency).
Comment by DarTar
2004-12-17 14:01:17
"Monaco" is the most common monospace font on Mac OS X:
http://www.codestyle.org/css/font-family/sampler-MacResults.shtml)
"Lucida Console" OTOH is not available on Mac OS X.

I'd consequently suggest as a font-family for code blocks:
"Lucida Console", "Monaco", "Courier", monospace
Comment by JavaWoman
2004-12-17 15:11:52
No, leave out the "Courier" since that will lead to illegible code if Lucida and Monaco both aren't present on a Win machine. monospace _does_ produce a legible default.

(If you install MS word on a Mac you probably do get Lucida Console though - there _are_ MS programs for the Mac :) - you don't get the font with the Win OS either but many Win users have it because they have an MS app that installs it.).

So:
"Lucida Console",Monaco,monospace;
(quotes should only be used when there is a space in the font name.)

Or does just monospace (retrieving whatever is the default) look bad on a Mac?
Comment by DarTar
2004-12-17 18:29:47
> leave out the "Courier"
OK

> If you install MS word on a Mac you probably do get Lucida Console
Negative: I've got MS Office installed but no Lucida Console.

>Does just monospace look bad on a Mac?
the default monospace on Mac OS X is Courier and it looks ok, but I still prefer to give priority to Monaco (which is the Mac OS Terminal default) before the generic font-family
Comment by DarTar
2004-12-17 18:34:51
And is italic for comments really needed? I've removed it from my custom skin
Comment by JavaWoman
2004-12-17 21:16:25
MS Office and no Lucida Console on your Mac? Hmmm - can't remember where I got it from - it's not (officially) freely downloadable but is included in a lot of apps; I've had (and used) it for so many years, I forget where I got it from... I have all my editors (including lowly Notepad) set to use Lucida Console for (monospace) editing. :) In fact there's a whole series of Lucida fonts - well named since they all are very legible on screen.

If monospace pulls a decent font on the Mac then we can indeed lose the Courier variants; of course the generic font family should always come at the end. There are some other good and freely downloadable monospace fonts but I don't know of any that can be expected to sit on many user's systems - including rare fonts is pretty useless.

No, italic is not "really needed" but it's very common for highlighting comments (default setting in various editors, too), so I'd suggest we keep the (GeSHi) default. Personally I find it helps since it makes comments stand out mor than by just color.
If your "personal skin editing" is added to Wikka people can override it if they wish (as you've done). It may also depend on which font you use/have available - Lucida Console looks very good in italic, too, Courier New a lot worse, for instance.
Comment by DarTar
2004-12-17 21:32:33
The Lucida family is much more than a typeface, but a real collection of very different fonts developed for different kinds of use, so it's not surprising that you see a lot of Lucida fonts on different OS. But I can confirm you that Lucida Console is definitely not a good option for Mac users (and it doesn't seem to exist by default on *nix system either). So I don't see the necessity of adding only an option for Windows users.

Custom user skins can of course modify their font families to fit the OS and the available fonts. Monaco is the most common monospace font on Mac OS. I think that if we give, in the order, a very common Windows monospace font like Lucida Console, followed by the most common monospace font for Macintosh like Monaco, followed by a generic monospace (we can drop Courier) we cover any kind of user.

As for italic, by definition monospace characters look very bad in the italic form. This happens because most italic faces for monospaced fonts are only 'virtual italics', known as sloped-roman, i.e. roman fonts sloped by the system to give an impression of italic, but totally lacking the legibility of genuine italic (which are in general different typefaces). Moreover, italic requires generally a specific kerning that by definition is absent in monospace characters. If I had to choose a way to increase the contrast between code and comments (even if the gray comments already seem to me quite contrasting), then I'd rather choose a different typeface, instead of forcing an ugly (and in many case difficult to read) virtual italic.

Again, remember that (thanks God) we are not all working on Windows and we should find solution that fit with the largest number of users and OS ;-)
Comment by JavaWoman
2004-12-18 00:47:23
"But I can confirm you that Lucida Console is definitely not a good option for Mac users (and it doesn't seem to exist by default on *nix system either)."
Lucida Console is as much an "only Windows" option as Monaco is an "only Mac" option. The point of of giving a list of options (in a reasonable order) is to make it likely someone has a good chance of getting a "good" font that is better for teh purpose than the generic fallback (monospace in this case).

"Custom user skins can of course modify their font families to fit the OS and the available fonts. Monaco is the most common monospace font on Mac OS. I think that if we give, in the order, a very common Windows monospace font like Lucida Console, followed by the most common monospace font for Macintosh like Monaco, followed by a generic monospace (we can drop Courier) we cover any kind of user."
Exactly - well, almost - since I have no idea what monospace fonts are commonly available on *nix - I had already adapted the CSS fragments in WikkaGeSHiIntegration!

As to the italics - all I know is that multiple programs use that as a default for highlighting comments in code (usually in combination with gray or muted green), but of course I only know Windows programs. I also know that (when offered an easy way to change typeface) people will often choose a font that looks bad in italics - and then complain there's a problem with the italics. The reality is that it depends on the typeface whether italics are legible in a monoface font.
So... for Lucida Console (Win) the answer is "yes" (very legible). What's the verdict for Monaco (Mac)?
And maybe we should provide a few more "common" fonts (both Win and Mac) that might have legible italics (even if only "sloped"). Ideas? (I'll dig a bit in my fonts library...)

We could also provide a little "recipe" for easily adapting the styling because such things really are platform-dependent and a particular Wiki might have a captive audience that mainly uses a particular platform... Annotated alternative rules in the stylesheet might help, maybe also a note for WikiMasters in the readme...
Comment by DarTar
2005-01-18 09:53:01
JW, shouldn't we add some information concerning line numbers and clickable markup?
Comment by JavaWoman
2005-01-18 14:52:45
Actually, as discussed somewhat on #wikka, we should have documentation pages for each type of Wikka markup (but keep FormattingRules as a summary, which could link to the detail pages).
Comment by BastyaElvtars
2005-01-28 03:22:46
Hi ppl,

Please note that old stylesheets should be updated as writtten in http://wikka.jsnx.com/WikkaGeshiIntegration
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki