Jump to content

Help:Fonts

From Wikisource
Fonts

Users are able to select the font that they use to produce and view Wikisource content.

Viewing Wikisource

[edit]

By default Wikisource uses whichever sans-serif font your web browser specifies.

There are also several ways to choose fonts for display. Certain templates may override these selections, which means you should be extremely careful when setting fonts, as the user may have chosen their own font for accessibility reasons.

Browser settings

[edit]

By setting your browser font, you can change the main font used at all websites, including Wikisource.

Display options

[edit]
Display options menu

In the Display options sidebar menu, there is a selector for "serif" or "sans-serif" fonts. This setting will persist across page loads.

This will have no effect if you have set a specific font using the UniversalLanguageSelector menu (see below).

UniversalLanguageSelector

[edit]

Wikisource uses the Extension:UniversalLanguageSelector extension to enable users to set their font preferences for the entire site, including the menus and other user interfaces.

Overall site font

[edit]

This setting sets the overall site font.

Selecting fonts for the main site content.

The available options are focussed on accessibility:

Choosing "download fonts when needed" will allow ULS to deliver suitable fonts for your selection above, as well as non-Latin fonts for other languages at Wikisource, for example Greek.

Per-language fonts

[edit]

ULS will attempt to load a suitable font for other languages, such as Ancient Greek or Arabic, when no local suitable font is found, as needed, as long as the "download fonts when needed" setting is enabled.

It's theoretically possible to set a user preference for each of these languages from a list of supported options in ULS. However, this is quite fiddly to actually do, pending phab:T289777.

User CSS

[edit]

You can also customise your fonts on an extremely granular basis using your common.css file.

For example, you can set fonts on a per-language basis. Below, the CSS uses the first font found in the list to display Ancient Greek:

[lang=grc] {
    font-family: Gentium, "Linux Libertine", "Palatino Linotype";
}

Only you will see the effect of this CSS.

Editing Wikisource

[edit]

Most works on Wikisource do not specify an exact font to use. The font used is left to the user to configure (as above, or otherwise, for example on an e-reader). This is important for accessibility reasons, as not all fonts are as readable for everyone, and different reading environments may have different needs (e.g. on the web, on paper or on an e-reader).

In particular, Wikisource does not seek to force all texts to be be in the same or similar fonts to how they were published.

A very limited amount of font manipulation is permitted where such a thing doesn't impact readability and provides added value to the work or helps distinguish content where such distinction was made in the original work. It is extremely unusual for entire blocks of text to be set in a specific font.

  • {{serif}} is sometimes used in book title pages
  • {{monospace}} is something used in technical works reproducing computer code. Note: it is generally not used when the whole work is typewritten – in that case, no font should be set.
  • {{cursive}} can be used to indicate handwritten or small amounts of cursive type (sometimes used for image captions).