diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-30 14:57:51 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-30 14:57:51 +0300 |
commit | 23f70040368e8d5577f89b2bacf303b5dac8561f (patch) | |
tree | 0dc962bc7c015d268a908458c84a2651511ecb55 /src | |
parent | b74f7362fd0ad43b50fdda6c7b50a24dd158f53b (diff) |
GmDocument: Font size for preformatted
Indents are disabled in the beginning.
Diffstat (limited to 'src')
-rw-r--r-- | src/gmdocument.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 313fd40a..378926e7 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -421,7 +421,8 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
421 | iGmPreMeta meta = { .bounds = line }; | 421 | iGmPreMeta meta = { .bounds = line }; |
422 | meta.pixelRect.size = measurePreformattedBlock_GmDocument_( | 422 | meta.pixelRect.size = measurePreformattedBlock_GmDocument_( |
423 | d, line.start, preFont, &meta.contents, &meta.bounds.end); | 423 | d, line.start, preFont, &meta.contents, &meta.bounds.end); |
424 | if (meta.pixelRect.size.x > d->size.x - indents[preformatted_GmLineType] * gap_Text) { | 424 | if (meta.pixelRect.size.x > |
425 | d->size.x - (enableIndents ? indents[preformatted_GmLineType] : 0) * gap_Text) { | ||
425 | preFont = preformattedSmall_FontId; | 426 | preFont = preformattedSmall_FontId; |
426 | meta.pixelRect.size = measureRange_Text(preFont, meta.contents); | 427 | meta.pixelRect.size = measureRange_Text(preFont, meta.contents); |
427 | } | 428 | } |