summaryrefslogtreecommitdiff
path: root/include/mupdf/pdf/font.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-03-15 11:55:06 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-03-16 14:51:41 +0100
commit1cd2046b3cce264a3d13481652868fd1c31537fc (patch)
tree8ba181113cc22f2ffe4ba1a3ed549926b747bc8c /include/mupdf/pdf/font.h
parent2612c20b725319833caeef36ccf4240f34e0e24b (diff)
downloadmupdf-1cd2046b3cce264a3d13481652868fd1c31537fc.tar.xz
Add simple fonts with 8-bit greek and cyrillic encodings.
Use KOI8-U for Cyrillic, and ISO 8859-7 for Greek. Use with 'mutool create' using an extra argument to the %%Font directive: %%Font TmRmC Times-Roman Cyrillic BT /TmRmC 16 Tf 10 10 Td <fa c4 d2 c1 d7 d3 d4 d7 d5 ca d4 c5 21> Tj ET The alternatives are "Latin", "Greek", and "Cyrillic".
Diffstat (limited to 'include/mupdf/pdf/font.h')
-rw-r--r--include/mupdf/pdf/font.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/mupdf/pdf/font.h b/include/mupdf/pdf/font.h
index 730d3459..dae52d3e 100644
--- a/include/mupdf/pdf/font.h
+++ b/include/mupdf/pdf/font.h
@@ -30,6 +30,12 @@ extern const char * const pdf_mac_expert[256];
extern const char * const pdf_win_ansi[256];
extern const char * const pdf_standard[256];
+extern const char * const pdf_glyph_name_from_koi8u[128];
+extern const char * const pdf_glyph_name_from_iso8859_7[128];
+
+int pdf_cyrillic_from_unicode(int u);
+int pdf_greek_from_unicode(int u);
+
typedef struct pdf_font_desc_s pdf_font_desc;
typedef struct pdf_hmtx_s pdf_hmtx;
typedef struct pdf_vmtx_s pdf_vmtx;
@@ -123,7 +129,7 @@ float pdf_text_stride(fz_context *ctx, pdf_font_desc *fontdesc, float fontsize,
void pdf_run_glyph(fz_context *ctx, pdf_document *doc, pdf_obj *resources, fz_buffer *contents, fz_device *dev, const fz_matrix *ctm, void *gstate, int nested_depth, fz_default_colorspaces *default_cs);
-pdf_obj *pdf_add_simple_font(fz_context *ctx, pdf_document *doc, fz_font *font);
+pdf_obj *pdf_add_simple_font(fz_context *ctx, pdf_document *doc, fz_font *font, int encoding);
pdf_obj *pdf_add_cid_font(fz_context *ctx, pdf_document *doc, fz_font *font);
pdf_obj *pdf_add_cjk_font(fz_context *ctx, pdf_document *doc, fz_font *font, int script);