diff options
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 3f3f8358..42bc7515 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -97,6 +97,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
97 | static const char *bullet = "\u2022"; | 97 | static const char *bullet = "\u2022"; |
98 | iRangecc preAltText = iNullRange; | 98 | iRangecc preAltText = iNullRange; |
99 | enum iGmLineType prevType = text_GmLineType; | 99 | enum iGmLineType prevType = text_GmLineType; |
100 | iBool isFirstText = iTrue; | ||
100 | while (nextSplit_Rangecc(&content, "\n", &line)) { | 101 | while (nextSplit_Rangecc(&content, "\n", &line)) { |
101 | iGmRun run; | 102 | iGmRun run; |
102 | run.color = white_ColorId; | 103 | run.color = white_ColorId; |
@@ -150,6 +151,13 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
150 | run.text = (iRangecc){ bullet, bullet + strlen(bullet) }; | 151 | run.text = (iRangecc){ bullet, bullet + strlen(bullet) }; |
151 | pushBack_Array(&d->layout, &run); | 152 | pushBack_Array(&d->layout, &run); |
152 | } | 153 | } |
154 | if (type == text_GmLineType && isFirstText) { | ||
155 | run.font = firstParagraph_FontId; | ||
156 | isFirstText = iFalse; | ||
157 | } | ||
158 | else if (type != header1_GmLineType) { | ||
159 | isFirstText = iFalse; | ||
160 | } | ||
153 | iRangecc runLine = line; | 161 | iRangecc runLine = line; |
154 | while (!isEmpty_Range(&runLine)) { | 162 | while (!isEmpty_Range(&runLine)) { |
155 | run.bounds.pos = addX_I2(pos, indent * gap_UI); | 163 | run.bounds.pos = addX_I2(pos, indent * gap_UI); |