Template:Unicode/doc: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(change document to reflect current list of fonts used)
mNo edit summary
Line 2: Line 2:
{{TOCright}}
{{TOCright}}
==Usage==
==Usage==
The template looks for letter font families that are broadly supporting incurrent characters (symbols, characters). Input can be decimal like <tt>&amp;#123;</tt> or hexadecimal <tt>&amp;#A9:</tt>. E.g. (mind the 'x' for hex values):
The template looks for letter font families that are broadly supporting incurrent characters (symbols, characters). Input can be decimal like <tt>&amp;#123;</tt> or hexadecimal <tt>&amp;#xA9:</tt>. E.g. (mind the 'x' for hex values):
* {{code|<nowiki>{{unicode|&amp;#x22CA;}}</nowiki>}} --> {{unicode|&#x22CA;}}  
* {{code|<nowiki>{{unicode|&amp;#x22CA;}}</nowiki>}} --> {{unicode|&#x22CA;}}  
* {{code|<nowiki>{{unicode|&amp;#8906;}}</nowiki>}} --> {{unicode|&#8906;}}  
* {{code|<nowiki>{{unicode|&amp;#8906;}}</nowiki>}} --> {{unicode|&#8906;}}  
* {{code|<nowiki>{{unicode|&#8906;}}</nowiki>}} --> {{unicode|&#8906;}} (seems trivial, but could help in other browsers)
* {{code|<nowiki>{{unicode|&#8906;}}</nowiki>}} --> {{unicode|&#8906;}} (this may look trivial, but could be helpful in other browsers)
or
or
* {{code|<nowiki>{{unicode|&amp;#x22C9;}}</nowiki>}} --> {{unicode|&#x22C9;}}  
* {{code|<nowiki>{{unicode|&amp;#x22C9;}}</nowiki>}} --> {{unicode|&#x22C9;}}  
Line 12: Line 12:


==Purpose==
==Purpose==
This template was created to allow easy switching to [[unicode font]]s. It should ''only'' be used in cases where characters do otherwise not render correctly on some  browsers, such as [[Microsoft]] [[Internet Explorer]].  
This template is created to allow easy switching to [[unicode font]]s. It should ''only'' be used in cases where characters do otherwise not render correctly on some  browsers, such as [[Microsoft]] [[Internet Explorer]].  


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


*For strings in the [[International Phonetic Alphabet]], use {{tl|IPA}}.
*For strings in the [[International Phonetic Alphabet]], use {{tl|IPA}}.
*for various non-Latin scripts, use {{tl|lang}} if possible, or {{tl|script}} otherwise.
*For various non-Latin scripts, use {{tl|lang}} if possible, or {{tl|script}} otherwise.
*for [[MUFI]] encoding (non-Unicode), use {{tl|mufi}}.
*For [[MUFI]] encoding (non-Unicode), use {{tl|mufi}}.


==Guts of template==
==Guts of template==

Revision as of 19:22, 19 November 2010

Usage

The template looks for letter font families that are broadly supporting incurrent characters (symbols, characters). Input can be decimal like &#123; or hexadecimal &#xA9:. E.g. (mind the 'x' for hex values):

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

or

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

Purpose

This template is created to allow easy switching to unicode fonts. It should only be used in cases where characters do otherwise not render correctly on some browsers, such as Microsoft Internet Explorer.

The fonts selected are designed to maximize the probability to render 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:

Guts of template

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

...wherein class="Unicode" is defined in MediaWiki:Common.css/WinFixes.css:

.Unicode {
   font-family: "Arial Unicode MS", "Microsoft Sans Serif", "Free Sans",
                 "Gentium Plus", "Gentium Basic", "Gentium", "GentiumAlt", "DejaVu Sans",
                 "DejaVu Serif", "Free Serif", "TITUS Cyberbit Basic",
                 "Bitstream Cyberbit", "Bitstream CyberBase", "Doulos SIL",
                 "Code2000", "Code2001";
    font-size-adjust: 0.54;
}

A personal stylesheet (/monobook.css &c, class .Unicode) may be used to enforce a "prettier" display where preferred.

See also

  • {{IPA}} — to produce symbols from the International Phonetic Alphabet
  • {{mufi}} — Forces a font which supports the MUFI characters.
  • {{transl}} — generic romanization
  • {{script}} — Scripts in Unicode navigation box
  • {{Unicode navigation}} — General Unicode navigation box