summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gmdocument.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index fb5f0667..b9832f38 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -492,7 +492,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
492 0.0f, 0.25f, 1.0f, 0.5f, 2.0f, 1.5f, 1.25f, 0.25f 492 0.0f, 0.25f, 1.0f, 0.5f, 2.0f, 1.5f, 1.25f, 0.25f
493 }; 493 };
494 static const float bottomMargin[max_GmLineType] = { 494 static const float bottomMargin[max_GmLineType] = {
495 0.0f, 0.25f, 1.0f, 0.5f, 0.5f, 0.5f, 0.5f, 0.25f 495 0.0f, 0.25f, 1.0f, 0.5f, 1.5f, 0.5f, 0.5f, 0.25f
496 }; 496 };
497 static const char *arrow = rightArrowhead_Icon; 497 static const char *arrow = rightArrowhead_Icon;
498 static const char *envelope = "\U0001f4e7"; 498 static const char *envelope = "\U0001f4e7";
@@ -623,7 +623,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
623 banner.textParams.color = tmBannerTitle_ColorId; 623 banner.textParams.color = tmBannerTitle_ColorId;
624 pushBack_Array(&d->layout, &banner); 624 pushBack_Array(&d->layout, &banner);
625 pos.y += height_Rect(banner.visBounds) + 625 pos.y += height_Rect(banner.visBounds) +
626 lineHeight_Text(paragraph_FontId) * prefs->lineSpacing; 626 1.5f * lineHeight_Text(paragraph_FontId) * prefs->lineSpacing;
627 } 627 }
628 } 628 }
629 /* Empty lines don't produce text runs. */ 629 /* Empty lines don't produce text runs. */
@@ -959,7 +959,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
959 /* Footer. */ 959 /* Footer. */
960 if (siteBanner_GmDocument(d)) { 960 if (siteBanner_GmDocument(d)) {
961 iGmRun footer = { .flags = decoration_GmRunFlag | footer_GmRunFlag }; 961 iGmRun footer = { .flags = decoration_GmRunFlag | footer_GmRunFlag };
962 footer.visBounds = (iRect){ pos, init_I2(d->size.x, lineHeight_Text(banner_FontId) * 1) }; 962 footer.visBounds = (iRect){ pos, init_I2(d->size.x, lineHeight_Text(banner_FontId) * 2) };
963 pushBack_Array(&d->layout, &footer); 963 pushBack_Array(&d->layout, &footer);
964 pos.y += footer.visBounds.size.y; 964 pos.y += footer.visBounds.size.y;
965 } 965 }
@@ -979,8 +979,8 @@ static void doLayout_GmDocument_(iGmDocument *d) {
979 } 979 }
980 } 980 }
981 } 981 }
982 printf("[GmDocument] layout size: %zu runs (%zu bytes)\n", 982// printf("[GmDocument] layout size: %zu runs (%zu bytes)\n",
983 size_Array(&d->layout), size_Array(&d->layout) * sizeof(iGmRun)); 983// size_Array(&d->layout), size_Array(&d->layout) * sizeof(iGmRun));
984} 984}
985 985
986void init_GmDocument(iGmDocument *d) { 986void init_GmDocument(iGmDocument *d) {
@@ -1679,12 +1679,12 @@ static void normalize_GmDocument(iGmDocument *d) {
1679 } 1679 }
1680 appendCStr_String(normalized, "\n"); 1680 appendCStr_String(normalized, "\n");
1681 } 1681 }
1682 printf("hasTabs: %d\n", hasTabs); 1682// printf("hasTabs: %d\n", hasTabs);
1683 printf("wasNormalized: %d\n", wasNormalized); 1683// printf("wasNormalized: %d\n", wasNormalized);
1684 fflush(stdout); 1684// fflush(stdout);
1685 set_String(&d->source, collect_String(normalized)); 1685 set_String(&d->source, collect_String(normalized));
1686 //normalize_String(&d->source); /* NFC */ 1686 //normalize_String(&d->source); /* NFC */
1687 printf("orig:%zu norm:%zu\n", size_String(&d->unormSource), size_String(&d->source)); 1687// printf("orig:%zu norm:%zu\n", size_String(&d->unormSource), size_String(&d->source));
1688 /* normalized source has an extra newline at the end */ 1688 /* normalized source has an extra newline at the end */
1689// iAssert(wasNormalized || equal_String(&d->unormSource, &d->source)); 1689// iAssert(wasNormalized || equal_String(&d->unormSource, &d->source));
1690} 1690}
@@ -1700,11 +1700,11 @@ void setUrl_GmDocument(iGmDocument *d, const iString *url) {
1700 1700
1701void setSource_GmDocument(iGmDocument *d, const iString *source, int width, 1701void setSource_GmDocument(iGmDocument *d, const iString *source, int width,
1702 enum iGmDocumentUpdate updateType) { 1702 enum iGmDocumentUpdate updateType) {
1703 printf("[GmDocument] source update (%zu bytes), width:%d, final:%d\n", 1703// printf("[GmDocument] source update (%zu bytes), width:%d, final:%d\n",
1704 size_String(source), width, updateType == final_GmDocumentUpdate); 1704// size_String(source), width, updateType == final_GmDocumentUpdate);
1705 if (size_String(source) == size_String(&d->unormSource)) { 1705 if (size_String(source) == size_String(&d->unormSource)) {
1706 iAssert(equal_String(source, &d->unormSource)); 1706 iAssert(equal_String(source, &d->unormSource));
1707 printf("[GmDocument] source is unchanged!\n"); 1707// printf("[GmDocument] source is unchanged!\n");
1708 return; /* Nothing to do. */ 1708 return; /* Nothing to do. */
1709 } 1709 }
1710 set_String(&d->unormSource, source); 1710 set_String(&d->unormSource, source);