From 4d1a31d6a74019c3d43de1c33e2be093ed6dfd11 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 31 Jul 2021 08:49:25 +1000 Subject: Implement StyleSetCheckMonospaced. --- doc/ScintillaDoc.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index eccf3ee55..245b467c4 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3021,6 +3021,9 @@ struct Sci_TextToFind { SCI_STYLESETHOTSPOT(int style, bool hotspot)
SCI_STYLEGETHOTSPOT(int style) → bool
+ SCI_STYLESETCHECKMONOSPACED(int style, bool + checkMonospaced)
+ SCI_STYLEGETCHECKMONOSPACED(int style) → bool
SCI_SETFONTLOCALE(<unused>, const char *localeName)
SCI_GETFONTLOCALE(<unused>, char *localeName) → int
@@ -3265,6 +3268,28 @@ struct Sci_TextToFind { may change and an underline appear to indicate that these areas are sensitive to clicking. This may be used to allow hyperlinks to other documents.

+

SCI_STYLESETCHECKMONOSPACED(int style, bool + checkMonospaced)
+ SCI_STYLEGETCHECKMONOSPACED(int style) → bool
+ This attribute indicates that the font may be monospaced over the ASCII graphics characters (' ' … '~', + including letters ('a'…'z', 'A'…'Z') and numbers ('0'…'9')). + This allows optimizing speed and memory use for some common scenarios where documents are mostly composed from ASCII + characters.

+

+ Fonts are rarely monospaced over all possible characters. + Emoji '😃', Arabic characters 'ش' and Chinese ideographs '漢' are often different widths to Roman letters. + Even when a font is designed as monospaced, not all characters may be present + and platforms may substitute other fonts for any missing characters with the substitute characters taking more or less space. + However, fonts are often reliably monospaced over ASCII text (disregarding control characters) and many documents contain + mostly ASCII characters. + This setting allows simplified position calculations for text runs that are purely ASCII graphics characters. +

+

+ Before treating the font as monospaced, it is first checked over the ' ' … '~' range and for some known combinations of characters + that may have different spacings because of kerning or ligatures. + Applications may apply the 'check monospaced' attribute just to fonts known to be monospaced or on all fonts, leaving it to Scintilla to + reject fonts that are proportional.

+

SCI_SETFONTLOCALE(<unused>, const char *localeName)
SCI_GETFONTLOCALE(<unused>, char *localeName NUL-terminated) → int
These messages set the locale used for font selection with language-dependent glyphs. -- cgit v1.2.3