From 672b9afb9bb05a67bbcd8664ba268521ea728ca6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 13 Nov 2018 21:49:56 +0100 Subject: Add more encoding tables. Add tables for Windows-1250, Windows-1251, and ISO-8859-1. Also add unicode_from_encoding tables. Move encodings from PDF namespace to Fitz. --- include/mupdf/fitz/font.h | 23 +++++++++++++++++++++++ include/mupdf/pdf/font.h | 7 ------- 2 files changed, 23 insertions(+), 7 deletions(-) (limited to 'include/mupdf') diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h index 4565983c..421f477a 100644 --- a/include/mupdf/fitz/font.h +++ b/include/mupdf/fitz/font.h @@ -9,6 +9,29 @@ /* forward declaration for circular dependency */ struct fz_device_s; +/* Various font encoding tables and lookup functions */ + +extern const char *fz_glyph_name_from_iso8859_1[256]; +extern const char *fz_glyph_name_from_iso8859_7[256]; +extern const char *fz_glyph_name_from_koi8u[256]; +extern const char *fz_glyph_name_from_windows_1250[256]; +extern const char *fz_glyph_name_from_windows_1251[256]; +extern const char *fz_glyph_name_from_windows_1252[256]; + +extern unsigned short fz_unicode_from_iso8859_1[256]; +extern unsigned short fz_unicode_from_iso8859_7[256]; +extern unsigned short fz_unicode_from_koi8u[256]; +extern unsigned short fz_unicode_from_windows_1250[256]; +extern unsigned short fz_unicode_from_windows_1251[256]; +extern unsigned short fz_unicode_from_windows_1252[256]; + +int fz_iso8859_1_from_unicode(int u); +int fz_iso8859_7_from_unicode(int u); +int fz_koi8u_from_unicode(int u); +int fz_windows_1250_from_unicode(int u); +int fz_windows_1251_from_unicode(int u); +int fz_windows_1252_from_unicode(int u); + /* An abstract font handle. */ diff --git a/include/mupdf/pdf/font.h b/include/mupdf/pdf/font.h index 812377e5..d386e87c 100644 --- a/include/mupdf/pdf/font.h +++ b/include/mupdf/pdf/font.h @@ -30,13 +30,6 @@ extern const char *pdf_mac_expert[256]; extern const char *pdf_win_ansi[256]; extern const char *pdf_standard[256]; -extern const char *pdf_glyph_name_from_koi8u[256]; -extern const char *pdf_glyph_name_from_iso8859_7[256]; - -int pdf_cyrillic_from_unicode(int u); -int pdf_greek_from_unicode(int u); -int pdf_winansi_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; -- cgit v1.2.3