From dcbc339899911e1a3a743de1c0c25d0c253dd39a Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 15 Aug 2024 19:02:46 +1000 Subject: Add SCI_STYLESETSTRETCH to support condensed and expanded text styles. --- doc/ScintillaDoc.html | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index b320621cf..95a830beb 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3348,6 +3348,8 @@ struct Sci_TextToFindFull { SCI_STYLESETWEIGHT(int style, int weight)
SCI_STYLEGETWEIGHT(int style) → int
+ SCI_STYLESETSTRETCH(int style, int stretch)
+ SCI_STYLEGETSTRETCH(int style) → int
SCI_STYLESETITALIC(int style, bool italic)
SCI_STYLEGETITALIC(int style) → bool
@@ -3407,6 +3409,8 @@ struct Sci_TextToFindFull { SCI_STYLEGETBOLD(int style) → bool
SCI_STYLESETWEIGHT(int style, int weight)
SCI_STYLEGETWEIGHT(int style) → int
+ SCI_STYLESETSTRETCH(int style, int stretch)
+ SCI_STYLEGETSTRETCH(int style) → int
SCI_STYLESETITALIC(int style, bool italic)
SCI_STYLEGETITALIC(int style) → bool
These messages (plus SCI_STYLESETBOLD message takes a boolean argument with 0 choosing SC_WEIGHT_NORMAL and 1 SC_WEIGHT_BOLD.

+

The stretch of a font can be set with SCI_STYLESETSTRETCH which can produce condensed or expanded text. + The weight is a number between 1 and 9 which corresponds to a horizontal magnification between 50% and 200% + with 1 being very condensed, 5 normal, and 9 very expanded. + While any value can be used, fonts and platforms often only support between 2 and 3 stretches. + The best supported and useful values are + SC_STRETCH_CONDENSED, + SC_STRETCH_NORMAL, and + SC_STRETCH_EXPANDED. + The Inconsolata variable font supports many stretch values and can be useful for experimenting. + Condensed text can be used to display more text in a narrower window and expanded text may be used + for clearer text that is easier to read. + The API is based on the Cascading Style Sheets font-stretch property. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SC_STRETCH_ULTRA_CONDENSED150%
SC_STRETCH_EXTRA_CONDENSED262.5%
SC_STRETCH_CONDENSED375%
SC_STRETCH_SEMI_CONDENSED487.5%
SC_STRETCH_NORMAL5100%
SC_STRETCH_SEMI_EXPANDED6112.5%
SC_STRETCH_EXPANDED7125%
SC_STRETCH_EXTRA_EXPANDED8150%
SC_STRETCH_ULTRA_EXPANDED9200%

SCI_STYLESETUNDERLINE(int style, bool underline)
-- cgit v1.2.3