summaryrefslogtreecommitdiff
path: root/desktop/save_pdf/font_haru.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/save_pdf/font_haru.c')
-rw-r--r--desktop/save_pdf/font_haru.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop/save_pdf/font_haru.c b/desktop/save_pdf/font_haru.c
index faed7c168..0bf86c340 100644
--- a/desktop/save_pdf/font_haru.c
+++ b/desktop/save_pdf/font_haru.c
@@ -336,7 +336,7 @@ bool haru_nsfont_apply_style(const plot_font_style_t *fstyle,
LOG(("Setting font: %s", font_name));
#endif
- size = fstyle->size;
+ size = fstyle->size;
if (font != NULL)
size *= pdf_text_scale;
@@ -344,6 +344,8 @@ bool haru_nsfont_apply_style(const plot_font_style_t *fstyle,
if (size <= 0)
return true;
+ size /= FONT_SIZE_SCALE;
+
if (size > HPDF_MAX_FONTSIZE)
size = HPDF_MAX_FONTSIZE;