diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-22 09:04:27 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-22 09:04:27 +0200 |
| commit | 227d0422da0062410c85529bc999d7e509d9de78 (patch) | |
| tree | 23102d1fb049b610ec154e7c136e3d92d941bd6d /src/pdf.h | |
| parent | 8ceb1340a9030bb1030be61003dc65b444732b9e (diff) | |
| download | bokf-227d0422da0062410c85529bc999d7e509d9de78.tar.gz bokf-227d0422da0062410c85529bc999d7e509d9de78.zip | |
documents: org name in the invoice and payslip headers, document_header_colorv0.1.63
Diffstat (limited to 'src/pdf.h')
| -rw-r--r-- | src/pdf.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -20,6 +20,12 @@ void pdf_text(struct pdf *p, double x, double baseline, const char *font, double size, const char *rgb, const char *utf8); double pdf_text_width(const char *font, double size, const char *utf8); double pdf_font_ascent(const char *font, double size); +/* Draws utf8 at x/baseline, shrinking the size (down to min_size) to fit + max_w; if it still does not fit, truncates at a whole UTF-8 character so + the text ends with "...". */ +void pdf_text_fit(struct pdf *p, double x, double baseline, const char *font, + double size, double min_size, double max_w, const char *rgb, + const char *utf8); void pdf_path(struct pdf *p, const char *path, double x, double y, const char *rgb); unsigned char *pdf_finish(struct pdf *p, size_t *len); |
