@@ -3348,6 +3348,8 @@ <h2 id="StyleDefinition">Style definition</h2>
3348
3348
<a class="message" href="#SCI_STYLESETWEIGHT">SCI_STYLESETWEIGHT(int style, int
3349
3349
weight)</a><br />
3350
3350
<a class="message" href="#SCI_STYLEGETWEIGHT">SCI_STYLEGETWEIGHT(int style) → int</a><br />
3351
+ <a class="message" href="#SCI_STYLESETSTRETCH">SCI_STYLESETSTRETCH(int style, int stretch)</a><br />
3352
+ <a class="message" href="#SCI_STYLEGETSTRETCH">SCI_STYLEGETSTRETCH(int style) → int</a><br />
3351
3353
<a class="message" href="#SCI_STYLESETITALIC">SCI_STYLESETITALIC(int style, bool
3352
3354
italic)</a><br />
3353
3355
<a class="message" href="#SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int style) → bool</a><br />
@@ -3407,6 +3409,8 @@ <h2 id="StyleDefinition">Style definition</h2>
3407
3409
<b id="SCI_STYLEGETBOLD">SCI_STYLEGETBOLD(int style) → bool</b><br />
3408
3410
<b id="SCI_STYLESETWEIGHT">SCI_STYLESETWEIGHT(int style, int weight)</b><br />
3409
3411
<b id="SCI_STYLEGETWEIGHT">SCI_STYLEGETWEIGHT(int style) → int</b><br />
3412
+ <b id="SCI_STYLESETSTRETCH">SCI_STYLESETSTRETCH(int style, int stretch)</b><br />
3413
+ <b id="SCI_STYLEGETSTRETCH">SCI_STYLEGETSTRETCH(int style) → int</b><br />
3410
3414
<b id="SCI_STYLESETITALIC">SCI_STYLESETITALIC(int style, bool italic)</b><br />
3411
3415
<b id="SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int style) → bool</b><br />
3412
3416
These messages (plus <a class="message"
@@ -3435,6 +3439,68 @@ <h2 id="StyleDefinition">Style definition</h2>
3435
3439
The <code>SCI_STYLESETBOLD</code> message takes a boolean argument with 0 choosing <code>SC_WEIGHT_NORMAL</code>
3436
3440
and 1 <code>SC_WEIGHT_BOLD</code>.
3437
3441
</p>
3442
+ <p>The stretch of a font can be set with <code>SCI_STYLESETSTRETCH</code> which can produce condensed or expanded text.
3443
+ The weight is a number between 1 and 9 which corresponds to a horizontal magnification between 50% and 200%
3444
+ with 1 being very condensed, 5 normal, and 9 very expanded.
3445
+ While any value can be used, fonts and platforms often only support between 2 and 3 stretches.
3446
+ The best supported and useful values are
3447
+ <code>SC_STRETCH_CONDENSED</code>,
3448
+ <code>SC_STRETCH_NORMAL</code>, and
3449
+ <code>SC_STRETCH_EXPANDED</code>.
3450
+ The Inconsolata variable font supports many stretch values and can be useful for experimenting.
3451
+ Condensed text can be used to display more text in a narrower window and expanded text may be used
3452
+ for clearer text that is easier to read.
3453
+ The API is based on the Cascading Style Sheets font-stretch property.
3454
+ </p>
3455
+ <table class="standard" summary="Stretch">
3456
+ <tbody valign="top">
3457
+ <tr>
3458
+ <th align="left"><code>SC_STRETCH_ULTRA_CONDENSED</code></th>
3459
+ <td>1</td>
3460
+ <td>50%</td>
3461
+ </tr>
3462
+ <tr>
3463
+ <th align="left"><code>SC_STRETCH_EXTRA_CONDENSED</code></th>
3464
+ <td>2</td>
3465
+ <td>62.5%</td>
3466
+ </tr>
3467
+ <tr>
3468
+ <th align="left"><code>SC_STRETCH_CONDENSED</code></th>
3469
+ <td>3</td>
3470
+ <td>75%</td>
3471
+ </tr>
3472
+ <tr>
3473
+ <th align="left"><code>SC_STRETCH_SEMI_CONDENSED</code></th>
3474
+ <td>4</td>
3475
+ <td>87.5%</td>
3476
+ </tr>
3477
+ <tr>
3478
+ <th align="left"><code>SC_STRETCH_NORMAL</code></th>
3479
+ <td>5</td>
3480
+ <td>100%</td>
3481
+ </tr>
3482
+ <tr>
3483
+ <th align="left"><code>SC_STRETCH_SEMI_EXPANDED</code></th>
3484
+ <td>6</td>
3485
+ <td>112.5%</td>
3486
+ </tr>
3487
+ <tr>
3488
+ <th align="left"><code>SC_STRETCH_EXPANDED</code></th>
3489
+ <td>7</td>
3490
+ <td>125%</td>
3491
+ </tr>
3492
+ <tr>
3493
+ <th align="left"><code>SC_STRETCH_EXTRA_EXPANDED</code></th>
3494
+ <td>8</td>
3495
+ <td>150%</td>
3496
+ </tr>
3497
+ <tr>
3498
+ <th align="left"><code>SC_STRETCH_ULTRA_EXPANDED</code></th>
3499
+ <td>9</td>
3500
+ <td>200%</td>
3501
+ </tr>
3502
+ </tbody>
3503
+ </table>
3438
3504
3439
3505
<p><b id="SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int style, bool
3440
3506
underline)</b><br />
0 commit comments