Branch
Hash :
5fa80732
Author :
Thomas de Grivel
Date :
2025-12-08T19:48:37
rename function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/* kc3
* Copyright from 2022 to 2025 kmx.io <contact@kmx.io>
*
* Permission is hereby granted to use this software granted the above
* copyright notice and this permission paragraph are included in all
* copies and substantial portions of this software.
*
* THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
* PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
#ifndef KC3_KC3_PDF_WRITE_H
#define KC3_KC3_PDF_WRITE_H
#include <ft2build.h>
#include FT_FREETYPE_H
#include "types.h"
/* Heap-allocation functions, call kc3_pdf_write_delete after use. */
void kc3_pdf_write_delete (s_pdf_write **pdf);
s_pdf_write ** kc3_pdf_write_new_file (s_pdf_write **pdf, s_str *path);
s_pdf_write ** kc3_pdf_write_new (s_pdf_write **pdf);
/* Observers. */
s_str * kc3_pdf_write_to_str (s_pdf_write **pdf, s_str *dest);
/* Operators. */
s_pdf_write ** kc3_pdf_write_add_page (s_pdf_write **pdf,
s_pdf_write_page **page);
void kc3_pdf_write_close (s_pdf_write **pdf);
u32 kc3_pdf_write_font_from_file (s_pdf_write **pdf, s_str *path);
u32 kc3_pdf_write_image_from_file (s_pdf_write **pdf, s_str *path);
sw kc3_pdf_write_ttf_font (s_buf *buf, u32 font_obj,
u32 descriptor_obj, const char *font_name);
sw kc3_pdf_write_ttf_descriptor (s_buf *buf, u32 descriptor_obj,
u32 file_obj,
const char *font_name,
u16 units_per_em,
s16 ascender, s16 descender,
const FT_BBox *bbox,
uw file_length);
sw kc3_pdf_write_ttf_file (s_buf *buf, u32 file_obj, FILE *fp,
uw length);
#endif /* KC3_KC3_PDF_WRITE_H */