Template:Scriptfonts

From translatewiki.net
Jump to navigation Jump to search

'Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif

Test Template Info-Icon - Version (2).svg
The documentation of Scriptfonts/doc this template is included from its /doc subpage (Edit)
Usage:
Utility to translate ISO 15924 script codes into a list of usable fonts that allow rendering the script on the web.
Syntax:
{{Scriptfonts
| 1=script
| 2=lang
}}
Parameters:
  • 1=script (mandatory) – 4-letter code representing the script name, or 3-digit code, or Unicode alias (Basic English name with all words capitalized and glued by underscores) if the Unicode standard assigned one. The letter case of this parameter is not significant.
    This recognizes all ISO 15924 codes (whose letter case is not significant), including numeric codes, and aliases referenced by the Unicode Character Database (with capitalized initials and underscores as word separators).
  • 2=lang (optional) – A valid BCP 47 language tag into which the script name will be translated. Its letter case is not significant.
    The default empty value will return the fonts suitable for the UI language in the current user language selected in the UI, using {{UILANGCODE}}.
Notes:
  • For now the list of fonts are based on the generic sans-serif style as the prefered one, the list of fonts are not tuned to offer an alternative for the generic serif or monospace style.
  • Each script has its own lists of fonts, except Latin whose fonts are always listed at end to provide additional fallback fonts.
  • Fonts are listed by order of coverage; they may be tuned script by script if additional fonts are available or needed for correct rendering some platforms.
  • All font lists are terminated by a generic font style defined in standard CSS to support other defaults that users may have set up in their browsers.
Examples:
  • ‹{{Scriptfonts|Latn}}› generates ‹'Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif›
  • ‹{{Scriptfonts|Arab}}› generates ‹'Noto Sans Arabic','Noto Sans Arabic UI','Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif›
  • ‹{{Scriptfonts|Hebr}}› generates ‹'Noto Sans Hebrew','Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif›
  • ‹{{Scriptfonts|Deva}}› generates ‹'Noto Sans Devanagari','Nirmala UI','Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif›
  • ‹{{Scriptfonts|Thai}}› generates ‹'Noto Sans Thai','Leelawadee UI','Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif›
  • ‹{{Scriptfonts|Jamo}}› generates ‹'Noto Sans CJK KR','Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif›
  • ‹{{Scriptfonts|Cpmn}}› generates ‹'Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif› (still unsupported by Unicode, so only basic fonts for Latin are returned)
  • ‹{{Scriptfonts|Nand}}› generates ‹'Noto Sans','Noto Serif','Segoe UI','Microsoft Sans Serif','Lucida Sans Unicode','Arial Unicode MS',Unifont,Code2000,sans-serif›
See also: