juhtolv-css

Cascading Style Sheet -files of WWW-pages of Juhapekka Tolvanen

Author: Juhapekka “naula” Tolvanen
E-Mail:juhtolv (at) iki (dot) fi
Homepage:http://iki.fi/juhtolv/css-download/
Author’s homepage:
 http://iki.fi/juhtolv

Table of contents

1   Files

2   Licenses

Copyright (c) 2002-2016 Juhapekka “naula” Tolvanen

juhtolv (at) iki (dot) fi

http://iki.fi/juhtolv

These styleshees are free, but come WITHOUT ANY WARRANTY; you can copy, redistribute and/or modify these stylesheets under the terms of either of these two licences:

the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts

OR

the Design Science License.

I also enact these two (2) amendments:

1) Document using one or more of these files as its stylesheet can be under any licence (or under no licence at all). So, you do not need to release your WWW-page or other document under GNU FDL and/or DSL, if it uses one or more of these files as its stylesheet.

2) Any Stylesheet is allowed to include these stylesheets via import-mechanism, no matter what is its licence. So, you do not need to release your stylesheet under GNU FDL and/or DSL, if it uses one or more of these files as its imported stylesheet.

A copy of the GNU FDL is available here:

http://www.gnu.org/copyleft/fdl.html

A copy of the DSL is available here:

http://www.dsl.org/copyleft/dsl.txt

Local copies are available in these places:

License of that js/styleswitcher.js is unknown to me: I found that file via "A List Apart":

Eric Meyer enhaced it with font size form:

http://web.archive.org/web/20021201230559/www.meyerweb.com/ui/setup.html

http://web.archive.org/web/20021201232036js%5F/www.meyerweb.com/ui/styleswitch.js

Images ryppy.jpg, ryppy_black.jpg and nimmari_red.png are created by me, myself and I and they are public domain. They have no warranty.

Test file pelle.html is created by me, myself and I and it is public domain and it has no warranty.

Fonts in that directory called cssfonts are not created by me. See their copyright-information and licenses in that sub-directory called 000LICENSES.

3   Usage example

When you load stylesheets this way, Netscape 4.* won't load them. I do not bother to provide Stylesheet for Netscape 4.* . It is so hard to create stylesheet that do not crash it and still looks good.

Note: Do not use attribute “title” in that tag that loads stylesheet for mediatype called “print”.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fi">
  <head>
    <link rel="stylesheet" href="indexbw.css"
      type="text/css" media="screen,projection,tv" title="indexbw" />
    <link rel="alternate stylesheet" href="index.css"
      type="text/css" media="screen,projection,tv" title="index" />
    <link rel="alternate stylesheet" href="indexbwserif.css"
      type="text/css" media="screen,projection,tv" title="indexbwserif" />
    <link rel="alternate stylesheet" href="latex.css"
      type="text/css" media="screen,projection,tv" title="latex" />
    <link rel="stylesheet" href="printbw.css"
      type="text/css" media="print" />
    <script type="text/javascript" src="js/styleswitcher.js" defer="defer">
    </script>
    <meta http-equiv="Content-Type"
      content="text/html;charset=UTF-8" />
(Clip)
    <p class="styleswitch">
    <strong>You can change stylesheet here:</strong> (Javascript/DOM):
    <a href="#" onclick="setActiveStyleSheet('indexbw'); return false;">
        Default: indexbw (Black text on white background)</a>
    <a href="#" onclick="setActiveStyleSheet('index'); return false;">
        index (Green text on black background)</a> |
    <a href="#" onclick="setActiveStyleSheet('indexbwserif'); return false;">
        indexbwserif (Black serif font text on white background)</a> |
    <a href="#" onclick="setActiveStyleSheet('latex'); return false;">
        latex (Black L<sup>A</sup>T<sub>E</sub>X-like font text on white
        background)</a>
    </p>
(Clip)
    <h1 class="ahem">
        This site looks much better in a
        <a href="http://www.browsehappy.com/">WWW-browser</a> that supports
        <a href="http://www.webstandards.org/">web standards</a>, but
        information it provides is accessible to any WWW-browser or
        Internet device.
    </h1>

I also advice to use this piece of Javascript-code very soon after <body> . It loads a javscript-code, that is MIT-licensed. But I do not dare to use that javascript before “<div class="navbartop">” .

<script type="text/javascript">
  var $buoop = {c:2};
  function $buo_f(){
  var e = document.createElement("script");
  e.src = "//browser-update.org/update.min.js";
  document.body.appendChild(e);
  };
  try {document.addEventListener("DOMContentLoaded", $buo_f,false)}
  catch(e){window.attachEvent("onload", $buo_f)}
</script>

If somebody is reading your web page with outdated browser, he will get friendly reminder to upgrade web browser and to go to these web pages:

http://browser-update.org/

http://www.browsehappy.com/

http://www.webstandards.org/

You may need to edit that file called js/styleswitcher.js at least this line:

document.cookie = name+"="+value+expires+"; path=/~juhtolv/";

Remember to write <p>-tags, <blockquote>-tags, <ul>-tags and friends like this:

<div class="chapter">
  <p>
    Blah blah blah
  </p>

  <p>
    Foo bar baz qux
  </p>

<ul>
  <li>Foo</li>
  <li>Bar</li>
  <li>Baz</li>
<ul>

<blockquote>
  “Omnia dicta fortiora si dicta latina.”
</blockquote>

</div>

That way you will not see that background pic between every paragraph. At least other people found that kind of “skip” annoying and I wanted do something for it. But do not use <div class="chapter">-tags inside these tags and their ending tags:

If you want to pressure users of M$IE version 7.* or older to switch to some web browser, you can define stylesheet loading with charset:

<link rel="extra-keyword stylesheet" href="index.css" type="text/css;
  charset=UTF-8" media="screen,projection,tv" title="index" />

This is completely valid HTML according to W3C, but poor little M$IE can not follow standard very well and style sheet is not loaded at all. IIRC, that CSS-bug is still present even in M$IE 7.

You can use these stylesheets with RSS/RDF-aggregators called AmphetaDesk and Sage, too:

5   Fonts and suggestions for their order

5.1   Principles

  • Use free fonts and clones of fonts before non-free
  • Try to avoid bitmap-fonts under X Window System: For example using plain “helvetica" may give you just some lousy bitmapped version of it Helvetica. If you install fonts of GhostScript, clones of 35 standard PostScript fonts become available for X Window System in some Linux-distributions; For example “URW Nimbus Sans L” is good clone of Helvetica in Type1 format, so you'd better try it out first. In some installations substitution mechanisms take care of using URW Nimbus Sans L as Helvetica, though. Therefore, don't use those Lucida fonts provided with XFree86. They are just bitmapped crap. You just can't get fonts of Lucida family that would be both scalable outline format and free (in the sense of freedom or price).
  • Try to use scalable outline fonts as much as possible.
  • Try rip-offs last (Book Antiqua, Monotype Century Gothic, Monotype Corsiva, Arial etc.).

5.2   Fonts

Palatino and its lookalikes etc. in order of importance:

http://luc.devroye.org/palatino2.html

Probably the best-looking clone:

"FPL Neu",

Clones by GUST (Polish TeX-users group):

"TeX Gyre Pagella","TeXGyrePagella",

Other Palatino clone (Based on URW Palladio L):

"Free Paladin",

Palatino clones from URW++:

"URW Palladio L", "URWPalladioL", "URW Palladio", "URWPalladio", Palladio,

Originals:

"Linotype Palatino", "Palatino Linotype", Palatino, "Palatino 2",

Palatino clones from Bitstream:

"Zapf Calligraphic 801", "Zapf Calligraphic 801 BT", "Zapf Calligraphic",

Palatino rip-off that made Hermann Zapf upset:

"Book Antiqua",

Faithful to original:

"PalazzoOriginal",

Not-so-important clones of Palatino:

"Zapf Renaissance", Parlament, PalmSprings, "CG Palacio", "Paladium", Palisade, Patina, Pontiac, "Palation Werk", QTPalatine, Andover, "Andover II", Malibu, Atlas, Elegante, Marathon,

Bitstream Charter and its clones:

"Bitstream Charter BT", "Bitstream Charter BT Roman", "Charter BT Roman", "Bitstream Charter", "CharterBT", "Charter BT", "ITC Charter", Charter, "Charis SIL",

Other serif-fonts in order of importance:

"DejaVu Serif", "Arev Serif", "Bitstream Vera Serif", "Vera Serif", "Droid Serif", "Junicode", "Gentium", "Gentium Alt",

Serif fonts not so well suited for screen (except titles):

Bookman and its clones:

"Free Bookman", "TeX Gyre Bonum", "TeXGyreBonum", "URW Bookman L", "URWBookmanL", "ITC Bookman", Bookman,

Schoolbook and its clones:

"Free Schoolbook", "TeX Gyre Schola", "TeXGyreSchola", "CenturySchL", "Century Schoolbook L", "URW Century Schoolbook L", "Century Schoolbook SWA", "Monotype Century Schoolbook", "Century Schoolbook", "New Century Schoolbook", "New Century Schlbk", "Schoolbook",

Times and its clones:

Freeserif, "TeX Gyre Termes", "TeXGyreTermes", "Liberation Serif", "Free Times", STIX, STIXGeneral, XITS, Thryomanes, "Nimbus Roman No 4", "NimbusRomNo9L", "Nimbus Roman No 9 L", "Nimbus Roman No 9", "Dutch SWA", "Dutch 801 Roman BT", "Dutch 801 BT", "Dutch 809 BT", Dutch, Times, Times Roman, Times New Roman, "Doulos SIL", "TITUS Cyberbit Basic", "Bitstream Cyberbit", "Bitstream Cyberbase",

Non-free serif-fonts:

"Lucida Fax", "Lucida Bright", "Lucida Serif", LucidaBrightWest, LucidaBrightCE, LucidabrightCyr, Lucidabright, "Luxi Serif", "Minion Web Pro", "Minion Web", "Minion Pro Disp", "Minion Pro" "Minion", "Adobe Serif MM" Georgia,

Zapf Chancery and its clones in order of importance:

"Free Chancery", "TeX Gyre Chorus", "TeXGyreChorus", "URW Chancery", "URW Chancery L", "URWChanceryL", "URWChanceryLMed", "ITC Zapf Chancery", "Zapf Chancery", "Monotype Corsiva", Corsiva, Chancery,

Other calligraphic fonts (all non-free):

Arioso, Freeform, Shelley,

Sans-serif fonts in order of importance:

"DejaVu Sans", "Arev Sans" "Bitstream Vera Sans", "Vera Sans", "Droid Sans", Cantarell, Roboto,

Helvetica and its clones in order of iportance:

Freesans, "Free Helvetian", "TeX Gyre Heros", "TeXGyreHeros", "URW Nimbus Sans L", "Nimbus Sans L", NimbusSanL, URWNimbusSanL, Swiss, "Swiss 721 SWA", "Swiss 721", "Swiss 721 BT", Helvetica, Arial, "Arial Unicode MS", "Microsoft Sans Serif", "MS Sans Serif", Helvetic, Helv,

Non-free wide sans serif fonts (good for titles):

"Gill Sans MT", "Gill Sans", "Trebuchet MS",

Other non-free sans serif fonts:

Optima, "URW Classico", "URWClassico",

"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Lucida", "Myriad",

Verdana, Tahoma,

Avant Garde and its clones in order of iportance:

"TeX Gyre Adventor", "TeXGyreAdventor", "Free Avant Garde", "URW Gothic L", "URWGothicL", "URWGothicLDem", "Avant Garde Gothic", "ITC Avant Garde Gothic", "Monotype Century Gothic", "Century Gothic"

Monospace fonts in order of importance:

"DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Droid Sans Mono", "TeX Gyre Cursor", "TeXGyreCursor", Freemono, "Free Courier", "URW Nimbus Mono L", "URW Nimbus Mono", "Nimbus Mono", "Nimbus Mono L", "NimbusMonL", "Courier SWA", Courier, "Courier New",

Non-free monospace fonts:

"Lucida Sans Typewriter", "LucidaSansTypewriter", "LucidaType", "LucidaTypeWest", "LucidaTypeCe", "LucidaTypeCyr", "Lucida Console", "Lucida Serif Typewriter", "Lucida Mono", "Lucida Typewriter", "LucidaTypewriter",

"Luxi Mono",

"Andale Mono", "monotype.com", "Letter Gothic", Monaco,

6   Fonts of LaTeX available for WWW-stylesheets

6.1   Serif

"Latin Modern Roman 12", "Latin Modern Roman 10", "Latin Modern Roman 9", "Latin Modern Roman 8", "Latin Modern Roman 7", "Latin Modern Roman 6", "Latin Modern Roman 5",

"LMRoman10 Bold", "CM Roman Bold", "Computer Modern Roman Bold", "Universal Modern Bold",

"LMRoman10", "CM Roman", "umb10", "Universal Modern Roman", "Computer Modern Roman Regular",

6.2   Sans Serif

"Latin Modern SanSerif 8", "Latin Modern SanSerif 9", "Latin Modern SanSerif 10", "Latin Modern SanSerif 12",

"LMSans10 Bold", "CM Sans Bold", "Computer Modern Sans Bold",

"LMSans10", "CM Sans", "Computer Modern Sans Regular",

6.3   Monospace

"Latin Modern Typewriter 8", "Latin Modern Typewriter 9", "Latin Modern Typewriter 10", "Latin Modern Typewriter 12",

"LMTypewriter10", "CM Typewriter", "Computer Modern Typewriter Regular", "Universal Modern Typewriter", "umtt10",

Computer Modern Bright (only in CM-Super):

Computer Modern Bright

Concrete (only in CM-Super):

Computer Modern Concrete

7   Availability of LaTeX-fonts for screen

All are in Type 1 format except

Latin Modern:

Debian users can install package called "lmodern"

cm-lgc:

CTAN: fonts/ps-type1/cm-lgc

Universal Modern:

These fonts are in True Type format

http://www.truetex.com/

CM-Super:

This bunch of fonts is really big. You'd better take only Computer Modern Bright and Concrete fonts from them.

CTAN: fonts/ps-type1/cm-super

hfbright is a bunch of fonts that were left out from the original cm-super fonts. But don't install them so, that X Window System and fontconfig will see them, because they break things. But if you want to install them for LaTeX, here they are:

CTAN: fonts/ps-type1/hfbright

Users of Windows without Type 1 support need ATM (Adobe Type Manager):

8   Installation of own fonts for X Window System by hand

If you are lazy, just put your font files to ~/.fonts . That way has just few drawbacks:

If you follow these steps, also legacy software will use your fonts and they are cached by fontconfig and they are usable for all users of that computer. Everything after this point must be done as root.

Create directory /usr/local/share/fonts and create subdirs Type1, TrueType and OpenType there.

Your config of X.org (/etc/X11/xorg.conf) must have those font paths:

Section "Files"
  FontPath    "unix/:7100"    # local font server
  # if the local font server has problems,
  # we can fall back on these
  FontPath  "/usr/lib/X11/fonts/Type1"
  FontPath  "/usr/lib/X11/fonts/TrueType"
  FontPath  "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
  FontPath  "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
  FontPath  "/usr/local/share/fonts/Type1"
  FontPath  "/usr/local/share/fonts/TrueType"
  FontPath  "/usr/local/share/fonts/OpenType"
  FontPath  "/usr/lib/X11/fonts/Speedo"
  FontPath  "/usr/lib/X11/fonts/misc"
  FontPath  "/usr/lib/X11/fonts/100dpi/:unscaled"
  FontPath  "/usr/lib/X11/fonts/75dpi/:unscaled"
  FontPath  "/usr/lib/X11/fonts/100dpi"
  FontPath  "/usr/lib/X11/fonts/75dpi"
EndSection

Your X.org needs modules freetype and type1:

Section "Module"
    Load    "bitmap"
    Load    "dbe"
    Load    "ddc"
    Load    "dri"
    Load    "extmod"
    Load    "freetype"
    Load    "glx"
    Load    "int10"
    Load    "record"
    Load    "type1"
    Load    "vbe"
EndSection

Configuration file of fontconfig (/etc/fonts/fonts.conf) must have that path, too:

<dir>/usr/share/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>

There is no need to mention subdirs in that config.

8.1   Installation steps for Type 1 fonts

  • Put those Type 1 fonts to /usr/local/share/fonts/Type1 Each font consists of two files: one of them has ending ”.atm” and one of them end either ”.pfa” or ”.pfb”
  • Run these commands in that directory:
rm -f fonts.cache-1 fonts.dir fonts.scale Fontmap fonts.scale.bak Fontmap.bak
type1inst
chown -R root: .
chmod -R ugo+rX,go-w .

8.2   Installation steps for True Type fonts

  • Put those True Type fonts (filenames ending ”.ttf” to /usr/local/share/fonts/TrueType
  • Run these commands in that directory
rm -f fonts.cache-1 fonts.dir fonts.scale
ttmkfdir -o fonts.scale
mkfontdir
chown -R root: .
chmod -R ugo+rX,go-w .

8.3   Installation steps for Open Type fonts

  • Put those OpenType fonts (filenames ending ”.otf” to /usr/local/share/fonts/OpenType
  • Run these commands in that directory
rm -f fonts.cache-1 fonts.dir fonts.scale
mkfontscale ; mkfontdir
chown -R root: .
chmod -R ugo+rX,go-w .

8.4   Procedures after installation

fc-cache -s -r -v
chown -R root: /usr/local/share/fonts
chmod -R ugo+rX,go-w /usr/local/share/fonts

After this point you must give commands as normal user (non-root).

You don't need to restart X to see those new fonts in non-fontconfig-supported programs. You can add font paths to X on the fly like this:

xset fp+ /usr/local/share/fonts/Type1
xset fp+ /usr/local/share/fonts/TrueType
xset fp+ /usr/local/share/fonts/OpenType

To find new fonts from paths you already using, give this command:

xset fp rehash

Give this command in order to update your fontconfig-cache:

fc-cache -r -v

9   Suggestions for order of fonts in <hX>-tags

9.1   Principles

  • Serif fonts are very readable when printed on paper. When reading from screen, your serif fonts of body text must be carefully designed for screen, you must have good resolution in your monitor and your operating system must have good antialiasing and (auto)hinting support for fonts. In most cases you'd better stick with sans serif fonts, when reading text from screen.
  • To distinguish body text from title text they need some contrast. Traditional way is to use bold and big font for titles. But don't use same font for titles and body text. It is not enough: If serif font is used for titles, then sans serif font must be used for body text. That way you do not need so big fonts for titles. This principle can be used vice versa only in printed documents except if you have good resolution and antialiasing. See also KOMA-script document classes for LaTeX to see this principle in use.
  • The more well suited font is for screen, the smaller it can be: Use calligraphic or chancery fonts only for the biggest titles, like <h1>, if you use them at all. Then use some serif fonts for smaller titles. Finally, if you use sans serif fonts for titles, use them only for the smallest titles, like <h5> and <h6>.
  • The closer to body text we get, the more we can use sans serif font. This principle can be used vice versa only in printed documents.
  • Don't try to put monospace fonts to titles or all body text. It looks stupid. Use it only in such text that can be put between <tt>- or <pre>-tags.
  • Not everybody have fonts of Bitstream Vera family. But if they are installed, use them! They rule! Put also their enhaced versions DejaVu and Arev.
  • Try to avoid Times and Helvetica. They are so overused. Also Schoolbook and Bookman are overused.
  • Palatino is very readable even on paper of bad quality. Therefore it works well on screen, too. Bitstream Charter was originally designed for screen, even for low-resolution screen. Fonts of Bitstream Vera family are even newer fonts designed for screen. Bookman, Schoolbook, Times and their clones are not good for screen.
  • When bolded, Bookman looks darker, wider and thicker than Schoolbook and Schoolbook looks darker, wider and thicker than Times

9.2   Orders

9.2.1   Basic order

  • Zapf Chancery and clones
  • Bookman and clones
  • Schoolbook and clones
  • Times and clones
  • Palatino and clones
  • Bitstream Charter and clones
  • Bitstream Vera Serif and enhanced version
  • Avant Garde and clones
  • Bitstream Vera Sans and Helvetica and clones

9.2.2   A little bit artistic and calligraphic

Suggestion 1a: Not-so-official and artistic styles:

  • <h1> Zapf Chancery and clones
  • <h2> Bookman and clones
  • <h3> Schoolbook and clones
  • <h4> Bitstream Vera Serif, Times and clones
  • <h5> Palatino and clones
  • <h6> Bitstream Charter and clones

Suggestion 1b: variation of the above: More sans serif used:

  • <h1> Zapf Chancery and clones
  • <h2> Bitstream Vera Serif, Bookman and clones, Schoolbook and clones, Times and clones
  • <h3> Palatino and clones
  • <h4> Bitstream Charter and clones
  • <h5> Avant Garde and clones
  • <h6> Bitstream Vera Sans and Helvetica and clones

Suggestion 1c: variation of the above: More chancery used:

  • <h1> <h2> Zapf Chancery and clones
  • <h3> Bitstream Vera Serif, Bookman and clones, Schoolbook and clones, Times and clones
  • <h4> Palatino and clones
  • <h5> Bitstream Charter and clones
  • <h6> Avant Garde and clones, Bitstream Vera Sans and Helvetica and clones

9.2.3   Official and formal style

Suggestion 2a: More official and formal styles:

  • <h1> Bookman and clones
  • <h2> Schoolbook and clones
  • <h3> Bitstream Vera Serif, Times and clones
  • <h4> Palatino and clones
  • <h5> Bitstream Charter and clones
  • <h6> Avant Garde and clones, Bitstream Vera Sans and Helvetica and clones

Suggestion 2b: variation of the above: More Palatino used:

  • <h1> Bitstream Vera Serif, Bookman and clones, Schoolbook and clones, Times and clones
  • <h2> <h3> Palatino and clones
  • <h4> Bitstream Charter and clones
  • <h5> Avant Garde and clones
  • <h6> Bitstream Vera Sans and Helvetica and clones

Suggestion 2c: variation of the above: All hail Palatino and Charter!:

  • <h1> Bitstream Vera Serif, Bookman and clones, Schoolbook and clones
  • <h2> <h3> Palatino and clones
  • <h4> <h5> Bitstream Charter and clones, Times and clones
  • <h6> Avant Garde and clones, Bitstream Vera Sans and Helvetica and clones

Suggestion 3: More sans-serif used:

  • <h1> Bookman and clones, Schoolbook and clones
  • <h2> Bitstream Vera Serif, Times and clones
  • <h3> Palatino and clones
  • <h4> Bitstream Charter and clones
  • <h5> Avant Garde and clones
  • <h6> Bitstream Vera Sans and Helvetica and clones

Suggestion 4: Try to avoid Times, Schoolbook and Bookman:

  • <h1> <h2> Palatino and clones
  • <h3> <h4> Bitstream Charter and clones, Bookman and clones, Schoolbook and clones, Times and clones
  • <h5> Bitstream Vera Serif, Avant Garde and clones
  • <h6> Bitstream Vera Sans and Helvetica and clones

9.2.4   For mediatype called print

Suggestion 5a: For printing: Use sans-serif as much as possible for titles:

  • <h1> Avant Garde and clones
  • <h2> Bitstream Vera Sans and Helvetica and clones
  • <h3> <h4> Bitstream Charter and clones, Bookman and clones
  • <h5> Bitstream Vera Serif, Schoolbook and clones, Times and clones
  • <h6> Palatino and clones

Suggestion 5b: Variation of above:

  • <h1> Avant Garde and clones
  • <h2> Bitstream Vera Sans and Helvetica and clones
  • <h3> <h4> Bitstream Vera Serif, Bitstream Charter and clones, Bookman and clones
  • <h5> <h6> Palatino and clones, Schoolbook and clones, Times and clones

Suggestion 5c: Variation of above:

  • <h1> <h2> Avant Garde and clones
  • <h3> <h4> Bitstream Vera Sans and Helvetica and clones
  • <h5> Bitstream Vera Serif, Bitstream Charter and clones, Bookman and clones
  • <h6> Palatino and clones

10   Todo