1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-16 06:15:07 -05:00
xeps/xep-0457.xml
Jonas Schรคfer 50d32f9151 Accept XEP-0457 as Active
Approving body is Editor because of the track.
2021-03-31 17:50:18 +02:00

163 lines
6.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Message Fancying</title>
<abstract>This specification defines a Unicode-formatted fancy text syntax for use in instant messages.</abstract>
&LEGALNOTICE;
<number>0457</number>
<status>Active</status>
<type>Humorous</type>
<sig>None</sig>
<approver>Editor</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
</dependencies>
<supersedes>
<spec>XEP-0071</spec>
<spec>XEP-0393</spec>
<spec>XEP-0394</spec>
</supersedes>
<supersededby/>
<shortname>fancying</shortname>
<author>
<firstname>Georg</firstname>
<surname>Lukas</surname>
<email>georg@op-co.de</email>
<jid>georg@yax.im</jid>
</author>
<revision>
<version>1.0.0</version>
<date>2021-04-01</date>
<initials>XEP Editor (jsc)</initials>
<remark>Initial published version.</remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2021-04-01</date>
<initials>gl</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>
XMPP-based Instant Messages has suffered from a lack of proper message
styling mechanisms. After abandoning &xep0071; for its horrible security
track record, &xep0393; and &xep0394; were proposed as replacements, but
neither was able to gain sufficient traction to become the default styling
mechanism.
</p>
<p>
This specification fills the gap by formally specifying the Unicode-based
formatting that is currently fancied on Social Media and micro-blogging as
an XMPP standard for Instant Messaging. As XMPP is based on UTF-8, messages
formatted with this mechanism are immediately visible on all receiving
clients. Simple third-party tools can be used for writing messages until
this specification is integrated into the IM message input boxes.
</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>This specification relies on Unicode features introduced in the 3.1
specification. As XMPP implementations are required to support Unicode 3.2
for StringPrep during SASL authentication, no new requirements arise.</p>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<ul>
<li>
As a user sending an instant message to a friend, I want to be able to
emphasize an important part of my message.
</li>
<li>
As a software developer, I want to be able to send code as pre-formatted,
monospace, block or inline text to another developer.
</li>
<li>
As a user of non-Latin script, I want to be surprised by inconsistent
transitions and missing range checks resulting in characters from random
Unicode planes.
</li>
<li>
As a visually impaired user, I want my screen reader to emit long
sequences of technical names of Unicode special characters to really
convey the point of the intended emphasis, character by character!
</li>
<li>
As a multi-user chat user I want to add context to my reply by quoting an
earlier message in the chat.
</li>
</ul>
</section1>
<section1 topic='Business Rules' anchor='rules'>
<section2 topic='Preformatted Text' anchor='pre'>
<p>To format a string as Preformatted Text, the individual code-points need
to be converted to their integer representation, then increased by
<tt>0x1D62F</tt> (capital letters) or <tt>0x1D629</tt> (lowercase letters)
and then converted back to characters.</p>
<div class='example'>Preformatted text โ†’ ๐™ฟ๐š›๐šŽ๐š๐š˜๐š›๐š–๐šŠ๐š๐š๐šŽ๐š ๐š๐šŽ๐šก๐š</div>
</section2>
<section2 topic='Emphasis' anchor='emphasis'>
<p>To format a string with Emphasis, the individual code-points need
to be converted to their integer representation, then increased by
<tt>0x1D3F3</tt> (capital letters) or <tt>0x1D3ED</tt> (lowercase letters)
and then converted back to characters.</p>
<div class='example'>Emphasis โ†’ ๐ธ๐‘š๐‘โ„Ž๐‘Ž๐‘ ๐‘–๐‘ </div>
</section2>
<section2 topic='Strong Emphasis' anchor='strong'>
<p>To format a string with Strong Emphasis, the individual code-points need
to be converted to their integer representation, then increased by
<tt>0x1D3BF</tt> (capital letters) or <tt>0x1D3B9</tt> (lowercase letters)
and then converted back to characters.</p>
<div class='example'>Strong Emphasis โ†’ ๐’๐ญ๐ซ๐จ๐ง๐  ๐„๐ฆ๐ฉ๐ก๐š๐ฌ๐ข๐ฌ</div>
</section2>
<section2 topic='Very Strong Emphasis' anchor='strong-emphasis'>
<p>To format a string with Very Very Strong Emphasis, the individual code-points need
to be converted to their integer representation, then increased by
<tt>0x1D427</tt> (capital letters) or <tt>0x1D421</tt> (lowercase letters)
and then converted back to characters.</p>
<div class='example'>Very Strong Emphasis โ†’ ๐‘ฝ๐’†๐’“๐’š ๐‘บ๐’•๐’“๐’๐’๐’ˆ ๐‘ฌ๐’Ž๐’‘๐’‰๐’‚๐’”๐’Š๐’”</div>
</section2>
<section2 topic='Strike through' anchor='strike'>
<p>To format a string as struck through, each code-point needs to be
extended with a U-0336 COMBINING LONG STROKE OVERLAY postfix.</p>
<div class='example'>Strike through โ†’ Sฬถtฬถrฬถiฬถkฬถeฬถ ฬถtฬถhฬถrฬถoฬถuฬถgฬถhฬถ</div>
</section2>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<p>Some clients will use a serif-less font instead of a serif font to display
instant messages, or even allow the user to choose an arbitrary font. The
formatting defined in this document assumes the use of serif fonts, however.
If a formatted text is to be displayed in a context that is not supposed to
render serifs, the displaying implementation MUST add <tt>0x1D4</tt> to the
respective integer representations of the fancy code-points.
</p>
<p>On the wire, the serif representation always MUST be used.</p>
<p>Determining whether a given display font is serif or sans-serif is out of
scope of this specification.</p>
</section1>
<section1 topic='Accessibility Considerations' anchor='access'>
<p>๐žœ๐žธ๐žฐ๐žฎ</p>
</section1>
<section1 topic='Internationalization Considerations' anchor='i18n'>
<p>๐Ÿ‡ณ๐Ÿ‡ด๐Ÿ‡ณ๐Ÿ‡ช</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>The rendering of fonts is a complex task performed in the most inner guts
of the operating system. Over the last decades, various exploits have been
discovered in all major operating systems. Unfortunately, fixing those
issues is far beyond the abilities of a simple XMPP client.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>
This document requires no interaction with &IANA;.
</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>None.</p>
</section1>
</xep>