summaryrefslogtreecommitdiff
path: root/source/html/handler.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-11-24 15:52:47 +0100
committerTor Andersson <tor.andersson@artifex.com>2014-12-03 12:25:52 +0100
commitbb238db8919162c8976980b8aa48f70664f2f29d (patch)
treeab0641ed78a39e0100830a300b83f0697f3ffebf /source/html/handler.c
parentbd11f27be2e8f6e06ee664ebcc40b17f78a2e9d4 (diff)
downloadmupdf-bb238db8919162c8976980b8aa48f70664f2f29d.tar.xz
html: Pass font size to html_layout_document.
Diffstat (limited to 'source/html/handler.c')
-rw-r--r--source/html/handler.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/html/handler.c b/source/html/handler.c
index fda21f5c..c89e82ae 100644
--- a/source/html/handler.c
+++ b/source/html/handler.c
@@ -15,7 +15,7 @@ html_count_pages(html_document *doc)
{
int count;
- if (!doc->box) html_layout_document(doc, DEFW, DEFH);
+ if (!doc->box) html_layout_document(doc, DEFW, DEFH, 12);
count = ceilf(doc->box->h / doc->page_h);
printf("count pages! %g / %g = %d\n", doc->box->h, doc->page_h, count);
@@ -26,7 +26,7 @@ html_page *
html_load_page(html_document *doc, int number)
{
printf("load page %d\n", number);
- if (!doc->box) html_layout_document(doc, DEFW, DEFH);
+ if (!doc->box) html_layout_document(doc, DEFW, DEFH, 12);
return (void*)((intptr_t)number + 1);
}
@@ -38,7 +38,7 @@ html_free_page(html_document *doc, html_page *page)
fz_rect *
html_bound_page(html_document *doc, html_page *page, fz_rect *bbox)
{
- if (!doc->box) html_layout_document(doc, DEFW, DEFH);
+ if (!doc->box) html_layout_document(doc, DEFW, DEFH, 12);
printf("html: bound page\n");
bbox->x0 = bbox->y0 = 0;
bbox->x1 = doc->page_w;
@@ -73,6 +73,7 @@ printf("html: parsing XHTML.\n");
doc->dirname = NULL;
doc->super.close = (void*)html_close_document;
+ doc->super.layout = (void*)html_layout_document;
doc->super.count_pages = (void*)html_count_pages;
doc->super.load_page = (void*)html_load_page;
doc->super.bound_page = (void*)html_bound_page;