Talk:Flatten a list: Difference between revisions

Content added Content deleted
Line 42: Line 42:
:: Put the box into J highlighting again and it gets ugly since the digits are highlighted by GeSHi to be bold. That makes them wider than the surrounding characters, which throws off vertical line alignment. I have no clue what font the <code>&lt;pre&gt;</code> blocks are using; if I set them manually to Consolas or Courier New it all works fine. Ah, apparently it's Lucida Console. This probably can be fixed in the MW style sheet, considering that Lucida COnsole is the default choice for IE 8 at least for Latin monospace. There seem to be some fonts that work and some that don't. I agree, though, that everything should be in a single block. I made that change more of pragmatic considerations. In any case, a few sample images: [http://hypftier.de/dump/box-consolas.png Consolas], [http://hypftier.de/dump/box-courier-new.png Courier New], [http://hypftier.de/dump/box-dejavu-sans-mono.png DejaVu Sans Mono], [http://hypftier.de/dump/box-lucida-console.png Lucida Console] – that's all I have in monospaced fonts. Note that Consolas didn't have line-drawing glyphs in Vista; dunno whether that has been fixed in an update or so, but Windows 7's Consolas has them. Seemingly only Lucida Console has a different width depending on the weight, though (which makes it even more unsuitable as the default). —[[User:Hypftier|Johannes Rössel]] 08:32, 2 June 2010 (UTC)
:: Put the box into J highlighting again and it gets ugly since the digits are highlighted by GeSHi to be bold. That makes them wider than the surrounding characters, which throws off vertical line alignment. I have no clue what font the <code>&lt;pre&gt;</code> blocks are using; if I set them manually to Consolas or Courier New it all works fine. Ah, apparently it's Lucida Console. This probably can be fixed in the MW style sheet, considering that Lucida COnsole is the default choice for IE 8 at least for Latin monospace. There seem to be some fonts that work and some that don't. I agree, though, that everything should be in a single block. I made that change more of pragmatic considerations. In any case, a few sample images: [http://hypftier.de/dump/box-consolas.png Consolas], [http://hypftier.de/dump/box-courier-new.png Courier New], [http://hypftier.de/dump/box-dejavu-sans-mono.png DejaVu Sans Mono], [http://hypftier.de/dump/box-lucida-console.png Lucida Console] – that's all I have in monospaced fonts. Note that Consolas didn't have line-drawing glyphs in Vista; dunno whether that has been fixed in an update or so, but Windows 7's Consolas has them. Seemingly only Lucida Console has a different width depending on the weight, though (which makes it even more unsuitable as the default). —[[User:Hypftier|Johannes Rössel]] 08:32, 2 June 2010 (UTC)
::: If I put something in the RC global stylesheet for 'pre', I don't want to name a font that may be platform-specific. Is there a font (say, "Courier" or "Monospace") that works across platforms? Alternately, I could use some free-license webfont, if folks can agree on one. --[[User:Short Circuit|Michael Mol]] 12:18, 2 June 2010 (UTC)
::: If I put something in the RC global stylesheet for 'pre', I don't want to name a font that may be platform-specific. Is there a font (say, "Courier" or "Monospace") that works across platforms? Alternately, I could use some free-license webfont, if folks can agree on one. --[[User:Short Circuit|Michael Mol]] 12:18, 2 June 2010 (UTC)
:::: I have no idea whether there are such fonts. Windows itself comes with Lucida Console, Courier New and Consolas (as well as a bunch of CJK fonts which are not really meant to be used in Latin-only contexts [at least, judging from the looks of their Latin glyphs]). Linux and similar systems tend to have fonts with quite creative names, such as Mono, Sans or Serif – I have no clue whether that are the actual names of the typefaces or merely aliases for fonts one actually might know.

In any case, you can list a number of typefaces in decreasing order of preference which is pretty common practice. The keyword "monospaced" refers to a non-specific (user-defined) monospaced font (which is what's currently used, apparently – either intentionally or just by not redefining <code>font-family</code> on <code>&lt;pre&gt;</code> – but that runs into the problem with Lucida Console at least with IE on Windows). So you could, theoretically, give a long list of fonts that are known to work and present on most, if not all systems. Downloadable fonts (WOFF, EOT, etc.) may be a last resort option but for a single language probably way overkill. Another possibility would be to tweak J syntax highlighting that numbers in boxes are no longer rendered in boldface. —[[User:Hypftier|Johannes Rössel]] 20:53, 3 June 2010 (UTC)