Jump to content

Template:Emoji presentation/doc

From Wikipedia, the free encyclopedia

This template uses Unicode variation selectors to request emoji or text presentation of a character. It works by adding VS15 (U+FE0E) for text presentation, and VS16 (U+FE0F) for emoji presentation.

Note that it only works on a single character; any input after the first character (including existing variation selectors) will be removed.

What the reader actually sees will depend on their software. (To see what it looks like in your software, visit the test cases.) Support requires a renderer that understands (and honours) the variation selector, plus a font that contains the desired character, drawn in the requested style. Most modern computer systems have these, but there are always exceptions (and bugs).

Possible reasons to use this template:

  • It makes the choice visible. Variation selectors are typically not rendered on their own, which makes it hard to edit them separately from the preceding character. Some editors (bots) have been known to strip invisible characters, including variation selectors.
  • It makes the choice readable. You could use a character entity reference like ︎, but other editors may not know what that is. Some editors (not bots) have been known to strip character entities that don't produce a visible character.
    • Also, you would need to look up (or remember) the code points, FE0E and FE0F, and which one is which.
  • It makes it clear that the choice is intentional. {{Emoji presentation|♈}} tells other editors that you want the colourful emoji, not the text style (as would be preferred, say, in astronomy).
    • Input methods, ranging from emoji keyboards to copy-and-paste, may give you either (or no) variation selector automatically. This template means you don't have to know (or care) which one it is.
  • It avoids relying on defaults. Every character that has both emoji and text presentations will default to one or the other, but which one is unpredictable, and some software may not respect the default. (For example, some users have reported that Google Chrome running on Windows 10 selected emoji versions, where other browsers selected text versions.)

Usage

[edit]

The following examples use U+2139 INFORMATION SOURCE.

Default (requests emoji presentation):

{{Emoji presentation|ℹ}}

Explicitly request emoji presentation:

{{Emoji presentation|ℹ|emoji}}

Request text presentation:

{{Emoji presentation|ℹ|text}}

When using this template to request emoji presentation, you should also add {{Contains special characters|emoticon}} at the top of the article, or {{Contains special characters|emoticon|section}} at the top of the section.

Template data

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Emoji presentation in articles based on its TemplateData.

TemplateData for Emoji presentation

Apply a Unicode variation selector to request emoji or text presentation of a character.

Template parameters

ParameterDescriptionTypeStatus
Character1

The Unicode character to be presented as emoji or text. Enter this as text or an XML entity, not as a Unicode codepoint.

Example
Unknownoptional
Presentation style2

The presentation style to be used, either "emoji" or "text".

Default
emoji
Example
emoji
Unknownoptional