Template:Unicode/doc: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
Line 14: Line 14:
==Purpose==
==Purpose==


This template was created to allow easy switching to [[unicode]] fonts. This is useful for pages that require unicode to display correctly, such as those written in [[International Phonetic Alphabet]] (commons: [[International Phonetic Alphabet]]). On some browsers, such as [[Microsoft]] [[Internet Explorer]], unicode does not seem to be activated automatically, so this template lets you force it manually.
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]].  


One might ask why bother to use a template for this.  Simply:
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 template code is easier to remember than the HTML font style specification, which must be entered fairly precisely for this to work.
# The template code, although not completely transparent, is more transparent than asking new editors to use inline HTML CSS style tags.  At least for many editors.
# Using the template allows us to change unicode display properties for all articles that employ the template at once. This is useful as the prefered fonts for displaying unicode are somewhat disputable and will change as new, more complete unicode fonts continue to be developed. The way font specification works, we can provide a whole list of suggested fonts and the first one that is active on the user's machine will be selected.


:When the page says Unicode, Internet Explorer will activate Unicode.
*For strings in the [[International Phonetic Alphabet]], use {{tl|IPA}}.
:However, when the page says Arial, Internet Explorer will display Arial. While Arial does include e. g. basic Greek and Cyrillic, it does not include e. g. IPA extensions. These are displayed in Arial anyway when the page says so – that is, they are displayed as the famous rectangles.
*for various non-Latin scripts, use {{tl|lang}} if possible, or {{tl|script}} otherwise.
:David Marjanović | david.marjanovic_at_gmx.at | 00:44 | 2006/5/16
{{TOCright}}


==Fonts==
The fonts currently in use are, in order:


: ''{{Unicode_fonts}}''
{{TOCright}}
 
Controlled by [[Template:Unicode_fonts]].
 
I realize this is not preferable for everyone (I prefer Gentium over Code2000, and Lucida Sans Unicode over Arial Unicode MS), but the reason is simply that the current order will result in the most characters being displayed, and thus is imnhso the best choice for the Wikipedia. I highly recommend using a personal stylesheet (/monobook.css &c, class ''.Unicode'') to enforce a "prettier" display where preferred. [[User talk:Anárion]] 12:46, 16 Mar 2005 (UTC)


==Guts of template==
==Guts of template==
<nowiki><span class="Unicode">{{{1}}}</span></nowiki>.  
<nowiki><span class="Unicode">{{{1}}}</span></nowiki>.  
----
----
wherein class="Unicode" is defined in [[MediaWiki:Common.css]].
wherein class="Unicode" is defined in [[MediaWiki:Common.css]]; this class at present selects the fonts
:[[Code2000]], Code2001, "[[Free Serif]]", "[[TITUS Cyberbit Basic]]", "[[Doulos SIL]]", "Chrysanthi Unicode", "Bitstream Cyberbit", "Bitstream CyberBase", Thryomanes, Gentium, GentiumAlt, "Lucida Grande", "Free Sans", "Arial Unicode MS", "Microsoft Sans Serif", "Lucida Sans Unicode";


A personal stylesheet (/monobook.css &c, class ''.Unicode'') may be used to enforce a "prettier" display where preferred.
==Examples==
==Examples==
<nowiki>{{unicode|&amp;#x22CA;}} and {{unicode|&amp;#x22C9;}}</nowiki> give {{unicode|&#x22CA;}} and {{unicode|&#x22C9;}}.
<nowiki>{{unicode|&amp;#x22CA;}} and {{unicode|&amp;#x22C9;}}</nowiki> give {{unicode|&#x22CA;}} and {{unicode|&#x22C9;}}.

Revision as of 10:10, 24 July 2007

Template:Template doc page viewed directly


Usage

This portion ported as usage from en.wikipedia talk page w:template talk:unicode
Problems and talk discussions should be posted to that page which the programmers have watchlisted.

Template:Tiw containing:

Ver
Update to late P2, P3 call forms. FrankB 15:38, 10 February 2007 (UTC)

Template:Interwikitmp-grp

Purpose

This template was 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; this class at present selects the fonts

Code2000, Code2001, "Free Serif", "TITUS Cyberbit Basic", "Doulos SIL", "Chrysanthi Unicode", "Bitstream Cyberbit", "Bitstream CyberBase", Thryomanes, Gentium, GentiumAlt, "Lucida Grande", "Free Sans", "Arial Unicode MS", "Microsoft Sans Serif", "Lucida Sans Unicode";

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

Examples

{{unicode|&#x22CA;}} and {{unicode|&#x22C9;}} give and .

See also

  • {{latinx}} — favours fonts supporting all the characters in the Latin Exteneded B range (includes Old/Middle English).
  • {{IPA}} — International Phonetic Alphabet.
  • {{polytonic}} — Polytonic Greek.
  • {{mufi}} — Forces a font which supports the MUFI characters.
  • {{transl}} — generic romanization
  • {{script}}