Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Font/doc: Difference between revisions

Template page
Added supporting doccumentation for Template:Font
 
m convert to hsla colors with {{table green}} and {{table red}} templates
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>Template doc page transcluded from {{SUBJECTPAGENAME}}/doc</includeonly><noinclude>Documentation for [[Template:Font]]</br></br></noinclude>
<includeonly>Template doc page transcluded from [[{{SUBJECTPAGENAME}}/doc]]</includeonly><noinclude>Documentation for [[Template:Font]]</br></br></noinclude>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->


Line 14: Line 14:
!colspan="5"| Safe to use in-line !!colspan="2"| Not safe to use in-line
!colspan="5"| Safe to use in-line !!colspan="2"| Not safe to use in-line
|-
|-
|style="background:#9EFF9E;"|<code>Arial</code><br>{{font||Arial|Arial}}
|{{table green}}|<code>Arial</code><br>{{font||Arial|Arial}}
|style="background:#9EFF9E;"|<code>Comic Sans MS</code><br>{{font||Comic Sans MS|Comic Sans MS}}
|{{table green}}|<code>Comic Sans MS</code><br>{{font||Comic Sans MS|Comic Sans MS}}
|style="background:#9EFF9E;"|<code>Georgia</code><br>{{font||Georgia|Georgia}}
|{{table green}}|<code>Georgia</code><br>{{font||Georgia|Georgia}}
|style="background:#9EFF9E;"|<code>Trebuchet MS</code><br>{{font||Trebuchet MS|Trebuchet MS}}
|{{table green}}|<code>Trebuchet MS</code><br>{{font||Trebuchet MS|Trebuchet MS}}
|style="background:#9EFF9E;"|<code>Verdana</code><br>{{font||Verdana|Verdana}}
|{{table green}}|<code>Verdana</code><br>{{font||Verdana|Verdana}}
|style="background:#FFC7C7;"|<code>Times New Roman</code><br>{{font||Times New Roman|Times New Roman}}
|{{table red}}|<code>Times New Roman</code><br>{{font||Times New Roman|Times New Roman}}
|style="background:#FFC7C7;"|<code>Courier New</code><br>{{font||Courier New|Courier New}}
|{{table red}}|<code>Courier New</code><br>{{font||Courier New|Courier New}}
|}
|}
== Parameters ==
== Parameters ==

Latest revision as of 19:55, 14 November 2024

Documentation for Template:Font

Useage

To be used to easily change the font size and family of text.

{{font|1|2|3}}
{{font|size|family|text}}

Fonts that are safe to use

The following section should be used to document the names of fonts supported, by default, by Wikimedia and the respective issues with each one (changing fonts is not seamless in wiki markup, especially for in-line stuff.) Any questions can be directed to User:Devonnn or consultation of the Wikipedia Font page.

Safe to use in-line Not safe to use in-line
Arial
Arial
Comic Sans MS
Comic Sans MS
Georgia
Georgia
Trebuchet MS
Trebuchet MS
Verdana
Verdana
Times New Roman
Times New Roman
Courier New
Courier New

Parameters

Parameter Description Type Status
1 Desired font size. Can either be in px, em, or a % (e.g. "80%"). Blank value will automatically inherit the font-size. content optional
2 Desired font family. Will default to sans-serif by default. These wiki fonts might work. content optional
3 Text that is resized or having it's font changed. content required

Examples

The {{{3}}} template can currently be used to change the text's size or font-family.

An example of changing the size:

{{font|200%||I'm big af}}

Will result in the following:

I'm big af

Which could also be done by assigning it a particular pixel size:

{{font|10px||You're actually kind of small.}}

Which will result in the following:

You're actually kind of small.

Alternatively, the template can be used to specify a different font family. An example of this:

{{font||Comic Sans MS|This font is worse than genocide :D}}

Will result in the following:

This font is worse than genocide :D

Or, it can be used to change both the font size and family.

{{font|3em|Georgia| Serif font {{=}} Goated.}}

Which will result in the following:

Serif font = Goated.