bold, italic, underline at once

Kent Karlsson kent.b.karlsson at bahnhof.se
Mon Aug 29 13:07:38 CDT 2022



> 29 aug. 2022 kl. 16:56 skrev Doug Ewell via Unicode <unicode at corp.unicode.org>:
> 
> David Chmelik wrote:
> 
>> I know unicode does bold, italic, underline, but does it do them all
>> at once?
> 
> It depends on the sense in which you mean that Unicode "does bold, italic, underline."
> 
> If you're talking about ISO/IEC 6429 ("ANSI”)

Nit: it is actually ANSI X3.64; but the best way to refer to it (international, original, easy to remember) is ECMA-48.

> SGR escape sequences:

Another nit: they are control sequences (I will not delve on the details here).

> in principle you should be able to combine bold ("1"), italic ("3"), and underline ("4”).

Formally, it depends on the GRCM - GRAPHIC RENDITION COMBINATION MODE setting: REPLACING (**really** bad idea) or CUMULATIVE (combine). However, I know of no implementation of any of the ECMA-48 ”modes" (and all of those ”modes" are a bad idea anyway).

> In practice it depends on the capabilities of your terminal or console emulator.

A rather important note: ECMA-48 SGR is in no way at all limited to terminal emulators, though ECMA-48 is popular there since such things as RTF, markdown, HTML are all non-starters for terminals.

ECMA-48 SGR control sequences are perfectly well applicable to text files (though there is a lack of implementations) and ”WYSIWYG” text editors (nowadays called just GUI text editors or text editor windows). Only CSI 0m is specifically targeted to terminals, for use at the beginning(!) of prompts, doing a ”general style reset” from an unknown style setting.

> Note that this has nothing to do with Unicode.

Not entirely true... ISO/IEC 6429 (i.e. ECMA-48) is referenced from both Unicode and ISO/IEC 10646.

/Kent K


> 
> If you're talking about Microsoft Word, OpenOffice Writer, or some other word-processing package: this is almost always supported. Note that this also has nothing to do with Unicode, or plain text at all.
> 
> If you're talking about a private-use mechanism, such as the HTML-like Plane 14 tags supported by Andrew West's BabelPad editor: it depends on the specific mechanism. Andrew's approach does support combining these, plus strikethrough, based on font attributes. Note that no mechanism of this sort is authorized by the Unicode Standard.
> 
> Mathematical Alphanumeric Symbols do not include underlining, do not support combinations of bold and italic except as explicitly encoded, are limited to a very small set of base characters, and are not intended for plain text styling in any event.
> 
> --
> Doug Ewell, CC, ALB | Lakewood, CO, US | ewellic.org
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://corp.unicode.org/pipermail/unicode/attachments/20220829/374d9757/attachment.htm>


More information about the Unicode mailing list