Wiktenauer logo.png

Template:Unicode/doc

From Wiktenauer
< Template:Unicode
Revision as of 03:03, 23 September 2012 by Michael Chidester (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

This template sets the font for its argument to one which is likely to support special symbols. The argument is specified using HTML character encoding, either in decimal (e.g. &#123;) or hexadecimal (e.g. &#xA9;). Examples:

  • {{unicode|&#x22CA;}} -->
  • {{unicode|&#8906;}} -->
  • {{unicode|⋊}} --> (this may look trivial, but could be helpful in some browsers)

or

  • {{unicode|&#x22C9;}} -->
  • {{unicode|&#8905;}} -->
  • {{unicode|⋉}} -->

Purpose

This template was created to allow easy switching to unicode fonts. It should only be used for characters which do not render correctly on some browsers, such as Microsoft Internet Explorer on Windows XP.

The fonts selected are designed to maximize the probability of rendering uncommon Unicode characters correctly. However, different fonts cover different Unicode ranges. It is probably mostly useful for various Unicode symbols. Do not use it for the following:

Internals

The source for the template is:

<span class="Unicode">{{{1}}}</span>

and class="Unicode" is defined in MediaWiki:Common.js as follows:

.Unicode {
    font-family: "Arial Unicode MS", "Lucida Sans Unicode"; 
}

Note it defines this only for Windows XP.

You can override this with your own Unicode class definition in your personal stylesheet (e.g. User:username/common.css).

See also