From d1da3006ca629870ae7a2666585c7bf5cf445a00 Mon Sep 17 00:00:00 2001 From: Hammerschmid Daniel Date: Wed, 3 Jul 2013 16:35:31 +0200 Subject: [PATCH 01/24] Fixes various libharu issues fixes #1 --- include/hpdf.h | 12 ++++++--- include/hpdf_image.h | 3 ++- src/hpdf_doc.c | 8 +++--- src/hpdf_fontdef_type1.c | 57 +++++++++++++++++++++++++++++++++++++--- src/hpdf_image.c | 8 +++++- src/hpdf_page_operator.c | 21 ++++++++++++--- 6 files changed, 93 insertions(+), 16 deletions(-) diff --git a/include/hpdf.h b/include/hpdf.h index b8c05571..ee4b6dfd 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -789,7 +789,9 @@ HPDF_LoadRawImageFromMem (HPDF_Doc pdf, HPDF_UINT width, HPDF_UINT height, HPDF_ColorSpace color_space, - HPDF_UINT bits_per_component); + HPDF_UINT bits_per_component, + HPDF_UINT size, + HPDF_BOOL black_white); HPDF_EXPORT(HPDF_STATUS) HPDF_Image_AddSMask (HPDF_Image image, @@ -1147,7 +1149,7 @@ HPDF_Page_SetMiterLimit (HPDF_Page page, /* d */ HPDF_EXPORT(HPDF_STATUS) HPDF_Page_SetDash (HPDF_Page page, - const HPDF_UINT16 *dash_ptn, + const HPDF_REAL *dash_ptn, HPDF_UINT num_param, HPDF_UINT phase); @@ -1553,7 +1555,11 @@ HPDF_EXPORT(HPDF_OutputIntent) HPDF_LoadIccProfileFromFile (HPDF_Doc pdf, const char* icc_file_name, int numcomponent); - + +HPDF_EXPORT(HPDF_STATUS) +HPDF_Page_WriteComment (HPDF_Page page, + const char *text); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/include/hpdf_image.h b/include/hpdf_image.h index 4e1aa6c0..2f273751 100644 --- a/include/hpdf_image.h +++ b/include/hpdf_image.h @@ -72,7 +72,8 @@ HPDF_Image_LoadRawImageFromMem (HPDF_MMgr mmgr, HPDF_UINT width, HPDF_UINT height, HPDF_ColorSpace color_space, - HPDF_UINT bits_per_component); + HPDF_UINT bits_per_component, + HPDF_UINT opt_size); HPDF_BOOL diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index 7d9eb1a4..cc4644d4 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -1681,7 +1681,9 @@ HPDF_LoadRawImageFromMem (HPDF_Doc pdf, HPDF_UINT width, HPDF_UINT height, HPDF_ColorSpace color_space, - HPDF_UINT bits_per_component) + HPDF_UINT bits_per_component, + HPDF_UINT size, + HPDF_BOOL black_white) { HPDF_Image image; @@ -1691,11 +1693,11 @@ HPDF_LoadRawImageFromMem (HPDF_Doc pdf, return NULL; /* Use directly HPDF_Image_LoadRaw1BitImageFromMem to save B/W images */ - if(color_space == HPDF_CS_DEVICE_GRAY && bits_per_component == 1) { + if(black_white && color_space == HPDF_CS_DEVICE_GRAY && bits_per_component == 1) { return HPDF_Image_LoadRaw1BitImageFromMem (pdf, buf, width, height, (width+7)/8, HPDF_TRUE, HPDF_TRUE); } - image = HPDF_Image_LoadRawImageFromMem (pdf->mmgr, buf, pdf->xref, width, height, color_space, bits_per_component); + image = HPDF_Image_LoadRawImageFromMem (pdf->mmgr, buf, pdf->xref, width, height, color_space, bits_per_component, size); if (!image) HPDF_CheckError (&pdf->error); diff --git a/src/hpdf_fontdef_type1.c b/src/hpdf_fontdef_type1.c index 499f5214..454435a0 100644 --- a/src/hpdf_fontdef_type1.c +++ b/src/hpdf_fontdef_type1.c @@ -134,6 +134,10 @@ LoadAfm (HPDF_FontDef fontdef, HPDF_UINT len; char keyword[HPDF_LIMIT_MAX_NAME_LEN + 1]; HPDF_UINT i; + HPDF_CharData* cdata_temp; + HPDF_CharData* cdata_temp_root; + HPDF_INT16 temp_count = 0; + HPDF_INT16 unicode = 0; HPDF_PTRACE ((" LoadAfm\n")); @@ -154,7 +158,7 @@ LoadAfm (HPDF_FontDef fontdef, const char *s; len = HPDF_TMP_BUF_SIZ; - if ((ret = HPDF_Stream_ReadLn (stream, buf, &len)) != HPDF_OK) + if ((ret = HPDF_Stream_ReadLn (stream, buf, &len)) != HPDF_OK && ret != HPDF_STREAM_READLN_CONTINUE) return ret; s = GetKeyword (buf, keyword, HPDF_LIMIT_MAX_NAME_LEN + 1); @@ -232,17 +236,24 @@ LoadAfm (HPDF_FontDef fontdef, } cdata = (HPDF_CharData*)HPDF_GetMem (fontdef->mmgr, - sizeof(HPDF_CharData) * attr->widths_count); - if (cdata == NULL) + sizeof(HPDF_CharData) * attr->widths_count * 2); + + cdata_temp = (HPDF_CharData*)HPDF_GetMem (fontdef->mmgr, sizeof(HPDF_CharData) * attr->widths_count); + + if (cdata == NULL || cdata_temp == NULL) return HPDF_Error_GetCode (fontdef->error); - HPDF_MemSet (cdata, 0, sizeof(HPDF_CharData) * attr->widths_count); + HPDF_MemSet (cdata, 0, sizeof(HPDF_CharData) * attr->widths_count * 2); attr->widths = cdata; + HPDF_MemSet (cdata_temp, 0, sizeof(HPDF_CharData) * attr->widths_count); + cdata_temp_root = cdata_temp; + /* load CharMetrics */ for (i = 0; i < attr->widths_count; i++, cdata++) { const char *s; char buf2[HPDF_LIMIT_MAX_NAME_LEN + 1]; + unicode = 0; len = HPDF_TMP_BUF_SIZ; if ((ret = HPDF_Stream_ReadLn (stream, buf, &len)) != HPDF_OK) @@ -256,6 +267,7 @@ LoadAfm (HPDF_FontDef fontdef, HPDF_INVALID_CHAR_MATRICS_DATA, 0); } else if (HPDF_StrCmp (buf2, "C") == 0) { + unicode = (HPDF_INT16)HPDF_AToI (s); s += 2; s = GetKeyword (s, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); @@ -291,8 +303,45 @@ LoadAfm (HPDF_FontDef fontdef, cdata->unicode = HPDF_GryphNameToUnicode (buf2); + if( cdata->unicode != unicode && unicode != -1 ) + { + cdata_temp->char_cd = cdata->char_cd; + cdata_temp->width = cdata->width; + cdata_temp->unicode = unicode; + cdata_temp++; + temp_count++; + } } + cdata_temp = cdata_temp_root; + int x = 0; + int y = 0; + int flag = 0; + for( x = 0; x < temp_count; x++, cdata_temp++ ) + { + HPDF_CharData *cdata_cmp = attr->widths; + flag = 0; + for( y = 0; y < i; y++ ) + { + if( cdata_cmp->unicode == cdata_temp->unicode ) + { + // cdata already contains this unicode + flag = 1; + break; + } + cdata_cmp++; + } + if( flag == 0 ) + { + cdata++; + cdata->char_cd = cdata_temp->char_cd; + cdata->width = cdata_temp->width; + cdata->unicode = cdata_temp->unicode; + i++; + } + } + attr->widths_count = i; + return HPDF_OK; } diff --git a/src/hpdf_image.c b/src/hpdf_image.c index eeec7c28..69c7ccfa 100644 --- a/src/hpdf_image.c +++ b/src/hpdf_image.c @@ -325,7 +325,8 @@ HPDF_Image_LoadRawImageFromMem (HPDF_MMgr mmgr, HPDF_UINT width, HPDF_UINT height, HPDF_ColorSpace color_space, - HPDF_UINT bits_per_component) + HPDF_UINT bits_per_component, + HPDF_UINT opt_size) { HPDF_Dict image; HPDF_STATUS ret = HPDF_OK; @@ -374,6 +375,11 @@ HPDF_Image_LoadRawImageFromMem (HPDF_MMgr mmgr, default:; } + if( opt_size != 0 ) + { + size = opt_size; + } + if (ret != HPDF_OK) return NULL; diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index 0958209b..4306f89f 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -21,7 +21,7 @@ #include "hpdf.h" static const HPDF_Point INIT_POS = {0, 0}; -static const HPDF_DashMode INIT_MODE = {{0, 0, 0, 0, 0, 0, 0, 0}, 0, 0}; +static const HPDF_DashMode INIT_MODE = {{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0, 0}; static HPDF_STATUS @@ -175,7 +175,7 @@ HPDF_Page_SetMiterLimit (HPDF_Page page, /* d */ HPDF_EXPORT(HPDF_STATUS) HPDF_Page_SetDash (HPDF_Page page, - const HPDF_UINT16 *dash_ptn, + const HPDF_REAL *dash_ptn, HPDF_UINT num_param, HPDF_UINT phase) { @@ -184,7 +184,7 @@ HPDF_Page_SetDash (HPDF_Page page, char buf[HPDF_TMP_BUF_SIZ]; char *pbuf = buf; char *eptr = buf + HPDF_TMP_BUF_SIZ - 1; - const HPDF_UINT16 *pdash_ptn = dash_ptn; + const HPDF_REAL *pdash_ptn = dash_ptn; HPDF_PageAttr attr; HPDF_UINT i; @@ -212,7 +212,7 @@ HPDF_Page_SetDash (HPDF_Page page, if (*pdash_ptn == 0 || *pdash_ptn > HPDF_MAX_DASH_PATTERN) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - pbuf = HPDF_IToA (pbuf, *pdash_ptn, eptr); + pbuf = HPDF_FToA (pbuf, *pdash_ptn, eptr); *pbuf++ = ' '; pdash_ptn++; } @@ -2899,3 +2899,16 @@ HPDF_Page_Insert_Shared_Content_Stream (HPDF_Page page, return ret; } + +HPDF_EXPORT(HPDF_STATUS) +HPDF_Page_WriteComment (HPDF_Page page, + const char *text) +{ + HPDF_PageAttr attr; + + attr = (HPDF_PageAttr)page->attr; + + if (HPDF_Stream_WriteStr (attr->stream, text) != HPDF_OK) + return HPDF_CheckError (page->error); + return HPDF_OK; +} From 80005251f2dc4471fdb54371fc0f04ba2d41cd3c Mon Sep 17 00:00:00 2001 From: Gerhard Gruber Date: Thu, 4 Jul 2013 14:10:34 +0200 Subject: [PATCH 02/24] Makefiles for cross compilation created The two new Makefiles can be used to cross compile the library for Windows using MinGW under Linux. Fixes #3 --- .gitignore | 1 + script/Makefile.mingw_cross | 228 ++++++++++++++++++++++++++++++++ script/Makefile.mingw_dll_cross | 227 +++++++++++++++++++++++++++++++ 3 files changed, 456 insertions(+) create mode 100644 script/Makefile.mingw_cross create mode 100644 script/Makefile.mingw_dll_cross diff --git a/.gitignore b/.gitignore index b0eaa41c..3c5de835 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ CPackConfig.cmake CPackSourceConfig.cmake cmake_install.cmake depcomp +*.dll diff --git a/script/Makefile.mingw_cross b/script/Makefile.mingw_cross new file mode 100644 index 00000000..7e8530c2 --- /dev/null +++ b/script/Makefile.mingw_cross @@ -0,0 +1,228 @@ +# makefile for Haru Free PDFLibrary II (Libharu) +# Copyright (C) 1999-2006 Takeshi Kanno +# For conditions of distribution and use, see copyright notice in hpdf.h +# +# To compile, type: +# ./configure; make +# If you wish to build zlib as a shared library, use: ./configure -s +# To install /usr/local/lib/libhpdf.* and /usr/local/include/hpdf.h, type: +# make install +# To install in $HOME instead of /usr/local, use: +# make install prefix=$HOME + +CC=i686-w64-mingw32-gcc +PREFIX=/usr/i686-w64-mingw32/sys-root/mingw + +LIBNAME=libhpdf.a +SONAME=libhpdf.dll +SOVER1=.1 +SOVER2=.0.0 +LIBTARGET=libhpdf.a +CFLAGS=-Iinclude -O2 -Wall -Iwin32/include +CFLAGS_DEMO=-Iinclude -O2 -Wall +CFLAGS_EXE=-o +LDFLAGS=-L. -lpng -lz +LDFLAGS_DEMO1= +LDFLAGS_DEMO2=-Lwin32/mingw -L. -lhpdf -lpng -lz +DEFNAME=win32/mingw/libhpdf.def +RESNAME=win32/mingw/libhpdf_mingw.res + +OBJS = \ + src/hpdf_utils.o \ + src/hpdf_error.o \ + src/hpdf_mmgr.o \ + src/hpdf_list.o \ + src/hpdf_streams.o \ + src/hpdf_objects.o \ + src/hpdf_null.o \ + src/hpdf_boolean.o \ + src/hpdf_number.o \ + src/hpdf_real.o \ + src/hpdf_name.o \ + src/hpdf_array.o \ + src/hpdf_dict.o \ + src/hpdf_xref.o \ + src/hpdf_encoder.o \ + src/hpdf_string.o \ + src/hpdf_binary.o \ + src/hpdf_encrypt.o \ + src/hpdf_encryptdict.o \ + src/hpdf_fontdef.o \ + src/hpdf_fontdef_tt.o \ + src/hpdf_fontdef_type1.o \ + src/hpdf_fontdef_base14.o \ + src/hpdf_fontdef_cid.o \ + src/hpdf_font.o \ + src/hpdf_font_type1.o \ + src/hpdf_font_tt.o \ + src/hpdf_font_cid.o \ + src/hpdf_doc.o \ + src/hpdf_info.o \ + src/hpdf_catalog.o \ + src/hpdf_page_label.o\ + src/hpdf_gstate.o \ + src/hpdf_pages.o \ + src/hpdf_page_operator.o \ + src/hpdf_destination.o \ + src/hpdf_annotation.o \ + src/hpdf_outline.o \ + src/hpdf_image.o \ + src/hpdf_encoder_jp.o \ + src/hpdf_encoder_kr.o \ + src/hpdf_encoder_cns.o \ + src/hpdf_encoder_cnt.o \ + src/hpdf_fontdef_jp.o \ + src/hpdf_fontdef_kr.o \ + src/hpdf_fontdef_cns.o \ + src/hpdf_fontdef_cnt.o \ + src/hpdf_image_png.o \ + src/hpdf_image_ccitt.o \ + src/hpdf_doc_png.o \ + src/hpdf_ext_gstate.o \ + src/hpdf_3dmeasure.o \ + src/hpdf_exdata.o \ + src/hpdf_namedict.o \ + src/hpdf_u3d.o \ + +PROGRAMS = \ + demo/encoding_list.exe \ + demo/font_demo.exe \ + demo/text_demo.exe \ + demo/text_demo2.exe \ + demo/image_demo.exe \ + demo/jpeg_demo.exe \ + demo/jpfont_demo.exe \ + demo/line_demo.exe \ + demo/link_annotation.exe \ + demo/outline_demo.exe \ + demo/png_demo.exe \ + demo/text_annotation.exe \ + demo/ttfont_demo.exe \ + demo/character_map.exe \ + demo/grid_sheet.exe \ + demo/arc_demo.exe \ + demo/raw_image_demo.exe \ + demo/encryption.exe \ + demo/permission.exe \ + demo/slide_show_demo.exe \ + demo/ext_gstate_demo.exe \ + +.SUFFIXES: .c .o + +all: $(LIBTARGET) + +$(LIBNAME): $(OBJS) + ar rc $(LIBNAME) $(OBJS) + ranlib $(LIBNAME) + +$(SONAME): $(OBJS) + $(CC) -Wall -shared -o $(SONAME) $(OBJS) $(DEFNAME) $(RESNAME) -Wl,--kill-at,--enable-stdcall-fixup $(LDFLAGS) + i686-w64-mingw32-dlltool -k -d $(DEFNAME) -l $(LIBNAME) + strip $(SONAME) + cp -p $(SONAME) demo + + +demo: $(LIBTARGET) $(PROGRAMS) + +clean: + rm -f src/*.o src/*.obj ./*.a ./*.so* ./*.lib demo/*.exe + +install: all installfiles + +installfiles: + if [ ! -d $(PREFIX) ]; then mkdir -p $(PREFIX); fi + if [ ! -d $(PREFIX)/include ]; then mkdir -p $(PREFIX)/include; fi + if [ ! -d $(PREFIX)/lib ]; then mkdir -p $(PREFIX)/lib; fi + cp -p $(SONAME) $(PREFIX)/bin/ + cp include/hpdf*.h $(PREFIX)/include/; chmod 644 $(PREFIX)/include/hpdf*.h + cp -p $(LIBNAME) $(PREFIX)/lib/ + + + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $*.c + +demo/encoding_list.exe : demo/encoding_list.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encoding_list.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encoding_list.exe + +demo/font_demo.exe : demo/font_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/font_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./font_demo.exe + +demo/text_demo.exe : demo/text_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo.exe + +demo/text_demo2.exe : demo/text_demo2.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo2.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo2.exe + +demo/image_demo.exe : demo/image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./image_demo.exe + +demo/jpeg_demo.exe : demo/jpeg_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpeg_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpeg_demo.exe + +demo/jpfont_demo.exe : demo/jpfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpfont_demo.exe + +demo/line_demo.exe : demo/line_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/line_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./line_demo.exe + +demo/link_annotation.exe : demo/link_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/link_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./link_annotation.exe + +demo/outline_demo.exe : demo/outline_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/outline_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./outline_demo.exe + +demo/png_demo.exe : demo/png_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/png_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./png_demo.exe + +demo/text_annotation.exe : demo/text_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_annotation.exe + +demo/encryption.exe : demo/encryption.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encryption.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encryption.exe + +demo/permission.exe : demo/permission.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/permission.c $(LDFLAGS_DEMO2) + cd demo/ ; ./permission.exe + +demo/ttfont_demo.exe : demo/ttfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ttfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ttfont_demo.exe ttfont/PenguinAttack.ttf -E + +demo/character_map.exe : demo/character_map.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/character_map.c $(LDFLAGS_DEMO2) + +demo/raw_image_demo.exe : demo/raw_image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/raw_image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./raw_image_demo.exe + +demo/arc_demo.exe : demo/arc_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/arc_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./arc_demo.exe + +demo/grid_sheet.exe : demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) -DSTAND_ALONE $(LDFLAGS_DEMO1) demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./grid_sheet.exe + +demo/slide_show_demo.exe : demo/slide_show_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/slide_show_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./slide_show_demo.exe + +demo/ext_gstate_demo.exe : demo/ext_gstate_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ext_gstate_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ext_gstate_demo.exe + + diff --git a/script/Makefile.mingw_dll_cross b/script/Makefile.mingw_dll_cross new file mode 100644 index 00000000..89933f17 --- /dev/null +++ b/script/Makefile.mingw_dll_cross @@ -0,0 +1,227 @@ +# makefile for Haru Free PDFLibrary II (Libharu) +# Copyright (C) 1999-2006 Takeshi Kanno +# For conditions of distribution and use, see copyright notice in hpdf.h +# +# To compile, type: +# ./configure; make +# If you wish to build zlib as a shared library, use: ./configure -s +# To install /usr/local/lib/libhpdf.* and /usr/local/include/hpdf.h, type: +# make install +# To install in $HOME instead of /usr/local, use: +# make install prefix=$HOME + +CC=i686-w64-mingw32-gcc +PREFIX=/usr/i686-w64-mingw32/sys-root/mingw + +LIBNAME=libhpdf.a +SONAME=libhpdf.dll +SOVER1=.1 +SOVER2=.0.0 +LIBTARGET=libhpdf.dll +CFLAGS=-Iinclude -O2 -Wall -Iwin32/include -DHPDF_DLL_MAKE -DHPDF_DLL_MAKE_CDECL +CFLAGS_DEMO=-Iinclude -O2 -Wall -DHPDF_DLL +CFLAGS_EXE=-o +LDFLAGS=-Lwin32/mingw -L. -lpng -lz +LDFLAGS_DEMO1= +LDFLAGS_DEMO2=-L. -lhpdf +DEFNAME=win32/mingw/libhpdf.def +RESNAME=win32/mingw/libhpdf_mingw.res + +OBJS = \ + src/hpdf_utils.o \ + src/hpdf_error.o \ + src/hpdf_mmgr.o \ + src/hpdf_list.o \ + src/hpdf_streams.o \ + src/hpdf_objects.o \ + src/hpdf_null.o \ + src/hpdf_boolean.o \ + src/hpdf_number.o \ + src/hpdf_real.o \ + src/hpdf_name.o \ + src/hpdf_array.o \ + src/hpdf_dict.o \ + src/hpdf_xref.o \ + src/hpdf_encoder.o \ + src/hpdf_string.o \ + src/hpdf_binary.o \ + src/hpdf_encrypt.o \ + src/hpdf_encryptdict.o \ + src/hpdf_fontdef.o \ + src/hpdf_fontdef_tt.o \ + src/hpdf_fontdef_type1.o \ + src/hpdf_fontdef_base14.o \ + src/hpdf_fontdef_cid.o \ + src/hpdf_font.o \ + src/hpdf_font_type1.o \ + src/hpdf_font_tt.o \ + src/hpdf_font_cid.o \ + src/hpdf_doc.o \ + src/hpdf_info.o \ + src/hpdf_catalog.o \ + src/hpdf_page_label.o\ + src/hpdf_gstate.o \ + src/hpdf_pages.o \ + src/hpdf_page_operator.o \ + src/hpdf_destination.o \ + src/hpdf_annotation.o \ + src/hpdf_outline.o \ + src/hpdf_image.o \ + src/hpdf_encoder_jp.o \ + src/hpdf_encoder_kr.o \ + src/hpdf_encoder_cns.o \ + src/hpdf_encoder_cnt.o \ + src/hpdf_fontdef_jp.o \ + src/hpdf_fontdef_kr.o \ + src/hpdf_fontdef_cns.o \ + src/hpdf_fontdef_cnt.o \ + src/hpdf_image_png.o \ + src/hpdf_image_ccitt.o \ + src/hpdf_doc_png.o \ + src/hpdf_ext_gstate.o \ + src/hpdf_namedict.o \ + src/hpdf_3dmeasure.o \ + src/hpdf_exdata.o \ + src/hpdf_u3d.o \ + +PROGRAMS = \ + demo/encoding_list.exe \ + demo/font_demo.exe \ + demo/text_demo.exe \ + demo/text_demo2.exe \ + demo/image_demo.exe \ + demo/jpeg_demo.exe \ + demo/jpfont_demo.exe \ + demo/line_demo.exe \ + demo/link_annotation.exe \ + demo/outline_demo.exe \ + demo/png_demo.exe \ + demo/text_annotation.exe \ + demo/ttfont_demo.exe \ + demo/character_map.exe \ + demo/grid_sheet.exe \ + demo/arc_demo.exe \ + demo/raw_image_demo.exe \ + demo/encryption.exe \ + demo/permission.exe \ + demo/slide_show_demo.exe \ + demo/ext_gstate_demo.exe \ + +.SUFFIXES: .c .o + +all: $(LIBTARGET) + +$(LIBNAME): $(OBJS) + ar rc $(LIBNAME) $(OBJS) + ranlib $(LIBNAME) + +$(SONAME): $(OBJS) + $(CC) -Wall -shared -o $(SONAME) $(OBJS) $(DEFNAME) $(RESNAME) -Wl,--kill-at,--enable-stdcall-fixup $(LDFLAGS) + i686-w64-mingw32-dlltool -k -d $(DEFNAME) -l $(LIBNAME) + strip $(SONAME) + cp -p $(SONAME) demo + + +demo: $(LIBTARGET) $(PROGRAMS) + +clean: + rm -f src/*.o src/*.obj ./*.a ./*.so* ./*.lib demo/*.exe + +install: all installfiles + +installfiles: + if [ ! -d $(PREFIX) ]; then mkdir -p $(PREFIX); fi + if [ ! -d $(PREFIX)/include ]; then mkdir -p $(PREFIX)/include; fi + if [ ! -d $(PREFIX)/lib ]; then mkdir -p $(PREFIX)/lib; fi + cp include/hpdf.h include/hpdf_consts.h include/hpdf_types.h $(PREFIX)/include/; chmod 644 $(PREFIX)/include/hpdf*.h + cp -p $(SONAME) $(PREFIX)/bin/ + cp -p $(LIBNAME) $(PREFIX)/lib/ + + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $*.c + +demo/encoding_list.exe : demo/encoding_list.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encoding_list.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encoding_list.exe + +demo/font_demo.exe : demo/font_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/font_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./font_demo.exe + +demo/text_demo.exe : demo/text_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo.exe + +demo/text_demo2.exe : demo/text_demo2.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo2.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo2.exe + +demo/image_demo.exe : demo/image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./image_demo.exe + +demo/jpeg_demo.exe : demo/jpeg_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpeg_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpeg_demo.exe + +demo/jpfont_demo.exe : demo/jpfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpfont_demo.exe + +demo/line_demo.exe : demo/line_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/line_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./line_demo.exe + +demo/link_annotation.exe : demo/link_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/link_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./link_annotation.exe + +demo/outline_demo.exe : demo/outline_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/outline_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./outline_demo.exe + +demo/png_demo.exe : demo/png_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/png_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./png_demo.exe + +demo/text_annotation.exe : demo/text_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_annotation.exe + +demo/encryption.exe : demo/encryption.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encryption.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encryption.exe + +demo/permission.exe : demo/permission.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/permission.c $(LDFLAGS_DEMO2) + cd demo/ ; ./permission.exe + +demo/ttfont_demo.exe : demo/ttfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ttfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ttfont_demo.exe ttfont/PenguinAttack.ttf -E + +demo/character_map.exe : demo/character_map.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/character_map.c $(LDFLAGS_DEMO2) + +demo/raw_image_demo.exe : demo/raw_image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/raw_image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./raw_image_demo.exe + +demo/arc_demo.exe : demo/arc_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/arc_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./arc_demo.exe + +demo/grid_sheet.exe : demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) -DSTAND_ALONE $(LDFLAGS_DEMO1) demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./grid_sheet.exe + +demo/slide_show_demo.exe : demo/slide_show_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/slide_show_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./slide_show_demo.exe + +demo/ext_gstate_demo.exe : demo/ext_gstate_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ext_gstate_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ext_gstate_demo.exe + + From 3e978f77e31732980a43fd2e3ef39adf00465976 Mon Sep 17 00:00:00 2001 From: Gerhard Gruber Date: Mon, 8 Jul 2013 14:19:41 +0200 Subject: [PATCH 03/24] Added missing functions to the def file. The functions HPDF_Image_SetMask and HPDF_Page_WriteComment are now added in the def-file and will also be in the resulting dll-file. Fixes #5 --- win32/mingw/libhpdf.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index 099750bf..3fd4ae61 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -55,6 +55,7 @@ EXPORTS HPDF_Image_GetWidth@4 = HPDF_Image_GetWidth HPDF_Image_SetColorMask@28 = HPDF_Image_SetColorMask HPDF_Image_SetMaskImage@8 = HPDF_Image_SetMaskImage + HPDF_Image_SetMask@8 = HPDF_Image_SetMask HPDF_InsertPage@8 = HPDF_InsertPage HPDF_LinkAnnot_SetBorderStyle@16 = HPDF_LinkAnnot_SetBorderStyle HPDF_LinkAnnot_SetHighlightMode@8 = HPDF_LinkAnnot_SetHighlightMode @@ -173,6 +174,7 @@ EXPORTS HPDF_Page_TextOut@16 = HPDF_Page_TextOut HPDF_Page_TextRect@32 = HPDF_Page_TextRect HPDF_Page_TextWidth@8 = HPDF_Page_TextWidth + HPDF_Page_WriteComment@8 = HPDF_Page_WriteComment HPDF_ReadFromStream@12 = HPDF_ReadFromStream HPDF_ResetError@4 = HPDF_ResetError HPDF_ResetStream@4 = HPDF_ResetStream From 54d5a347c9a9855792fc005ab3f985cebaf48f43 Mon Sep 17 00:00:00 2001 From: Hammerschmid Daniel Date: Mon, 15 Jul 2013 14:33:21 +0200 Subject: [PATCH 04/24] Changed line dash phase to HPDF_REAL Changed dash phase to HPDF_REAL. Removed if-statement which checked if the number of dash pattern array elements is even, because I could not find a reason for this check in the PDF reference. --- include/hpdf.h | 2 +- include/hpdf_types.h | 4 ++-- src/hpdf_gstate.c | 2 +- src/hpdf_page_operator.c | 10 +++------- src/hpdf_pages.c | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/include/hpdf.h b/include/hpdf.h index ee4b6dfd..93fd08c4 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -1151,7 +1151,7 @@ HPDF_EXPORT(HPDF_STATUS) HPDF_Page_SetDash (HPDF_Page page, const HPDF_REAL *dash_ptn, HPDF_UINT num_param, - HPDF_UINT phase); + HPDF_REAL phase); diff --git a/include/hpdf_types.h b/include/hpdf_types.h index 8b3e0a89..009beffd 100644 --- a/include/hpdf_types.h +++ b/include/hpdf_types.h @@ -207,9 +207,9 @@ typedef struct _HPDF_TextWidth { /*------ dash mode ----------------------------------------------------------*/ typedef struct _HPDF_DashMode { - HPDF_UINT16 ptn[8]; + HPDF_REAL ptn[8]; HPDF_UINT num_ptn; - HPDF_UINT phase; + HPDF_REAL phase; } HPDF_DashMode; diff --git a/src/hpdf_gstate.c b/src/hpdf_gstate.c index c203c4d7..8ad7bb00 100644 --- a/src/hpdf_gstate.c +++ b/src/hpdf_gstate.c @@ -70,7 +70,7 @@ HPDF_GState_New (HPDF_MMgr mmgr, HPDF_TransMatrix DEF_MATRIX = {1, 0, 0, 1, 0, 0}; HPDF_RGBColor DEF_RGB_COLOR = {0, 0, 0}; HPDF_CMYKColor DEF_CMYK_COLOR = {0, 0, 0, 0}; - HPDF_DashMode DEF_DASH_MODE = {{0, 0, 0, 0, 0, 0, 0, 0}, 0, 0}; + HPDF_DashMode DEF_DASH_MODE = {{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0, 0.0f}; gstate->trans_matrix = DEF_MATRIX; gstate->line_width = HPDF_DEF_LINEWIDTH; diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index 4306f89f..fd34619a 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -21,7 +21,7 @@ #include "hpdf.h" static const HPDF_Point INIT_POS = {0, 0}; -static const HPDF_DashMode INIT_MODE = {{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0, 0}; +static const HPDF_DashMode INIT_MODE = {{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0, 0.0f}; static HPDF_STATUS @@ -177,7 +177,7 @@ HPDF_EXPORT(HPDF_STATUS) HPDF_Page_SetDash (HPDF_Page page, const HPDF_REAL *dash_ptn, HPDF_UINT num_param, - HPDF_UINT phase) + HPDF_REAL phase) { HPDF_STATUS ret = HPDF_Page_CheckState (page, HPDF_GMODE_PAGE_DESCRIPTION | HPDF_GMODE_TEXT_OBJECT); @@ -193,10 +193,6 @@ HPDF_Page_SetDash (HPDF_Page page, if (ret != HPDF_OK) return ret; - if (num_param != 1 && (num_param / 2) * 2 != num_param) - return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_PARAM_COUNT, - num_param); - if (num_param == 0 && phase > 0) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, phase); @@ -220,7 +216,7 @@ HPDF_Page_SetDash (HPDF_Page page, *pbuf++ = ']'; *pbuf++ = ' '; - pbuf = HPDF_IToA (pbuf, phase, eptr); + pbuf = HPDF_FToA (pbuf, phase, eptr); HPDF_StrCpy (pbuf, " d\012", eptr); attr = (HPDF_PageAttr)page->attr; diff --git a/src/hpdf_pages.c b/src/hpdf_pages.c index fcc9b5cc..362ded0f 100644 --- a/src/hpdf_pages.c +++ b/src/hpdf_pages.c @@ -890,7 +890,7 @@ HPDF_Page_GetMiterLimit (HPDF_Page page) HPDF_EXPORT(HPDF_DashMode) HPDF_Page_GetDash (HPDF_Page page) { - HPDF_DashMode mode = {{0, 0, 0, 0, 0, 0, 0, 0}, 0, 0}; + HPDF_DashMode mode = {{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0, 0.0f}; HPDF_PTRACE((" HPDF_Page_GetDash\n")); From aab3a6c7df7129d3f2f1798e2b82f01f6783a1bc Mon Sep 17 00:00:00 2001 From: Hammerschmid Daniel Date: Tue, 16 Jul 2013 11:50:04 +0200 Subject: [PATCH 05/24] Added Duplex entry to viewer preferences fixes #8 --- include/hpdf_consts.h | 13 ++++++++----- src/hpdf_catalog.c | 19 +++++++++++++++++++ src/hpdf_doc.c | 2 +- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/include/hpdf_consts.h b/include/hpdf_consts.h index 72773ed6..f667d2cb 100644 --- a/include/hpdf_consts.h +++ b/include/hpdf_consts.h @@ -95,12 +95,15 @@ /*----------------------------------------------------------------------------*/ /*------ viewer preferences definitions --------------------------------------*/ -#define HPDF_HIDE_TOOLBAR 1 -#define HPDF_HIDE_MENUBAR 2 -#define HPDF_HIDE_WINDOW_UI 4 -#define HPDF_FIT_WINDOW 8 -#define HPDF_CENTER_WINDOW 16 +#define HPDF_HIDE_TOOLBAR 1 +#define HPDF_HIDE_MENUBAR 2 +#define HPDF_HIDE_WINDOW_UI 4 +#define HPDF_FIT_WINDOW 8 +#define HPDF_CENTER_WINDOW 16 #define HPDF_PRINT_SCALING_NONE 32 +#define HPDF_SIMPLEX 64 +#define HPDF_DUPLEX_FLIP_SHORT 128 +#define HPDF_DUPLEX_FLIP_LONG 256 /*---------------------------------------------------------------------------*/ diff --git a/src/hpdf_catalog.c b/src/hpdf_catalog.c index 6c310710..8abd88a1 100644 --- a/src/hpdf_catalog.c +++ b/src/hpdf_catalog.c @@ -327,6 +327,25 @@ HPDF_Catalog_SetViewerPreference (HPDF_Catalog catalog, return ret; } + if (value & HPDF_SIMPLEX) { + if ((ret = HPDF_Dict_AddName (preferences, "Duplex", + "Simplex")) != HPDF_OK) + return ret; + } else if (value & HPDF_DUPLEX_FLIP_SHORT) { + if ((ret = HPDF_Dict_AddName (preferences, "Duplex", + "DuplexFlipShortEdge")) != HPDF_OK) + return ret; + } else if (value & HPDF_DUPLEX_FLIP_LONG) { + if ((ret = HPDF_Dict_AddName (preferences, "Duplex", + "DuplexFlipLongEdge")) != HPDF_OK) + return ret; + } else { + if ((ret = HPDF_Dict_RemoveElement (preferences, "Duplex")) != + HPDF_OK) + if (ret != HPDF_DICT_ITEM_NOT_FOUND) + return ret; + } + return HPDF_OK; } diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index cc4644d4..89a83b6b 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -1884,7 +1884,7 @@ HPDF_SetViewerPreference (HPDF_Doc pdf, if (ret != HPDF_OK) return HPDF_CheckError (&pdf->error); - pdf->pdf_version = HPDF_VER_16; + pdf->pdf_version = HPDF_VER_17; return HPDF_OK; } From 605e1b68560589ea505ad7d3898288e46ce906b7 Mon Sep 17 00:00:00 2001 From: Hammerschmid Daniel Date: Mon, 9 Sep 2013 16:26:55 +0200 Subject: [PATCH 06/24] Added support for interactive forms and textfields Text fields can now be inserted with the method HPDF_Page_TextField. fixes #10 Changed wrong HPDF_PTRACE text --- include/hpdf.h | 21 ++++ include/hpdf_catalog.h | 6 ++ include/hpdf_consts.h | 14 +++ include/hpdf_fontdef.h | 1 + include/hpdf_types.h | 10 ++ src/hpdf_catalog.c | 117 ++++++++++++++++++++++ src/hpdf_doc.c | 80 +++++++++++++++ src/hpdf_font_type1.c | 27 +++-- src/hpdf_page_operator.c | 209 +++++++++++++++++++++++++++++++++++++++ src/hpdf_pages.c | 8 ++ win32/mingw/libhpdf.def | 2 + 11 files changed, 489 insertions(+), 6 deletions(-) diff --git a/include/hpdf.h b/include/hpdf.h index 93fd08c4..84bafe6d 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -278,6 +278,10 @@ HPDF_LoadType1FontFromFile (HPDF_Doc pdf, const char *afm_file_name, const char *data_file_name); +HPDF_EXPORT(const char*) +HPDF_LoadType1FontFromFile2 (HPDF_Doc pdf, + const char *afm_file_name, + const char *font_name); HPDF_EXPORT(HPDF_FontDef) HPDF_GetTTFontDefFromFile (HPDF_Doc pdf, @@ -1560,6 +1564,23 @@ HPDF_EXPORT(HPDF_STATUS) HPDF_Page_WriteComment (HPDF_Page page, const char *text); +HPDF_EXPORT(HPDF_STATUS) +HPDF_Page_TextField (HPDF_Page page, + HPDF_Doc pdf, + HPDF_REAL left, + HPDF_REAL top, + HPDF_REAL right, + HPDF_REAL bottom, + const char *name, + const char *text, + HPDF_UINT flag, + HPDF_BOOL print, + HPDF_UINT max_len, + HPDF_UINT alignment, + HPDF_INT rotation, + HPDF_Font font, + HPDF_REAL font_size, + HPDF_Color color); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/include/hpdf_catalog.h b/include/hpdf_catalog.h index 469d2a48..d82bc355 100644 --- a/include/hpdf_catalog.h +++ b/include/hpdf_catalog.h @@ -26,6 +26,12 @@ extern "C" { typedef HPDF_Dict HPDF_Catalog; +typedef struct _HPDF_CatalogAttr_Rec *HPDF_CatalogAttr; + +typedef struct _HPDF_CatalogAttr_Rec { + HPDF_Dict fonts; +} HPDF_CatalogAttr_Rec; + HPDF_Catalog HPDF_Catalog_New (HPDF_MMgr mmgr, HPDF_Xref xref); diff --git a/include/hpdf_consts.h b/include/hpdf_consts.h index f667d2cb..78732327 100644 --- a/include/hpdf_consts.h +++ b/include/hpdf_consts.h @@ -546,6 +546,20 @@ #define HPDF_GMODE_INLINE_IMAGE 0x0020 #define HPDF_GMODE_EXTERNAL_OBJECT 0x0040 +/*----------------------------------------------------------------------------*/ +/*------ Flags for interactive fields ----------------------------------------*/ + /* BIT POSITION */ +#define HPDF_FIELD_READONLY 1 /* 1 */ +#define HPDF_FIELD_REQUIRED 2 /* 2 */ +#define HPDF_FIELD_NOEXPORT 4 /* 3 */ +#define HPDF_FIELD_MULTILINE 4096 /* 13 */ +#define HPDF_FIELD_PASSWORD 8192 /* 14 */ +#define HPDF_FIELD_FILESELECT 1048576 /* 21 */ +#define HPDF_FIELD_DONOTSPELLCHECK 4194304 /* 23 */ +#define HPDF_FIELD_DONOTSCROLL 8388608 /* 24 */ +#define HPDF_FIELD_COMB 16777216 /* 25 */ +#define HPDF_FIELD_RICHTEXT 33554432 /* 26 */ + /*----------------------------------------------------------------------------*/ diff --git a/include/hpdf_fontdef.h b/include/hpdf_fontdef.h index 792588c6..b5a03061 100644 --- a/include/hpdf_fontdef.h +++ b/include/hpdf_fontdef.h @@ -106,6 +106,7 @@ typedef struct _HPDF_FontDef_Rec { HPDF_UINT16 stemh; HPDF_UINT16 x_height; HPDF_UINT16 cap_height; + HPDF_BOOL is_form_font; /* the initial value of descriptor entry is NULL. * when first font-object besed on the fontdef object is created, diff --git a/include/hpdf_types.h b/include/hpdf_types.h index 009beffd..85aac930 100644 --- a/include/hpdf_types.h +++ b/include/hpdf_types.h @@ -262,6 +262,16 @@ typedef struct _HPDF_CMYKColor { HPDF_REAL k; } HPDF_CMYKColor; +/*---------------------------------------------------------------------------*/ +/*----- HPDF_Color struct -----------------------------------------------*/ + +typedef struct _HPDF_Color { + HPDF_ColorSpace cs; + HPDF_RGBColor rgb; + HPDF_CMYKColor cmyk; + HPDF_REAL gray; +} HPDF_Color; + /*---------------------------------------------------------------------------*/ /*------ The line cap style -------------------------------------------------*/ diff --git a/src/hpdf_catalog.c b/src/hpdf_catalog.c index 8abd88a1..7c72d0c4 100644 --- a/src/hpdf_catalog.c +++ b/src/hpdf_catalog.c @@ -48,6 +48,7 @@ HPDF_Catalog_New (HPDF_MMgr mmgr, { HPDF_Catalog catalog; HPDF_STATUS ret = 0; + HPDF_CatalogAttr attr; catalog = HPDF_Dict_New (mmgr); if (!catalog) @@ -62,6 +63,15 @@ HPDF_Catalog_New (HPDF_MMgr mmgr, ret += HPDF_Dict_AddName (catalog, "Type", "Catalog"); ret += HPDF_Dict_Add (catalog, "Pages", HPDF_Pages_New (mmgr, NULL, xref)); + attr = HPDF_GetMem (mmgr, sizeof(HPDF_CatalogAttr_Rec)); + if (!attr) { + HPDF_Dict_Free (catalog); + return NULL; + } + + catalog->attr = attr; + HPDF_MemSet (attr, 0, sizeof(HPDF_CatalogAttr_Rec)); + if (ret != HPDF_OK) return NULL; @@ -402,3 +412,110 @@ HPDF_Catalog_GetViewerPreference (HPDF_Catalog catalog) return value; } +HPDF_Dict +HPDF_Catalog_GetAcroForm (HPDF_Catalog catalog) +{ + HPDF_Dict acroForm; + + if (!catalog) + return NULL; + + acroForm = HPDF_Dict_GetItem (catalog, "AcroForm", HPDF_OCLASS_DICT); + if (!acroForm) + { + HPDF_STATUS ret = 0; + + HPDF_Dict form_dict = HPDF_Dict_New (catalog->mmgr); + if(!form_dict) + return NULL; + ret += HPDF_Dict_Add (form_dict, "Fields", HPDF_Array_New (form_dict->mmgr)); + ret += HPDF_Dict_Add (catalog, "AcroForm", form_dict); + + ret += HPDF_Dict_AddBoolean (form_dict, "NeedAppearances", HPDF_TRUE); + + HPDF_Dict dr = HPDF_Dict_New (catalog->mmgr); + if(!dr) + return NULL; + + ret += HPDF_Dict_Add (form_dict, "DR", dr); + if (ret != HPDF_OK) + return NULL; + + acroForm = form_dict; + } + + return acroForm; +} + +HPDF_STATUS +HPDF_Catalog_AddInteractiveField (HPDF_Catalog catalog, + HPDF_Dict field) +{ + HPDF_Array fields; + HPDF_Dict acroForm = HPDF_Catalog_GetAcroForm (catalog); + if(!acroForm) + return HPDF_Error_GetCode (catalog->error); + + fields = (HPDF_Array)HPDF_Dict_GetItem (acroForm, "Fields", HPDF_OCLASS_ARRAY); + + return HPDF_Array_Add (fields, field); +} + +const char* +HPDF_Catalog_GetLocalFontName (HPDF_Catalog catalog, + HPDF_Font font) +{ + HPDF_CatalogAttr attr = (HPDF_CatalogAttr)catalog->attr; + HPDF_Dict acroForm = HPDF_Catalog_GetAcroForm (catalog); + const char *key; + + HPDF_PTRACE((" HPDF_Catalog_GetLocalFontName\n")); + + if(!acroForm) + return NULL; + + /* + * whether check font-resource exists. when it does not exists, + * create font-resource + */ + if (!attr->fonts) { + HPDF_Dict resources; + HPDF_Dict fonts; + + resources = HPDF_Dict_GetItem (acroForm, "DR", HPDF_OCLASS_DICT); + + if (!resources) + return NULL; + + fonts = HPDF_Dict_New (catalog->mmgr); + if (!fonts) + return NULL; + + if (HPDF_Dict_Add (resources, "Font", fonts) != HPDF_OK) + return NULL; + + attr->fonts = fonts; + } + + /* search font-object from font-resource */ + key = HPDF_Dict_GetKeyByObj (attr->fonts, font); + if (!key) { + /* + * if the font is not resisterd in font-resource, register font to + * font-resource. + */ + char fontName[HPDF_LIMIT_MAX_NAME_LEN + 1]; + char *ptr; + char *end_ptr = fontName + HPDF_LIMIT_MAX_NAME_LEN; + + ptr = (char *)HPDF_StrCpy (fontName, "F", end_ptr); + HPDF_IToA (ptr, attr->fonts->list->count + 1, end_ptr); + + if (HPDF_Dict_Add (attr->fonts, fontName, font) != HPDF_OK) + return NULL; + + key = HPDF_Dict_GetKeyByObj (attr->fonts, font); + } + + return key; +} diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index 89a83b6b..0b854cec 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -69,6 +69,10 @@ LoadType1FontFromStream (HPDF_Doc pdf, HPDF_Stream afmdata, HPDF_Stream pfmdata); +static const char* +LoadType1FontFromStream2 (HPDF_Doc pdf, + HPDF_Stream afmdata, + const char *font_name); static const char* LoadTTFontFromStream (HPDF_Doc pdf, @@ -1431,6 +1435,41 @@ HPDF_LoadType1FontFromFile (HPDF_Doc pdf, } +/* + * Loads a Font without embedding its font data. + * If parameter font_name is specified it will be used as the font name. + */ +HPDF_EXPORT(const char*) +HPDF_LoadType1FontFromFile2 (HPDF_Doc pdf, + const char *afm_file_name, + const char *font_name) +{ + HPDF_Stream afm; + const char *ret; + + HPDF_PTRACE ((" HPDF_LoadType1FontFromFile2\n")); + + if (!HPDF_HasDoc (pdf)) + return NULL; + + /* create file stream */ + afm = HPDF_FileReader_New (pdf->mmgr, afm_file_name); + + if (HPDF_Stream_Validate (afm)) + ret = LoadType1FontFromStream2 (pdf, afm, font_name); + else + ret = NULL; + + /* destroy file stream */ + if (afm) + HPDF_Stream_Free (afm); + + if (!ret) + HPDF_CheckError (&pdf->error); + + return ret; +} + static const char* LoadType1FontFromStream (HPDF_Doc pdf, HPDF_Stream afmdata, @@ -1461,6 +1500,47 @@ LoadType1FontFromStream (HPDF_Doc pdf, return NULL; } + +static const char* +LoadType1FontFromStream2 (HPDF_Doc pdf, + HPDF_Stream afmdata, + const char *font_name) +{ + HPDF_FontDef def; + + HPDF_PTRACE ((" HPDF_LoadType1FontFromStream2\n")); + + if (!HPDF_HasDoc (pdf)) + return NULL; + + def = HPDF_Type1FontDef_Load (pdf->mmgr, afmdata, NULL); + + if (def) { + char newname[] = "HPDF_"; + if(font_name) + strcat(newname, font_name); + else + strcat(newname, def->base_font); + + HPDF_StrCpy (def->base_font, newname, def->base_font + HPDF_LIMIT_MAX_NAME_LEN); + def->is_form_font = HPDF_TRUE; + + HPDF_FontDef tmpdef = HPDF_Doc_FindFontDef (pdf, def->base_font); + if(tmpdef) { + HPDF_FontDef_Free (def); + HPDF_SetError (&pdf->error, HPDF_FONT_EXISTS, 0); + return NULL; + } + + if (HPDF_List_Add (pdf->fontdef_list, def) != HPDF_OK) { + HPDF_FontDef_Free (def); + return NULL; + } + return def->base_font; + } + return NULL; +} + HPDF_EXPORT(HPDF_FontDef) HPDF_GetTTFontDefFromFile (HPDF_Doc pdf, const char *file_name, diff --git a/src/hpdf_font_type1.c b/src/hpdf_font_type1.c index d1476c4c..b6716c4c 100644 --- a/src/hpdf_font_type1.c +++ b/src/hpdf_font_type1.c @@ -126,10 +126,17 @@ HPDF_Type1Font_New (HPDF_MMgr mmgr, fontdef_attr = (HPDF_Type1FontDefAttr)fontdef->attr; - ret += HPDF_Dict_AddName (font, "Type", "Font"); - ret += HPDF_Dict_AddName (font, "BaseFont", fontdef->base_font); - ret += HPDF_Dict_AddName (font, "Subtype", "Type1"); - + if(strncmp (fontdef->base_font, "HPDF_", 5) == 0 && fontdef->is_form_font == HPDF_TRUE) + { + ret += HPDF_Dict_AddName (font, "Type", "Font"); + ret += HPDF_Dict_AddName (font, "BaseFont", fontdef->base_font + 5); + ret += HPDF_Dict_AddName (font, "Subtype", "TrueType"); + } + else{ + ret += HPDF_Dict_AddName (font, "Type", "Font"); + ret += HPDF_Dict_AddName (font, "BaseFont", fontdef->base_font); + ret += HPDF_Dict_AddName (font, "Subtype", "Type1"); + } if (!fontdef_attr->is_base14font) { if (fontdef->missing_width != 0) ret += HPDF_Dict_AddNumber (font, "MissingWidth", @@ -178,8 +185,16 @@ Type1Font_CreateDescriptor (HPDF_MMgr mmgr, array = HPDF_Box_Array_New (mmgr, def->font_bbox); ret += HPDF_Dict_Add (descriptor, "FontBBox", array); - ret += HPDF_Dict_AddName (descriptor, "FontName", - font_attr->fontdef->base_font); + if(strncmp (font_attr->fontdef->base_font, "HPDF_", 5) == 0 && font_attr->fontdef->is_form_font == HPDF_TRUE) + { + ret += HPDF_Dict_AddName (descriptor, "FontName", + font_attr->fontdef->base_font + 5); + } + else + { + ret += HPDF_Dict_AddName (descriptor, "FontName", + font_attr->fontdef->base_font); + } ret += HPDF_Dict_AddNumber (descriptor, "ItalicAngle", def->italic_angle); ret += HPDF_Dict_AddNumber (descriptor, "StemV", def->stemv); diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index fd34619a..3fb577a1 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -2908,3 +2908,212 @@ HPDF_Page_WriteComment (HPDF_Page page, return HPDF_CheckError (page->error); return HPDF_OK; } + +/* + * Inserts a form text field. + * Parameter: + * page - The Page on which the text field should be inserted + * pdf - The PDF Document + * left, top, right, bottom - The coordinates of the text field + * name - The name of the text field + * text - The text value of the text field + * flag - A flag specifying various characteristics of the field( One or more of the HPDF_FIELD_* variables or'ed together ) + * print - If set, the text field will be printed when the page gets printed + * max_len - The maximum number of characters + * alignment - The text alignment ( 0 - Left-justified, 1 - Centered, 2 - Right-justified ) + * rotation - The rotation + * font - The text fields font + * font_size - The font_size + * color - The text color + */ +HPDF_EXPORT(HPDF_STATUS) +HPDF_Page_TextField (HPDF_Page page, + HPDF_Doc pdf, + HPDF_REAL left, + HPDF_REAL top, + HPDF_REAL right, + HPDF_REAL bottom, + const char *name, + const char *text, + HPDF_UINT flag, + HPDF_BOOL print, + HPDF_UINT max_len, + HPDF_UINT alignment, + HPDF_INT rotation, + HPDF_Font font, + HPDF_REAL font_size, + HPDF_Color color) +{ + HPDF_Dict textField; + HPDF_STATUS ret; + + HPDF_PTRACE((" HPDF_Page_TextField\n")); + + textField = HPDF_Dict_New (page->mmgr); + if (!textField) + return HPDF_CheckError (page->error); + + if ((ret = HPDF_Xref_Add (pdf->xref, textField)) != HPDF_OK) + return ret; + + ret += HPDF_Dict_AddName (textField, "Type", "Annot"); + ret += HPDF_Dict_AddName (textField, "Subtype", "Widget"); + + if (print){ + ret += HPDF_Dict_AddNumber (textField, "F", 4); + } else { + ret += HPDF_Dict_AddNumber (textField, "F", 0); + } + + /* Rect */ + HPDF_Array rectArray = HPDF_Array_New (page->mmgr); + if (!rectArray) + return HPDF_CheckError (page->error); + ret += HPDF_Array_AddReal (rectArray, left); + ret += HPDF_Array_AddReal (rectArray, bottom); + ret += HPDF_Array_AddReal (rectArray, right); + ret += HPDF_Array_AddReal (rectArray, top); + + ret += HPDF_Dict_Add (textField, "Rect", rectArray); + + /* FT */ + ret += HPDF_Dict_AddName (textField, "FT", "Tx"); + + /* T */ + HPDF_String textFieldName = HPDF_String_New (page->mmgr, name, NULL); + if (!textFieldName) + return HPDF_CheckError (page->error); + ret += HPDF_Dict_Add (textField, "T", textFieldName); + + /* V */ + HPDF_String textFieldValue = HPDF_String_New (page->mmgr, text, NULL); + if (!textFieldValue) + return HPDF_CheckError (page->error); + ret += HPDF_Dict_Add (textField, "V", textFieldValue); + + /* DR */ + HPDF_Dict resource = HPDF_Dict_New (page->mmgr); + if (!resource) + return HPDF_CheckError (page->error); + HPDF_Dict f = HPDF_Dict_New (page->mmgr); + if (!f) + return HPDF_CheckError (page->error); + ret += HPDF_Dict_Add (f, HPDF_Catalog_GetLocalFontName (pdf->catalog, font), font); + ret += HPDF_Dict_Add (resource, "Font", f); + ret += HPDF_Dict_Add (textField, "DR", resource); + + /* DA */ + char buf[HPDF_TMP_BUF_SIZ]; + char *pbuf = buf; + char *eptr = buf + HPDF_TMP_BUF_SIZ - 1; + HPDF_MemSet (buf, 0, HPDF_TMP_BUF_SIZ); + + if (color.cs == HPDF_CS_DEVICE_GRAY) + { + /* Gray Color Space */ + pbuf = HPDF_FToA (pbuf, color.gray, eptr); + pbuf = HPDF_StrCpy (pbuf, " g", eptr); + } + else if (color.cs == HPDF_CS_DEVICE_RGB) + { + /* RGB Color Space */ + pbuf = HPDF_FToA (pbuf, color.rgb.r, eptr); + *pbuf++ = ' '; + pbuf = HPDF_FToA (pbuf, color.rgb.g, eptr); + *pbuf++ = ' '; + pbuf = HPDF_FToA (pbuf, color.rgb.b, eptr); + pbuf = HPDF_StrCpy (pbuf, " rg", eptr); + } + else if (color.cs == HPDF_CS_DEVICE_CMYK) + { + /* CMYK Color Space */ + pbuf = HPDF_FToA (pbuf, color.cmyk.c, eptr); + *pbuf++ = ' '; + pbuf = HPDF_FToA (pbuf, color.cmyk.m, eptr); + *pbuf++ = ' '; + pbuf = HPDF_FToA (pbuf, color.cmyk.y, eptr); + *pbuf++ = ' '; + pbuf = HPDF_FToA (pbuf, color.cmyk.k, eptr); + pbuf = HPDF_StrCpy (pbuf, " k", eptr); + } + + pbuf = HPDF_StrCpy (pbuf, " /", eptr); + pbuf = HPDF_StrCpy (pbuf, HPDF_Catalog_GetLocalFontName (pdf->catalog, font), eptr); + *pbuf++ = ' '; + pbuf = HPDF_FToA (pbuf, font_size, eptr); + pbuf = HPDF_StrCpy (pbuf, " Tf", eptr); + + HPDF_String daValue = HPDF_String_New(page->mmgr, buf, NULL); + if (!daValue) + return HPDF_CheckError (page->error); + ret += HPDF_Dict_Add (textField, "DA", daValue); + + /* MK */ + if (rotation && rotation != 0 && (rotation % 90) == 0) + { + HPDF_Dict mk = HPDF_Dict_New (page->mmgr); + if (!mk) + return HPDF_CheckError (page->error); + ret += HPDF_Dict_AddNumber (mk, "R", rotation); + ret += HPDF_Dict_Add (textField, "MK", mk); + } + + /* ALIGNMENT */ + if (alignment > 0 && alignment <= 2) + { + ret += HPDF_Dict_AddNumber (textField, "Q", alignment); + } + + /* FF */ + if (flag > 0) + ret += HPDF_Dict_AddNumber (textField, "Ff", flag); + + /* MaxLen */ + if (max_len > 0) + ret += HPDF_Dict_AddNumber (textField, "MaxLen", max_len); + + /* AP - APPEARANCE DICTIONARY */ + HPDF_Dict ap = HPDF_Dict_New (page->mmgr); + if (!ap) + return HPDF_CheckError (page->error); + HPDF_Dict ap_stream = HPDF_DictStream_New (page->mmgr, pdf->xref); + if (!ap_stream) + return HPDF_CheckError (page->error); + ret += HPDF_Dict_Add (ap, "N", ap_stream); + + ret += HPDF_Dict_Add (textField, "AP", ap); + + ret += HPDF_Dict_AddName (ap_stream, "Type", "XObject"); + ret += HPDF_Dict_AddName (ap_stream, "Subtype", "Form"); + + /* BBOX */ + HPDF_Array bbox = HPDF_Array_New (page->mmgr); + if (!bbox) + return HPDF_CheckError (page->error); + ret += HPDF_Array_AddReal (bbox, 0); + ret += HPDF_Array_AddReal (bbox, 0); + ret += HPDF_Array_AddReal (bbox, right - left); + ret += HPDF_Array_AddReal (bbox, top - bottom); + ret += HPDF_Dict_Add (ap_stream, "BBox", bbox); + + /* RESOURCES */ + HPDF_Dict resource2 = HPDF_Dict_New (page->mmgr); + if (!resource2) + return HPDF_CheckError (page->error); + HPDF_Dict font2 = HPDF_Dict_New (page->mmgr); + if (!font2) + return HPDF_CheckError (page->error); + ret += HPDF_Dict_Add (font2, HPDF_Catalog_GetLocalFontName (pdf->catalog, font), font); + ret += HPDF_Dict_Add (resource2, "Font", font2); + ret += HPDF_Dict_Add (ap_stream, "Resources", resource2); + + /* STREAM */ + ret += HPDF_Stream_WriteStr (ap_stream->stream, "/Tx BMC\n"); + ret += HPDF_Stream_WriteStr (ap_stream->stream, "EMC\n"); + + ret += HPDF_Page_CreateTextFieldAnnotation (page, textField); + + ret += HPDF_Catalog_AddInteractiveField (pdf->catalog, textField); + + return ret; +} diff --git a/src/hpdf_pages.c b/src/hpdf_pages.c index 362ded0f..d82f3f15 100644 --- a/src/hpdf_pages.c +++ b/src/hpdf_pages.c @@ -674,6 +674,14 @@ HPDF_Page_GetExtGStateName (HPDF_Page page, } +HPDF_STATUS +HPDF_Page_CreateTextFieldAnnotation (HPDF_Page page, + HPDF_Dict textField) +{ + return AddAnnotation ( page, textField ); +} + + static HPDF_STATUS AddAnnotation (HPDF_Page page, HPDF_Annotation annot) diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index 3fd4ae61..a4290581 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -67,6 +67,7 @@ EXPORTS HPDF_LoadTTFontFromFile@12 = HPDF_LoadTTFontFromFile HPDF_LoadTTFontFromFile2@16 = HPDF_LoadTTFontFromFile2 HPDF_LoadType1FontFromFile@12 = HPDF_LoadType1FontFromFile + HPDF_LoadType1FontFromFile2@12 = HPDF_LoadType1FontFromFile2 HPDF_New@8 = HPDF_New HPDF_NewDoc@4 = HPDF_NewDoc HPDF_NewEx@20 = HPDF_NewEx @@ -171,6 +172,7 @@ EXPORTS HPDF_Page_ShowTextNextLine@8 = HPDF_Page_ShowTextNextLine HPDF_Page_ShowTextNextLineEx@16 = HPDF_Page_ShowTextNextLineEx HPDF_Page_Stroke@4 = HPDF_Page_Stroke + HPDF_Page_TextField@8 = HPDF_Page_TextField HPDF_Page_TextOut@16 = HPDF_Page_TextOut HPDF_Page_TextRect@32 = HPDF_Page_TextRect HPDF_Page_TextWidth@8 = HPDF_Page_TextWidth From 3357456fe1d67e304fb42960da09d53874822894 Mon Sep 17 00:00:00 2001 From: Hammerschmid Daniel Date: Fri, 24 Jan 2014 11:15:03 +0100 Subject: [PATCH 07/24] Added support for Encoder with custom differences Added method GetEncoder2 which gets 2 encoding names. The name of the base encoding and the new encoding name. Added the string differences_str to the HPDF_BasicEncoderAttr_Rec struct. If the differences_str is set, it will be used as the difference entry of the encoding. fixes #12 Added new and alternative Unicode-Glyph-Mappings The hpdf_encoder.c gets new entrys for the HPDF_UNICODE_GRYPH_NAME_MAP variable. These are partially new and partially alternative Unicode-to-Glyph mappings. Added HPDF_GetEncoder2 function to libhpdf.def --- .gitignore | 1 + include/hpdf.h | 4 + include/hpdf_encoder.h | 1 + src/hpdf_doc.c | 35 + src/hpdf_encoder.c | 3222 +++++++++++++++++++++++++++++++++++++- src/hpdf_fontdef_type1.c | 55 +- win32/mingw/libhpdf.def | 1 + 7 files changed, 3247 insertions(+), 72 deletions(-) diff --git a/.gitignore b/.gitignore index 3c5de835..9382151f 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ CPackSourceConfig.cmake cmake_install.cmake depcomp *.dll +*~ diff --git a/include/hpdf.h b/include/hpdf.h index 84bafe6d..7319513f 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -402,6 +402,10 @@ HPDF_EXPORT(HPDF_Encoder) HPDF_GetEncoder (HPDF_Doc pdf, const char *encoding_name); +HPDF_EXPORT(HPDF_Encoder) +HPDF_GetEncoder2 (HPDF_Doc pdf, + const char *encoding_name, + const char *base_encoding_name); HPDF_EXPORT(HPDF_Encoder) HPDF_GetCurrentEncoder (HPDF_Doc pdf); diff --git a/include/hpdf_encoder.h b/include/hpdf_encoder.h index 820fe1fb..70fdf898 100644 --- a/include/hpdf_encoder.h +++ b/include/hpdf_encoder.h @@ -176,6 +176,7 @@ typedef struct _HPDF_BasicEncoderAttr_Rec { HPDF_UNICODE unicode_map[256]; HPDF_BOOL has_differences; HPDF_BYTE differences[256]; + const char *differences_str; } HPDF_BasicEncoderAttr_Rec; diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index 0b854cec..a530c217 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -1207,6 +1207,41 @@ HPDF_GetEncoder (HPDF_Doc pdf, return encoder; } +HPDF_EXPORT(HPDF_Encoder) +HPDF_GetEncoder2 (HPDF_Doc pdf, + const char *encoding_name, + const char *base_encoding_name) +{ + HPDF_Encoder encoder; + HPDF_STATUS ret; + + HPDF_PTRACE ((" HPDF_GetEncoder\n")); + + if (!HPDF_HasDoc (pdf)) + return NULL; + + encoder = HPDF_Doc_FindEncoder (pdf, encoding_name); + + if (!encoder) { + encoder = HPDF_BasicEncoder_New (pdf->mmgr, base_encoding_name); + + if (!encoder) { + HPDF_CheckError (&pdf->error); + return NULL; + } + char *eptr; + eptr = encoder->name + HPDF_LIMIT_MAX_NAME_LEN; + HPDF_StrCpy (encoder->name, encoding_name, eptr); + + if ((ret = HPDF_List_Add (pdf->encoder_list, encoder)) != HPDF_OK) { + HPDF_Encoder_Free (encoder); + HPDF_RaiseError (&pdf->error, ret, 0); + return NULL; + } + } + + return encoder; +} HPDF_EXPORT(HPDF_Encoder) HPDF_GetCurrentEncoder (HPDF_Doc pdf) diff --git a/src/hpdf_encoder.c b/src/hpdf_encoder.c index a1cbb4b8..3cb0cf64 100644 --- a/src/hpdf_encoder.c +++ b/src/hpdf_encoder.c @@ -1081,6 +1081,3180 @@ static const HPDF_UnicodeGryphPair HPDF_UNICODE_GRYPH_NAME_MAP[] = { {0xFB2B, "afii57695"}, {0xFB35, "afii57723"}, {0xFB4B, "afii57700"}, + + /* Additional mappings */ + {0x01E2, "AEmacron"}, + {0x1EAE, "Abreveacute"}, + {0x04D0, "Abrevecyrillic"}, + {0x1EB6, "Abrevedotbelow"}, + {0x1EB0, "Abrevegrave"}, + {0x1EB2, "Abrevehookabove"}, + {0x1EB4, "Abrevetilde"}, + {0x01CD, "Acaron"}, + {0x24B6, "Acircle"}, + {0x1EA4, "Acircumflexacute"}, + {0x1EAC, "Acircumflexdotbelow"}, + {0x1EA6, "Acircumflexgrave"}, + {0x1EA8, "Acircumflexhookabove"}, + {0x1EAA, "Acircumflextilde"}, + {0x0410, "Acyrillic"}, + {0x0200, "Adblgrave"}, + {0x04D2, "Adieresiscyrillic"}, + {0x01DE, "Adieresismacron"}, + {0x1EA0, "Adotbelow"}, + {0x01E0, "Adotmacron"}, + {0x1EA2, "Ahookabove"}, + {0x04D4, "Aiecyrillic"}, + {0x0202, "Ainvertedbreve"}, + {0xFF21, "Amonospace"}, + {0x1E00, "Aringbelow"}, + {0x0531, "Aybarmenian"}, + {0x24B7, "Bcircle"}, + {0x1E02, "Bdotaccent"}, + {0x1E04, "Bdotbelow"}, + {0x0411, "Becyrillic"}, + {0x0532, "Benarmenian"}, + {0x0181, "Bhook"}, + {0x1E06, "Blinebelow"}, + {0xFF22, "Bmonospace"}, + {0x0182, "Btopbar"}, + {0x053E, "Caarmenian"}, + {0x1E08, "Ccedillaacute"}, + {0x24B8, "Ccircle"}, + {0x010A, "Cdot"}, + {0x0549, "Chaarmenian"}, + {0x04BC, "Cheabkhasiancyrillic"}, + {0x0427, "Checyrillic"}, + {0x04BE, "Chedescenderabkhasiancyrillic"}, + {0x04B6, "Chedescendercyrillic"}, + {0x04F4, "Chedieresiscyrillic"}, + {0x0543, "Cheharmenian"}, + {0x04CB, "Chekhakassiancyrillic"}, + {0x04B8, "Cheverticalstrokecyrillic"}, + {0x0187, "Chook"}, + {0xFF23, "Cmonospace"}, + {0x0551, "Coarmenian"}, + {0x01F1, "DZ"}, + {0x01C4, "DZcaron"}, + {0x0534, "Daarmenian"}, + {0x0189, "Dafrican"}, + {0x1E10, "Dcedilla"}, + {0x24B9, "Dcircle"}, + {0x1E12, "Dcircumflexbelow"}, + {0x1E0A, "Ddotaccent"}, + {0x1E0C, "Ddotbelow"}, + {0x0414, "Decyrillic"}, + {0x03EE, "Deicoptic"}, + {0x0394, "Deltagreek"}, + {0x018A, "Dhook"}, + {0x03DC, "Digammagreek"}, + {0x0402, "Djecyrillic"}, + {0x1E0E, "Dlinebelow"}, + {0xFF24, "Dmonospace"}, + {0x0110, "Dslash"}, + {0x018B, "Dtopbar"}, + {0x01F2, "Dz"}, + {0x01C5, "Dzcaron"}, + {0x04E0, "Dzeabkhasiancyrillic"}, + {0x0405, "Dzecyrillic"}, + {0x040F, "Dzhecyrillic"}, + {0x1E1C, "Ecedillabreve"}, + {0x0535, "Echarmenian"}, + {0x24BA, "Ecircle"}, + {0x1EBE, "Ecircumflexacute"}, + {0x1E18, "Ecircumflexbelow"}, + {0x1EC6, "Ecircumflexdotbelow"}, + {0x1EC0, "Ecircumflexgrave"}, + {0x1EC2, "Ecircumflexhookabove"}, + {0x1EC4, "Ecircumflextilde"}, + {0x0404, "Ecyrillic"}, + {0x0204, "Edblgrave"}, + {0x0116, "Edot"}, + {0x1EB8, "Edotbelow"}, + {0x0424, "Efcyrillic"}, + {0x0537, "Eharmenian"}, + {0x1EBA, "Ehookabove"}, + {0x2167, "Eightroman"}, + {0x0206, "Einvertedbreve"}, + {0x0464, "Eiotifiedcyrillic"}, + {0x041B, "Elcyrillic"}, + {0x216A, "Elevenroman"}, + {0x1E16, "Emacronacute"}, + {0x1E14, "Emacrongrave"}, + {0x041C, "Emcyrillic"}, + {0xFF25, "Emonospace"}, + {0x041D, "Encyrillic"}, + {0x04A2, "Endescendercyrillic"}, + {0x04A4, "Enghecyrillic"}, + {0x04C7, "Enhookcyrillic"}, + {0x0190, "Eopen"}, + {0x0420, "Ercyrillic"}, + {0x018E, "Ereversed"}, + {0x042D, "Ereversedcyrillic"}, + {0x0421, "Escyrillic"}, + {0x04AA, "Esdescendercyrillic"}, + {0x01A9, "Esh"}, + {0x0538, "Etarmenian"}, + {0x1EBC, "Etilde"}, + {0x1E1A, "Etildebelow"}, + {0x01B7, "Ezh"}, + {0x01EE, "Ezhcaron"}, + {0x01B8, "Ezhreversed"}, + {0x24BB, "Fcircle"}, + {0x1E1E, "Fdotaccent"}, + {0x0556, "Feharmenian"}, + {0x03E4, "Feicoptic"}, + {0x0191, "Fhook"}, + {0x0472, "Fitacyrillic"}, + {0x2164, "Fiveroman"}, + {0xFF26, "Fmonospace"}, + {0x2163, "Fourroman"}, + {0x3387, "GBsquare"}, + {0x01F4, "Gacute"}, + {0x0194, "Gammaafrican"}, + {0x03EA, "Gangiacoptic"}, + {0x0122, "Gcedilla"}, + {0x24BC, "Gcircle"}, + {0x0120, "Gdot"}, + {0x0413, "Gecyrillic"}, + {0x0542, "Ghadarmenian"}, + {0x0494, "Ghemiddlehookcyrillic"}, + {0x0492, "Ghestrokecyrillic"}, + {0x0490, "Gheupturncyrillic"}, + {0x0193, "Ghook"}, + {0x0533, "Gimarmenian"}, + {0x0403, "Gjecyrillic"}, + {0x1E20, "Gmacron"}, + {0xFF27, "Gmonospace"}, + {0x029B, "Gsmallhook"}, + {0x01E4, "Gstroke"}, + {0x33CB, "HPsquare"}, + {0x04A8, "Haabkhasiancyrillic"}, + {0x04B2, "Hadescendercyrillic"}, + {0x042A, "Hardsigncyrillic"}, + {0x1E2A, "Hbrevebelow"}, + {0x1E28, "Hcedilla"}, + {0x24BD, "Hcircle"}, + {0x1E26, "Hdieresis"}, + {0x1E22, "Hdotaccent"}, + {0x1E24, "Hdotbelow"}, + {0xFF28, "Hmonospace"}, + {0x0540, "Hoarmenian"}, + {0x03E8, "Horicoptic"}, + {0x3390, "Hzsquare"}, + {0x042F, "IAcyrillic"}, + {0x042E, "IUcyrillic"}, + {0x01CF, "Icaron"}, + {0x24BE, "Icircle"}, + {0x0406, "Icyrillic"}, + {0x0208, "Idblgrave"}, + {0x1E2E, "Idieresisacute"}, + {0x04E4, "Idieresiscyrillic"}, + {0x0130, "Idot"}, + {0x1ECA, "Idotbelow"}, + {0x04D6, "Iebrevecyrillic"}, + {0x0415, "Iecyrillic"}, + {0x1EC8, "Ihookabove"}, + {0x0418, "Iicyrillic"}, + {0x020A, "Iinvertedbreve"}, + {0x0419, "Iishortcyrillic"}, + {0x04E2, "Imacroncyrillic"}, + {0xFF29, "Imonospace"}, + {0x053B, "Iniarmenian"}, + {0x0401, "Iocyrillic"}, + {0x0196, "Iotaafrican"}, + {0x0197, "Istroke"}, + {0x1E2C, "Itildebelow"}, + {0x0474, "Izhitsacyrillic"}, + {0x0476, "Izhitsadblgravecyrillic"}, + {0x0541, "Jaarmenian"}, + {0x24BF, "Jcircle"}, + {0x0408, "Jecyrillic"}, + {0x054B, "Jheharmenian"}, + {0xFF2A, "Jmonospace"}, + {0x3385, "KBsquare"}, + {0x33CD, "KKsquare"}, + {0x04A0, "Kabashkircyrillic"}, + {0x1E30, "Kacute"}, + {0x041A, "Kacyrillic"}, + {0x049A, "Kadescendercyrillic"}, + {0x04C3, "Kahookcyrillic"}, + {0x049E, "Kastrokecyrillic"}, + {0x049C, "Kaverticalstrokecyrillic"}, + {0x01E8, "Kcaron"}, + {0x0136, "Kcedilla"}, + {0x24C0, "Kcircle"}, + {0x1E32, "Kdotbelow"}, + {0x0554, "Keharmenian"}, + {0x053F, "Kenarmenian"}, + {0x0425, "Khacyrillic"}, + {0x03E6, "Kheicoptic"}, + {0x0198, "Khook"}, + {0x040C, "Kjecyrillic"}, + {0x1E34, "Klinebelow"}, + {0xFF2B, "Kmonospace"}, + {0x0480, "Koppacyrillic"}, + {0x03DE, "Koppagreek"}, + {0x046E, "Ksicyrillic"}, + {0x01C7, "LJ"}, + {0x013B, "Lcedilla"}, + {0x24C1, "Lcircle"}, + {0x1E3C, "Lcircumflexbelow"}, + {0x013F, "Ldotaccent"}, + {0x1E36, "Ldotbelow"}, + {0x1E38, "Ldotbelowmacron"}, + {0x053C, "Liwnarmenian"}, + {0x01C8, "Lj"}, + {0x0409, "Ljecyrillic"}, + {0x1E3A, "Llinebelow"}, + {0xFF2C, "Lmonospace"}, + {0x3386, "MBsquare"}, + {0x1E3E, "Macute"}, + {0x24C2, "Mcircle"}, + {0x1E40, "Mdotaccent"}, + {0x1E42, "Mdotbelow"}, + {0x0544, "Menarmenian"}, + {0xFF2D, "Mmonospace"}, + {0x019C, "Mturned"}, + {0x01CA, "NJ"}, + {0x0145, "Ncedilla"}, + {0x24C3, "Ncircle"}, + {0x1E4A, "Ncircumflexbelow"}, + {0x1E44, "Ndotaccent"}, + {0x1E46, "Ndotbelow"}, + {0x019D, "Nhookleft"}, + {0x2168, "Nineroman"}, + {0x01CB, "Nj"}, + {0x040A, "Njecyrillic"}, + {0x1E48, "Nlinebelow"}, + {0xFF2E, "Nmonospace"}, + {0x0546, "Nowarmenian"}, + {0x04E8, "Obarredcyrillic"}, + {0x04EA, "Obarreddieresiscyrillic"}, + {0x01D1, "Ocaron"}, + {0x019F, "Ocenteredtilde"}, + {0x24C4, "Ocircle"}, + {0x1ED0, "Ocircumflexacute"}, + {0x1ED8, "Ocircumflexdotbelow"}, + {0x1ED2, "Ocircumflexgrave"}, + {0x1ED4, "Ocircumflexhookabove"}, + {0x1ED6, "Ocircumflextilde"}, + {0x041E, "Ocyrillic"}, + {0x0150, "Odblacute"}, + {0x020C, "Odblgrave"}, + {0x04E6, "Odieresiscyrillic"}, + {0x1ECC, "Odotbelow"}, + {0x0555, "Oharmenian"}, + {0x2126, "Ohm"}, + {0x1ECE, "Ohookabove"}, + {0x1EDA, "Ohornacute"}, + {0x1EE2, "Ohorndotbelow"}, + {0x1EDC, "Ohorngrave"}, + {0x1EDE, "Ohornhookabove"}, + {0x1EE0, "Ohorntilde"}, + {0x01A2, "Oi"}, + {0x020E, "Oinvertedbreve"}, + {0x1E52, "Omacronacute"}, + {0x1E50, "Omacrongrave"}, + {0x0460, "Omegacyrillic"}, + {0x03A9, "Omegagreek"}, + {0x047A, "Omegaroundcyrillic"}, + {0x047C, "Omegatitlocyrillic"}, + {0xFF2F, "Omonospace"}, + {0x2160, "Oneroman"}, + {0x01EA, "Oogonek"}, + {0x01EC, "Oogonekmacron"}, + {0x0186, "Oopen"}, + {0x01FE, "Ostrokeacute"}, + {0x047E, "Otcyrillic"}, + {0x1E4C, "Otildeacute"}, + {0x1E4E, "Otildedieresis"}, + {0x1E54, "Pacute"}, + {0x24C5, "Pcircle"}, + {0x1E56, "Pdotaccent"}, + {0x041F, "Pecyrillic"}, + {0x054A, "Peharmenian"}, + {0x04A6, "Pemiddlehookcyrillic"}, + {0x01A4, "Phook"}, + {0x0553, "Piwrarmenian"}, + {0xFF30, "Pmonospace"}, + {0x0470, "Psicyrillic"}, + {0x24C6, "Qcircle"}, + {0xFF31, "Qmonospace"}, + {0x054C, "Raarmenian"}, + {0x0156, "Rcedilla"}, + {0x24C7, "Rcircle"}, + {0x0210, "Rdblgrave"}, + {0x1E58, "Rdotaccent"}, + {0x1E5A, "Rdotbelow"}, + {0x1E5C, "Rdotbelowmacron"}, + {0x0550, "Reharmenian"}, + {0x0212, "Rinvertedbreve"}, + {0x1E5E, "Rlinebelow"}, + {0xFF32, "Rmonospace"}, + {0x0281, "Rsmallinverted"}, + {0x02B6, "Rsmallinvertedsuperior"}, + {0x1E64, "Sacutedotaccent"}, + {0x03E0, "Sampigreek"}, + {0x1E66, "Scarondotaccent"}, + {0x015E, "Scedilla"}, + {0x018F, "Schwa"}, + {0x04D8, "Schwacyrillic"}, + {0x04DA, "Schwadieresiscyrillic"}, + {0x24C8, "Scircle"}, + {0x1E60, "Sdotaccent"}, + {0x1E62, "Sdotbelow"}, + {0x1E68, "Sdotbelowdotaccent"}, + {0x054D, "Seharmenian"}, + {0x2166, "Sevenroman"}, + {0x0547, "Shaarmenian"}, + {0x0428, "Shacyrillic"}, + {0x0429, "Shchacyrillic"}, + {0x03E2, "Sheicoptic"}, + {0x04BA, "Shhacyrillic"}, + {0x03EC, "Shimacoptic"}, + {0x2165, "Sixroman"}, + {0xFF33, "Smonospace"}, + {0x042C, "Softsigncyrillic"}, + {0x03DA, "Stigmagreek"}, + {0x0162, "Tcedilla"}, + {0x24C9, "Tcircle"}, + {0x1E70, "Tcircumflexbelow"}, + {0x0162, "Tcommaaccent"}, + {0x1E6A, "Tdotaccent"}, + {0x1E6C, "Tdotbelow"}, + {0x0422, "Tecyrillic"}, + {0x04AC, "Tedescendercyrillic"}, + {0x2169, "Tenroman"}, + {0x04B4, "Tetsecyrillic"}, + {0x01AC, "Thook"}, + {0x2162, "Threeroman"}, + {0x054F, "Tiwnarmenian"}, + {0x1E6E, "Tlinebelow"}, + {0xFF34, "Tmonospace"}, + {0x0539, "Toarmenian"}, + {0x01BC, "Tonefive"}, + {0x0184, "Tonesix"}, + {0x01A7, "Tonetwo"}, + {0x01AE, "Tretroflexhook"}, + {0x0426, "Tsecyrillic"}, + {0x040B, "Tshecyrillic"}, + {0x216B, "Twelveroman"}, + {0x2161, "Tworoman"}, + {0x01D3, "Ucaron"}, + {0x24CA, "Ucircle"}, + {0x1E76, "Ucircumflexbelow"}, + {0x0423, "Ucyrillic"}, + {0x0170, "Udblacute"}, + {0x0214, "Udblgrave"}, + {0x01D7, "Udieresisacute"}, + {0x1E72, "Udieresisbelow"}, + {0x01D9, "Udieresiscaron"}, + {0x04F0, "Udieresiscyrillic"}, + {0x01DB, "Udieresisgrave"}, + {0x01D5, "Udieresismacron"}, + {0x1EE4, "Udotbelow"}, + {0x1EE6, "Uhookabove"}, + {0x1EE8, "Uhornacute"}, + {0x1EF0, "Uhorndotbelow"}, + {0x1EEA, "Uhorngrave"}, + {0x1EEC, "Uhornhookabove"}, + {0x1EEE, "Uhorntilde"}, + {0x04F2, "Uhungarumlautcyrillic"}, + {0x0216, "Uinvertedbreve"}, + {0x0478, "Ukcyrillic"}, + {0x04EE, "Umacroncyrillic"}, + {0x1E7A, "Umacrondieresis"}, + {0xFF35, "Umonospace"}, + {0x03D3, "Upsilonacutehooksymbolgreek"}, + {0x01B1, "Upsilonafrican"}, + {0x03D4, "Upsilondieresishooksymbolgreek"}, + {0x03D2, "Upsilonhooksymbol"}, + {0x040E, "Ushortcyrillic"}, + {0x04AE, "Ustraightcyrillic"}, + {0x04B0, "Ustraightstrokecyrillic"}, + {0x1E78, "Utildeacute"}, + {0x1E74, "Utildebelow"}, + {0x24CB, "Vcircle"}, + {0x1E7E, "Vdotbelow"}, + {0x0412, "Vecyrillic"}, + {0x054E, "Vewarmenian"}, + {0x01B2, "Vhook"}, + {0xFF36, "Vmonospace"}, + {0x0548, "Voarmenian"}, + {0x1E7C, "Vtilde"}, + {0x24CC, "Wcircle"}, + {0x1E86, "Wdotaccent"}, + {0x1E88, "Wdotbelow"}, + {0xFF37, "Wmonospace"}, + {0x24CD, "Xcircle"}, + {0x1E8C, "Xdieresis"}, + {0x1E8A, "Xdotaccent"}, + {0x053D, "Xeharmenian"}, + {0xFF38, "Xmonospace"}, + {0x0462, "Yatcyrillic"}, + {0x24CE, "Ycircle"}, + {0x1E8E, "Ydotaccent"}, + {0x1EF4, "Ydotbelow"}, + {0x042B, "Yericyrillic"}, + {0x04F8, "Yerudieresiscyrillic"}, + {0x01B3, "Yhook"}, + {0x1EF6, "Yhookabove"}, + {0x0545, "Yiarmenian"}, + {0x0407, "Yicyrillic"}, + {0x0552, "Yiwnarmenian"}, + {0xFF39, "Ymonospace"}, + {0x1EF8, "Ytilde"}, + {0x046A, "Yusbigcyrillic"}, + {0x046C, "Yusbigiotifiedcyrillic"}, + {0x0466, "Yuslittlecyrillic"}, + {0x0468, "Yuslittleiotifiedcyrillic"}, + {0x0536, "Zaarmenian"}, + {0x24CF, "Zcircle"}, + {0x1E90, "Zcircumflex"}, + {0x017B, "Zdot"}, + {0x1E92, "Zdotbelow"}, + {0x0417, "Zecyrillic"}, + {0x0498, "Zedescendercyrillic"}, + {0x04DE, "Zedieresiscyrillic"}, + {0x053A, "Zhearmenian"}, + {0x04C1, "Zhebrevecyrillic"}, + {0x0416, "Zhecyrillic"}, + {0x0496, "Zhedescendercyrillic"}, + {0x04DC, "Zhedieresiscyrillic"}, + {0x1E94, "Zlinebelow"}, + {0xFF3A, "Zmonospace"}, + {0x01B5, "Zstroke"}, + {0x0986, "aabengali"}, + {0x0906, "aadeva"}, + {0x0A86, "aagujarati"}, + {0x0A06, "aagurmukhi"}, + {0x0A3E, "aamatragurmukhi"}, + {0x3303, "aarusquare"}, + {0x09BE, "aavowelsignbengali"}, + {0x093E, "aavowelsigndeva"}, + {0x0ABE, "aavowelsigngujarati"}, + {0x055F, "abbreviationmarkarmenian"}, + {0x0970, "abbreviationsigndeva"}, + {0x0985, "abengali"}, + {0x311A, "abopomofo"}, + {0x1EAF, "abreveacute"}, + {0x04D1, "abrevecyrillic"}, + {0x1EB7, "abrevedotbelow"}, + {0x1EB1, "abrevegrave"}, + {0x1EB3, "abrevehookabove"}, + {0x1EB5, "abrevetilde"}, + {0x01CE, "acaron"}, + {0x24D0, "acircle"}, + {0x1EA5, "acircumflexacute"}, + {0x1EAD, "acircumflexdotbelow"}, + {0x1EA7, "acircumflexgrave"}, + {0x1EA9, "acircumflexhookabove"}, + {0x1EAB, "acircumflextilde"}, + {0x0317, "acutebelowcmb"}, + {0x0301, "acutecmb"}, + {0x0954, "acutedeva"}, + {0x02CF, "acutelowmod"}, + {0x0341, "acutetonecmb"}, + {0x0430, "acyrillic"}, + {0x0201, "adblgrave"}, + {0x0A71, "addakgurmukhi"}, + {0x0905, "adeva"}, + {0x04D3, "adieresiscyrillic"}, + {0x01DF, "adieresismacron"}, + {0x1EA1, "adotbelow"}, + {0x01E1, "adotmacron"}, + {0x3150, "aekorean"}, + {0x01E3, "aemacron"}, + {0x20A4, "afii08941"}, + {0x0A85, "agujarati"}, + {0x0A05, "agurmukhi"}, + {0x3042, "ahiragana"}, + {0x1EA3, "ahookabove"}, + {0x0990, "aibengali"}, + {0x311E, "aibopomofo"}, + {0x0910, "aideva"}, + {0x04D5, "aiecyrillic"}, + {0x0A90, "aigujarati"}, + {0x0A10, "aigurmukhi"}, + {0x0A48, "aimatragurmukhi"}, + {0x0639, "ainarabic"}, + {0xFECA, "ainfinalarabic"}, + {0xFECB, "aininitialarabic"}, + {0xFECC, "ainmedialarabic"}, + {0x0203, "ainvertedbreve"}, + {0x09C8, "aivowelsignbengali"}, + {0x0948, "aivowelsigndeva"}, + {0x0AC8, "aivowelsigngujarati"}, + {0x30A2, "akatakana"}, + {0xFF71, "akatakanahalfwidth"}, + {0x314F, "akorean"}, + {0x05D0, "alef"}, + {0x0627, "alefarabic"}, + {0xFB30, "alefdageshhebrew"}, + {0xFE8E, "aleffinalarabic"}, + {0x0623, "alefhamzaabovearabic"}, + {0xFE84, "alefhamzaabovefinalarabic"}, + {0x0625, "alefhamzabelowarabic"}, + {0xFE88, "alefhamzabelowfinalarabic"}, + {0x05D0, "alefhebrew"}, + {0xFB4F, "aleflamedhebrew"}, + {0x0622, "alefmaddaabovearabic"}, + {0xFE82, "alefmaddaabovefinalarabic"}, + {0x0649, "alefmaksuraarabic"}, + {0xFEF0, "alefmaksurafinalarabic"}, + {0xFEF3, "alefmaksurainitialarabic"}, + {0xFEF4, "alefmaksuramedialarabic"}, + {0xFB2E, "alefpatahhebrew"}, + {0xFB2F, "alefqamatshebrew"}, + {0x224C, "allequal"}, + {0xFF41, "amonospace"}, + {0xFF06, "ampersandmonospace"}, + {0x33C2, "amsquare"}, + {0x3122, "anbopomofo"}, + {0x3124, "angbopomofo"}, + {0x0E5A, "angkhankhuthai"}, + {0x3008, "anglebracketleft"}, + {0xFE3F, "anglebracketleftvertical"}, + {0x3009, "anglebracketright"}, + {0xFE40, "anglebracketrightvertical"}, + {0x212B, "angstrom"}, + {0x0952, "anudattadeva"}, + {0x0982, "anusvarabengali"}, + {0x0902, "anusvaradeva"}, + {0x0A82, "anusvaragujarati"}, + {0x3300, "apaatosquare"}, + {0x249C, "aparen"}, + {0x055A, "apostrophearmenian"}, + {0x02BC, "apostrophemod"}, + {0xF8FF, "apple"}, + {0x2250, "approaches"}, + {0x2252, "approxequalorimage"}, + {0x2245, "approximatelyequal"}, + {0x318E, "araeaekorean"}, + {0x318D, "araeakorean"}, + {0x2312, "arc"}, + {0x1E9A, "arighthalfring"}, + {0x1E01, "aringbelow"}, + {0x21E3, "arrowdashdown"}, + {0x21E0, "arrowdashleft"}, + {0x21E2, "arrowdashright"}, + {0x21E1, "arrowdashup"}, + {0x2199, "arrowdownleft"}, + {0x2198, "arrowdownright"}, + {0x21E9, "arrowdownwhite"}, + {0x02C5, "arrowheaddownmod"}, + {0x02C2, "arrowheadleftmod"}, + {0x02C3, "arrowheadrightmod"}, + {0x02C4, "arrowheadupmod"}, + {0x21D0, "arrowleftdbl"}, + {0x21CD, "arrowleftdblstroke"}, + {0x21C6, "arrowleftoverright"}, + {0x21E6, "arrowleftwhite"}, + {0x21CF, "arrowrightdblstroke"}, + {0x279E, "arrowrightheavy"}, + {0x21C4, "arrowrightoverleft"}, + {0x21E8, "arrowrightwhite"}, + {0x21E4, "arrowtableft"}, + {0x21E5, "arrowtabright"}, + {0x21A8, "arrowupdownbase"}, + {0x2196, "arrowupleft"}, + {0x21C5, "arrowupleftofdown"}, + {0x2197, "arrowupright"}, + {0x21E7, "arrowupwhite"}, + {0xFF3E, "asciicircummonospace"}, + {0xFF5E, "asciitildemonospace"}, + {0x0251, "ascript"}, + {0x0252, "ascriptturned"}, + {0x3041, "asmallhiragana"}, + {0x30A1, "asmallkatakana"}, + {0xFF67, "asmallkatakanahalfwidth"}, + {0x066D, "asteriskaltonearabic"}, + {0x066D, "asteriskarabic"}, + {0xFF0A, "asteriskmonospace"}, + {0xFE61, "asterisksmall"}, + {0x2042, "asterism"}, + {0x2243, "asymptoticallyequal"}, + {0xFF20, "atmonospace"}, + {0xFE6B, "atsmall"}, + {0x0250, "aturned"}, + {0x0994, "aubengali"}, + {0x3120, "aubopomofo"}, + {0x0914, "audeva"}, + {0x0A94, "augujarati"}, + {0x0A14, "augurmukhi"}, + {0x09D7, "aulengthmarkbengali"}, + {0x0A4C, "aumatragurmukhi"}, + {0x09CC, "auvowelsignbengali"}, + {0x094C, "auvowelsigndeva"}, + {0x0ACC, "auvowelsigngujarati"}, + {0x093D, "avagrahadeva"}, + {0x0561, "aybarmenian"}, + {0x05E2, "ayin"}, + {0xFB20, "ayinaltonehebrew"}, + {0x05E2, "ayinhebrew"}, + {0x09AC, "babengali"}, + {0xFF3C, "backslashmonospace"}, + {0x092C, "badeva"}, + {0x0AAC, "bagujarati"}, + {0x0A2C, "bagurmukhi"}, + {0x3070, "bahiragana"}, + {0x0E3F, "bahtthai"}, + {0x30D0, "bakatakana"}, + {0xFF5C, "barmonospace"}, + {0x3105, "bbopomofo"}, + {0x24D1, "bcircle"}, + {0x1E03, "bdotaccent"}, + {0x1E05, "bdotbelow"}, + {0x266C, "beamedsixteenthnotes"}, + {0x2235, "because"}, + {0x0431, "becyrillic"}, + {0x0628, "beharabic"}, + {0xFE90, "behfinalarabic"}, + {0xFE91, "behinitialarabic"}, + {0x3079, "behiragana"}, + {0xFE92, "behmedialarabic"}, + {0xFC9F, "behmeeminitialarabic"}, + {0xFC08, "behmeemisolatedarabic"}, + {0xFC6D, "behnoonfinalarabic"}, + {0x30D9, "bekatakana"}, + {0x0562, "benarmenian"}, + {0x05D1, "bet"}, + {0x03D0, "betasymbolgreek"}, + {0xFB31, "betdagesh"}, + {0xFB31, "betdageshhebrew"}, + {0x05D1, "bethebrew"}, + {0xFB4C, "betrafehebrew"}, + {0x09AD, "bhabengali"}, + {0x092D, "bhadeva"}, + {0x0AAD, "bhagujarati"}, + {0x0A2D, "bhagurmukhi"}, + {0x0253, "bhook"}, + {0x3073, "bihiragana"}, + {0x30D3, "bikatakana"}, + {0x0298, "bilabialclick"}, + {0x0A02, "bindigurmukhi"}, + {0x3331, "birusquare"}, + {0x25CF, "blackcircle"}, + {0x25C6, "blackdiamond"}, + {0x25BC, "blackdownpointingtriangle"}, + {0x25C4, "blackleftpointingpointer"}, + {0x25C0, "blackleftpointingtriangle"}, + {0x3010, "blacklenticularbracketleft"}, + {0xFE3B, "blacklenticularbracketleftvertical"}, + {0x3011, "blacklenticularbracketright"}, + {0xFE3C, "blacklenticularbracketrightvertical"}, + {0x25E3, "blacklowerlefttriangle"}, + {0x25E2, "blacklowerrighttriangle"}, + {0x25AC, "blackrectangle"}, + {0x25BA, "blackrightpointingpointer"}, + {0x25B6, "blackrightpointingtriangle"}, + {0x25AA, "blacksmallsquare"}, + {0x263B, "blacksmilingface"}, + {0x25A0, "blacksquare"}, + {0x2605, "blackstar"}, + {0x25E4, "blackupperlefttriangle"}, + {0x25E5, "blackupperrighttriangle"}, + {0x25B4, "blackuppointingsmalltriangle"}, + {0x25B2, "blackuppointingtriangle"}, + {0x2423, "blank"}, + {0x1E07, "blinebelow"}, + {0xFF42, "bmonospace"}, + {0x0E1A, "bobaimaithai"}, + {0x307C, "bohiragana"}, + {0x30DC, "bokatakana"}, + {0x249D, "bparen"}, + {0x33C3, "bqsquare"}, + {0xFF5B, "braceleftmonospace"}, + {0xFE5B, "braceleftsmall"}, + {0xFE37, "braceleftvertical"}, + {0xFF5D, "bracerightmonospace"}, + {0xFE5C, "bracerightsmall"}, + {0xFE38, "bracerightvertical"}, + {0xFF3B, "bracketleftmonospace"}, + {0xFF3D, "bracketrightmonospace"}, + {0x032E, "brevebelowcmb"}, + {0x0306, "brevecmb"}, + {0x032F, "breveinvertedbelowcmb"}, + {0x0311, "breveinvertedcmb"}, + {0x0361, "breveinverteddoublecmb"}, + {0x032A, "bridgebelowcmb"}, + {0x033A, "bridgeinvertedbelowcmb"}, + {0x0180, "bstroke"}, + {0x0183, "btopbar"}, + {0x3076, "buhiragana"}, + {0x30D6, "bukatakana"}, + {0x25D8, "bulletinverse"}, + {0x2219, "bulletoperator"}, + {0x25CE, "bullseye"}, + {0x056E, "caarmenian"}, + {0x099A, "cabengali"}, + {0x091A, "cadeva"}, + {0x0A9A, "cagujarati"}, + {0x0A1A, "cagurmukhi"}, + {0x3388, "calsquare"}, + {0x0981, "candrabindubengali"}, + {0x0310, "candrabinducmb"}, + {0x0901, "candrabindudeva"}, + {0x0A81, "candrabindugujarati"}, + {0x21EA, "capslock"}, + {0x2105, "careof"}, + {0x032C, "caronbelowcmb"}, + {0x030C, "caroncmb"}, + {0x3118, "cbopomofo"}, + {0x1E09, "ccedillaacute"}, + {0x24D2, "ccircle"}, + {0x0255, "ccurl"}, + {0x010B, "cdot"}, + {0x33C5, "cdsquare"}, + {0x0327, "cedillacmb"}, + {0x2103, "centigrade"}, + {0xFFE0, "centmonospace"}, + {0x0579, "chaarmenian"}, + {0x099B, "chabengali"}, + {0x091B, "chadeva"}, + {0x0A9B, "chagujarati"}, + {0x0A1B, "chagurmukhi"}, + {0x3114, "chbopomofo"}, + {0x04BD, "cheabkhasiancyrillic"}, + {0x2713, "checkmark"}, + {0x0447, "checyrillic"}, + {0x04BF, "chedescenderabkhasiancyrillic"}, + {0x04B7, "chedescendercyrillic"}, + {0x04F5, "chedieresiscyrillic"}, + {0x0573, "cheharmenian"}, + {0x04CC, "chekhakassiancyrillic"}, + {0x04B9, "cheverticalstrokecyrillic"}, + {0x3277, "chieuchacirclekorean"}, + {0x3217, "chieuchaparenkorean"}, + {0x3269, "chieuchcirclekorean"}, + {0x314A, "chieuchkorean"}, + {0x3209, "chieuchparenkorean"}, + {0x0E0A, "chochangthai"}, + {0x0E08, "chochanthai"}, + {0x0E09, "chochingthai"}, + {0x0E0C, "chochoethai"}, + {0x0188, "chook"}, + {0x3276, "cieucacirclekorean"}, + {0x3216, "cieucaparenkorean"}, + {0x3268, "cieuccirclekorean"}, + {0x3148, "cieuckorean"}, + {0x3208, "cieucparenkorean"}, + {0x321C, "cieucuparenkorean"}, + {0x2299, "circleot"}, + {0x3036, "circlepostalmark"}, + {0x25D0, "circlewithlefthalfblack"}, + {0x25D1, "circlewithrighthalfblack"}, + {0x032D, "circumflexbelowcmb"}, + {0x0302, "circumflexcmb"}, + {0x2327, "clear"}, + {0x01C2, "clickalveolar"}, + {0x01C0, "clickdental"}, + {0x01C1, "clicklateral"}, + {0x01C3, "clickretroflex"}, + {0x2663, "clubsuitblack"}, + {0x2667, "clubsuitwhite"}, + {0x33A4, "cmcubedsquare"}, + {0xFF43, "cmonospace"}, + {0x33A0, "cmsquaredsquare"}, + {0x0581, "coarmenian"}, + {0xFF1A, "colonmonospace"}, + {0x20A1, "colonsign"}, + {0xFE55, "colonsmall"}, + {0x02D1, "colontriangularhalfmod"}, + {0x02D0, "colontriangularmod"}, + {0x0313, "commaabovecmb"}, + {0x0315, "commaaboverightcmb"}, + {0x060C, "commaarabic"}, + {0x055D, "commaarmenian"}, + {0xFF0C, "commamonospace"}, + {0x0314, "commareversedabovecmb"}, + {0x02BD, "commareversedmod"}, + {0xFE50, "commasmall"}, + {0x0312, "commaturnedabovecmb"}, + {0x02BB, "commaturnedmod"}, + {0x263C, "compass"}, + {0x222E, "contourintegral"}, + {0x2303, "control"}, + {0x0006, "controlACK"}, + {0x0007, "controlBEL"}, + {0x0008, "controlBS"}, + {0x0018, "controlCAN"}, + {0x000D, "controlCR"}, + {0x0011, "controlDC1"}, + {0x0012, "controlDC2"}, + {0x0013, "controlDC3"}, + {0x0014, "controlDC4"}, + {0x007F, "controlDEL"}, + {0x0010, "controlDLE"}, + {0x0019, "controlEM"}, + {0x0005, "controlENQ"}, + {0x0004, "controlEOT"}, + {0x001B, "controlESC"}, + {0x0017, "controlETB"}, + {0x0003, "controlETX"}, + {0x000C, "controlFF"}, + {0x001C, "controlFS"}, + {0x001D, "controlGS"}, + {0x0009, "controlHT"}, + {0x000A, "controlLF"}, + {0x0015, "controlNAK"}, + {0x001E, "controlRS"}, + {0x000F, "controlSI"}, + {0x000E, "controlSO"}, + {0x0002, "controlSOT"}, + {0x0001, "controlSTX"}, + {0x001A, "controlSUB"}, + {0x0016, "controlSYN"}, + {0x001F, "controlUS"}, + {0x000B, "controlVT"}, + {0x300C, "cornerbracketleft"}, + {0xFF62, "cornerbracketlefthalfwidth"}, + {0xFE41, "cornerbracketleftvertical"}, + {0x300D, "cornerbracketright"}, + {0xFF63, "cornerbracketrighthalfwidth"}, + {0xFE42, "cornerbracketrightvertical"}, + {0x337F, "corporationsquare"}, + {0x33C7, "cosquare"}, + {0x33C6, "coverkgsquare"}, + {0x249E, "cparen"}, + {0x20A2, "cruzeiro"}, + {0x0297, "cstretched"}, + {0x22CF, "curlyand"}, + {0x22CE, "curlyor"}, + {0x0564, "daarmenian"}, + {0x09A6, "dabengali"}, + {0x0636, "dadarabic"}, + {0x0926, "dadeva"}, + {0xFEBE, "dadfinalarabic"}, + {0xFEBF, "dadinitialarabic"}, + {0xFEC0, "dadmedialarabic"}, + {0x05BC, "dagesh"}, + {0x05BC, "dageshhebrew"}, + {0x0AA6, "dagujarati"}, + {0x0A26, "dagurmukhi"}, + {0x3060, "dahiragana"}, + {0x30C0, "dakatakana"}, + {0x062F, "dalarabic"}, + {0x05D3, "dalet"}, + {0xFB33, "daletdagesh"}, + {0xFB33, "daletdageshhebrew"}, + {0x05D3, "dalethebrew"}, + {0xFEAA, "dalfinalarabic"}, + {0x064F, "dammaarabic"}, + {0x064F, "dammalowarabic"}, + {0x064C, "dammatanaltonearabic"}, + {0x064C, "dammatanarabic"}, + {0x0964, "danda"}, + {0x05A7, "dargahebrew"}, + {0x05A7, "dargalefthebrew"}, + {0x0485, "dasiapneumatacyrilliccmb"}, + {0x300A, "dblanglebracketleft"}, + {0xFE3D, "dblanglebracketleftvertical"}, + {0x300B, "dblanglebracketright"}, + {0xFE3E, "dblanglebracketrightvertical"}, + {0x032B, "dblarchinvertedbelowcmb"}, + {0x21D4, "dblarrowleft"}, + {0x21D2, "dblarrowright"}, + {0x0965, "dbldanda"}, + {0x030F, "dblgravecmb"}, + {0x222C, "dblintegral"}, + {0x2017, "dbllowline"}, + {0x0333, "dbllowlinecmb"}, + {0x033F, "dbloverlinecmb"}, + {0x02BA, "dblprimemod"}, + {0x2016, "dblverticalbar"}, + {0x030E, "dblverticallineabovecmb"}, + {0x3109, "dbopomofo"}, + {0x33C8, "dbsquare"}, + {0x1E11, "dcedilla"}, + {0x24D3, "dcircle"}, + {0x1E13, "dcircumflexbelow"}, + {0x09A1, "ddabengali"}, + {0x0921, "ddadeva"}, + {0x0AA1, "ddagujarati"}, + {0x0A21, "ddagurmukhi"}, + {0x0688, "ddalarabic"}, + {0xFB89, "ddalfinalarabic"}, + {0x095C, "dddhadeva"}, + {0x09A2, "ddhabengali"}, + {0x0922, "ddhadeva"}, + {0x0AA2, "ddhagujarati"}, + {0x0A22, "ddhagurmukhi"}, + {0x1E0B, "ddotaccent"}, + {0x1E0D, "ddotbelow"}, + {0x066B, "decimalseparatorarabic"}, + {0x066B, "decimalseparatorpersian"}, + {0x0434, "decyrillic"}, + {0x05AD, "dehihebrew"}, + {0x3067, "dehiragana"}, + {0x03EF, "deicoptic"}, + {0x30C7, "dekatakana"}, + {0x232B, "deleteleft"}, + {0x2326, "deleteright"}, + {0x018D, "deltaturned"}, + {0x09F8, "denominatorminusonenumeratorbengali"}, + {0x02A4, "dezh"}, + {0x09A7, "dhabengali"}, + {0x0927, "dhadeva"}, + {0x0AA7, "dhagujarati"}, + {0x0A27, "dhagurmukhi"}, + {0x0257, "dhook"}, + {0x0385, "dialytikatonos"}, + {0x0344, "dialytikatonoscmb"}, + {0x2662, "diamondsuitwhite"}, + {0x0324, "dieresisbelowcmb"}, + {0x0308, "dieresiscmb"}, + {0x3062, "dihiragana"}, + {0x30C2, "dikatakana"}, + {0x3003, "dittomark"}, + {0x2223, "divides"}, + {0x2215, "divisionslash"}, + {0x0452, "djecyrillic"}, + {0x1E0F, "dlinebelow"}, + {0x3397, "dlsquare"}, + {0x0111, "dmacron"}, + {0xFF44, "dmonospace"}, + {0x0E0E, "dochadathai"}, + {0x0E14, "dodekthai"}, + {0x3069, "dohiragana"}, + {0x30C9, "dokatakana"}, + {0xFF04, "dollarmonospace"}, + {0xFE69, "dollarsmall"}, + {0x3326, "dorusquare"}, + {0x0307, "dotaccentcmb"}, + {0x0323, "dotbelowcmb"}, + {0x30FB, "dotkatakana"}, + {0x0284, "dotlessjstrokehook"}, + {0x25CC, "dottedcircle"}, + {0xFB1F, "doubleyodpatah"}, + {0xFB1F, "doubleyodpatahhebrew"}, + {0x031E, "downtackbelowcmb"}, + {0x02D5, "downtackmod"}, + {0x249F, "dparen"}, + {0x0256, "dtail"}, + {0x018C, "dtopbar"}, + {0x3065, "duhiragana"}, + {0x30C5, "dukatakana"}, + {0x01F3, "dz"}, + {0x02A3, "dzaltone"}, + {0x01C6, "dzcaron"}, + {0x02A5, "dzcurl"}, + {0x04E1, "dzeabkhasiancyrillic"}, + {0x0455, "dzecyrillic"}, + {0x045F, "dzhecyrillic"}, + {0x2641, "earth"}, + {0x098F, "ebengali"}, + {0x311C, "ebopomofo"}, + {0x090D, "ecandradeva"}, + {0x0A8D, "ecandragujarati"}, + {0x0945, "ecandravowelsigndeva"}, + {0x0AC5, "ecandravowelsigngujarati"}, + {0x1E1D, "ecedillabreve"}, + {0x0565, "echarmenian"}, + {0x0587, "echyiwnarmenian"}, + {0x24D4, "ecircle"}, + {0x1EBF, "ecircumflexacute"}, + {0x1E19, "ecircumflexbelow"}, + {0x1EC7, "ecircumflexdotbelow"}, + {0x1EC1, "ecircumflexgrave"}, + {0x1EC3, "ecircumflexhookabove"}, + {0x1EC5, "ecircumflextilde"}, + {0x0454, "ecyrillic"}, + {0x0205, "edblgrave"}, + {0x090F, "edeva"}, + {0x0117, "edot"}, + {0x1EB9, "edotbelow"}, + {0x0A0F, "eegurmukhi"}, + {0x0A47, "eematragurmukhi"}, + {0x0444, "efcyrillic"}, + {0x0A8F, "egujarati"}, + {0x0567, "eharmenian"}, + {0x311D, "ehbopomofo"}, + {0x3048, "ehiragana"}, + {0x1EBB, "ehookabove"}, + {0x311F, "eibopomofo"}, + {0x0668, "eightarabic"}, + {0x09EE, "eightbengali"}, + {0x2467, "eightcircle"}, + {0x2791, "eightcircleinversesansserif"}, + {0x096E, "eightdeva"}, + {0x2471, "eighteencircle"}, + {0x2485, "eighteenparen"}, + {0x2499, "eighteenperiod"}, + {0x0AEE, "eightgujarati"}, + {0x0A6E, "eightgurmukhi"}, + {0x0668, "eighthackarabic"}, + {0x3028, "eighthangzhou"}, + {0x266B, "eighthnotebeamed"}, + {0x3227, "eightideographicparen"}, + {0xFF18, "eightmonospace"}, + {0x247B, "eightparen"}, + {0x248F, "eightperiod"}, + {0x06F8, "eightpersian"}, + {0x2177, "eightroman"}, + {0x0E58, "eightthai"}, + {0x0207, "einvertedbreve"}, + {0x0465, "eiotifiedcyrillic"}, + {0x30A8, "ekatakana"}, + {0xFF74, "ekatakanahalfwidth"}, + {0x0A74, "ekonkargurmukhi"}, + {0x3154, "ekorean"}, + {0x043B, "elcyrillic"}, + {0x246A, "elevencircle"}, + {0x247E, "elevenparen"}, + {0x2492, "elevenperiod"}, + {0x217A, "elevenroman"}, + {0x22EE, "ellipsisvertical"}, + {0x1E17, "emacronacute"}, + {0x1E15, "emacrongrave"}, + {0x043C, "emcyrillic"}, + {0xFE31, "emdashvertical"}, + {0xFF45, "emonospace"}, + {0x055B, "emphasismarkarmenian"}, + {0x3123, "enbopomofo"}, + {0x043D, "encyrillic"}, + {0xFE32, "endashvertical"}, + {0x04A3, "endescendercyrillic"}, + {0x3125, "engbopomofo"}, + {0x04A5, "enghecyrillic"}, + {0x04C8, "enhookcyrillic"}, + {0x2002, "enspace"}, + {0x3153, "eokorean"}, + {0x025B, "eopen"}, + {0x029A, "eopenclosed"}, + {0x025C, "eopenreversed"}, + {0x025E, "eopenreversedclosed"}, + {0x025D, "eopenreversedhook"}, + {0x24A0, "eparen"}, + {0xFF1D, "equalmonospace"}, + {0xFE66, "equalsmall"}, + {0x207C, "equalsuperior"}, + {0x3126, "erbopomofo"}, + {0x0440, "ercyrillic"}, + {0x0258, "ereversed"}, + {0x044D, "ereversedcyrillic"}, + {0x0441, "escyrillic"}, + {0x04AB, "esdescendercyrillic"}, + {0x0283, "esh"}, + {0x0286, "eshcurl"}, + {0x090E, "eshortdeva"}, + {0x0946, "eshortvowelsigndeva"}, + {0x01AA, "eshreversedloop"}, + {0x0285, "eshsquatreversed"}, + {0x3047, "esmallhiragana"}, + {0x30A7, "esmallkatakana"}, + {0xFF6A, "esmallkatakanahalfwidth"}, + {0x0568, "etarmenian"}, + {0x1EBD, "etilde"}, + {0x1E1B, "etildebelow"}, + {0x0591, "etnahtafoukhhebrew"}, + {0x0591, "etnahtafoukhlefthebrew"}, + {0x0591, "etnahtahebrew"}, + {0x0591, "etnahtalefthebrew"}, + {0x01DD, "eturned"}, + {0x3161, "eukorean"}, + {0x20AC, "euro"}, + {0x09C7, "evowelsignbengali"}, + {0x0947, "evowelsigndeva"}, + {0x0AC7, "evowelsigngujarati"}, + {0x055C, "exclamarmenian"}, + {0xFF01, "exclammonospace"}, + {0x0292, "ezh"}, + {0x01EF, "ezhcaron"}, + {0x0293, "ezhcurl"}, + {0x01B9, "ezhreversed"}, + {0x01BA, "ezhtail"}, + {0x095E, "fadeva"}, + {0x0A5E, "fagurmukhi"}, + {0x2109, "fahrenheit"}, + {0x064E, "fathaarabic"}, + {0x064E, "fathalowarabic"}, + {0x064B, "fathatanarabic"}, + {0x3108, "fbopomofo"}, + {0x24D5, "fcircle"}, + {0x1E1F, "fdotaccent"}, + {0x0641, "feharabic"}, + {0x0586, "feharmenian"}, + {0xFED2, "fehfinalarabic"}, + {0xFED3, "fehinitialarabic"}, + {0xFED4, "fehmedialarabic"}, + {0x03E5, "feicoptic"}, + {0x246E, "fifteencircle"}, + {0x2482, "fifteenparen"}, + {0x2496, "fifteenperiod"}, + {0x05DA, "finalkaf"}, + {0xFB3A, "finalkafdagesh"}, + {0xFB3A, "finalkafdageshhebrew"}, + {0x05DA, "finalkafhebrew"}, + {0x05DD, "finalmem"}, + {0x05DD, "finalmemhebrew"}, + {0x05DF, "finalnun"}, + {0x05DF, "finalnunhebrew"}, + {0x05E3, "finalpe"}, + {0x05E3, "finalpehebrew"}, + {0x05E5, "finaltsadi"}, + {0x05E5, "finaltsadihebrew"}, + {0x02C9, "firsttonechinese"}, + {0x25C9, "fisheye"}, + {0x0473, "fitacyrillic"}, + {0x0665, "fivearabic"}, + {0x09EB, "fivebengali"}, + {0x2464, "fivecircle"}, + {0x278E, "fivecircleinversesansserif"}, + {0x096B, "fivedeva"}, + {0x0AEB, "fivegujarati"}, + {0x0A6B, "fivegurmukhi"}, + {0x0665, "fivehackarabic"}, + {0x3025, "fivehangzhou"}, + {0x3224, "fiveideographicparen"}, + {0xFF15, "fivemonospace"}, + {0x2478, "fiveparen"}, + {0x248C, "fiveperiod"}, + {0x06F5, "fivepersian"}, + {0x2174, "fiveroman"}, + {0x0E55, "fivethai"}, + {0xFF46, "fmonospace"}, + {0x3399, "fmsquare"}, + {0x0E1F, "fofanthai"}, + {0x0E1D, "fofathai"}, + {0x0E4F, "fongmanthai"}, + {0x2200, "forall"}, + {0x0664, "fourarabic"}, + {0x09EA, "fourbengali"}, + {0x2463, "fourcircle"}, + {0x278D, "fourcircleinversesansserif"}, + {0x096A, "fourdeva"}, + {0x0AEA, "fourgujarati"}, + {0x0A6A, "fourgurmukhi"}, + {0x0664, "fourhackarabic"}, + {0x3024, "fourhangzhou"}, + {0x3223, "fourideographicparen"}, + {0xFF14, "fourmonospace"}, + {0x09F7, "fournumeratorbengali"}, + {0x2477, "fourparen"}, + {0x248B, "fourperiod"}, + {0x06F4, "fourpersian"}, + {0x2173, "fourroman"}, + {0x246D, "fourteencircle"}, + {0x2481, "fourteenparen"}, + {0x2495, "fourteenperiod"}, + {0x0E54, "fourthai"}, + {0x02CB, "fourthtonechinese"}, + {0x24A1, "fparen"}, + {0x2044, "fraction"}, + {0x0997, "gabengali"}, + {0x01F5, "gacute"}, + {0x0917, "gadeva"}, + {0x06AF, "gafarabic"}, + {0xFB93, "gaffinalarabic"}, + {0xFB94, "gafinitialarabic"}, + {0xFB95, "gafmedialarabic"}, + {0x0A97, "gagujarati"}, + {0x0A17, "gagurmukhi"}, + {0x304C, "gahiragana"}, + {0x30AC, "gakatakana"}, + {0x0263, "gammalatinsmall"}, + {0x02E0, "gammasuperior"}, + {0x03EB, "gangiacoptic"}, + {0x310D, "gbopomofo"}, + {0x0123, "gcedilla"}, + {0x24D6, "gcircle"}, + {0x0121, "gdot"}, + {0x0433, "gecyrillic"}, + {0x3052, "gehiragana"}, + {0x30B2, "gekatakana"}, + {0x2251, "geometricallyequal"}, + {0x059C, "gereshaccenthebrew"}, + {0x05F3, "gereshhebrew"}, + {0x059D, "gereshmuqdamhebrew"}, + {0x059E, "gershayimaccenthebrew"}, + {0x05F4, "gershayimhebrew"}, + {0x3013, "getamark"}, + {0x0998, "ghabengali"}, + {0x0572, "ghadarmenian"}, + {0x0918, "ghadeva"}, + {0x0A98, "ghagujarati"}, + {0x0A18, "ghagurmukhi"}, + {0x063A, "ghainarabic"}, + {0xFECE, "ghainfinalarabic"}, + {0xFECF, "ghaininitialarabic"}, + {0xFED0, "ghainmedialarabic"}, + {0x0495, "ghemiddlehookcyrillic"}, + {0x0493, "ghestrokecyrillic"}, + {0x0491, "gheupturncyrillic"}, + {0x095A, "ghhadeva"}, + {0x0A5A, "ghhagurmukhi"}, + {0x0260, "ghook"}, + {0x3393, "ghzsquare"}, + {0x304E, "gihiragana"}, + {0x30AE, "gikatakana"}, + {0x0563, "gimarmenian"}, + {0x05D2, "gimel"}, + {0xFB32, "gimeldagesh"}, + {0xFB32, "gimeldageshhebrew"}, + {0x05D2, "gimelhebrew"}, + {0x0453, "gjecyrillic"}, + {0x01BE, "glottalinvertedstroke"}, + {0x0294, "glottalstop"}, + {0x0296, "glottalstopinverted"}, + {0x02C0, "glottalstopmod"}, + {0x0295, "glottalstopreversed"}, + {0x02C1, "glottalstopreversedmod"}, + {0x02E4, "glottalstopreversedsuperior"}, + {0x02A1, "glottalstopstroke"}, + {0x02A2, "glottalstopstrokereversed"}, + {0x1E21, "gmacron"}, + {0xFF47, "gmonospace"}, + {0x3054, "gohiragana"}, + {0x30B4, "gokatakana"}, + {0x24A2, "gparen"}, + {0x33AC, "gpasquare"}, + {0x0316, "gravebelowcmb"}, + {0x0300, "gravecmb"}, + {0x0953, "gravedeva"}, + {0x02CE, "gravelowmod"}, + {0xFF40, "gravemonospace"}, + {0x0340, "gravetonecmb"}, + {0x22DB, "greaterequalorless"}, + {0xFF1E, "greatermonospace"}, + {0x2273, "greaterorequivalent"}, + {0x2277, "greaterorless"}, + {0x2267, "greateroverequal"}, + {0xFE65, "greatersmall"}, + {0x0261, "gscript"}, + {0x01E5, "gstroke"}, + {0x3050, "guhiragana"}, + {0x30B0, "gukatakana"}, + {0x3318, "guramusquare"}, + {0x33C9, "gysquare"}, + {0x04A9, "haabkhasiancyrillic"}, + {0x06C1, "haaltonearabic"}, + {0x09B9, "habengali"}, + {0x04B3, "hadescendercyrillic"}, + {0x0939, "hadeva"}, + {0x0AB9, "hagujarati"}, + {0x0A39, "hagurmukhi"}, + {0x062D, "haharabic"}, + {0xFEA2, "hahfinalarabic"}, + {0xFEA3, "hahinitialarabic"}, + {0x306F, "hahiragana"}, + {0xFEA4, "hahmedialarabic"}, + {0x332A, "haitusquare"}, + {0x30CF, "hakatakana"}, + {0xFF8A, "hakatakanahalfwidth"}, + {0x0A4D, "halantgurmukhi"}, + {0x0621, "hamzaarabic"}, + {0x0621, "hamzalowarabic"}, + {0x3164, "hangulfiller"}, + {0x044A, "hardsigncyrillic"}, + {0x21BC, "harpoonleftbarbup"}, + {0x21C0, "harpoonrightbarbup"}, + {0x33CA, "hasquare"}, + {0x05B2, "hatafpatah"}, + {0x05B2, "hatafpatah16"}, + {0x05B2, "hatafpatah23"}, + {0x05B2, "hatafpatah2f"}, + {0x05B2, "hatafpatahhebrew"}, + {0x05B2, "hatafpatahnarrowhebrew"}, + {0x05B2, "hatafpatahquarterhebrew"}, + {0x05B2, "hatafpatahwidehebrew"}, + {0x05B3, "hatafqamats"}, + {0x05B3, "hatafqamats1b"}, + {0x05B3, "hatafqamats28"}, + {0x05B3, "hatafqamats34"}, + {0x05B3, "hatafqamatshebrew"}, + {0x05B3, "hatafqamatsnarrowhebrew"}, + {0x05B3, "hatafqamatsquarterhebrew"}, + {0x05B3, "hatafqamatswidehebrew"}, + {0x05B1, "hatafsegol"}, + {0x05B1, "hatafsegol17"}, + {0x05B1, "hatafsegol24"}, + {0x05B1, "hatafsegol30"}, + {0x05B1, "hatafsegolhebrew"}, + {0x05B1, "hatafsegolnarrowhebrew"}, + {0x05B1, "hatafsegolquarterhebrew"}, + {0x05B1, "hatafsegolwidehebrew"}, + {0x310F, "hbopomofo"}, + {0x1E2B, "hbrevebelow"}, + {0x1E29, "hcedilla"}, + {0x24D7, "hcircle"}, + {0x1E27, "hdieresis"}, + {0x1E23, "hdotaccent"}, + {0x1E25, "hdotbelow"}, + {0x05D4, "he"}, + {0x2665, "heartsuitblack"}, + {0x2661, "heartsuitwhite"}, + {0xFB34, "hedagesh"}, + {0xFB34, "hedageshhebrew"}, + {0x06C1, "hehaltonearabic"}, + {0x0647, "heharabic"}, + {0x05D4, "hehebrew"}, + {0xFBA7, "hehfinalaltonearabic"}, + {0xFEEA, "hehfinalalttwoarabic"}, + {0xFEEA, "hehfinalarabic"}, + {0xFBA5, "hehhamzaabovefinalarabic"}, + {0xFBA4, "hehhamzaaboveisolatedarabic"}, + {0xFBA8, "hehinitialaltonearabic"}, + {0xFEEB, "hehinitialarabic"}, + {0x3078, "hehiragana"}, + {0xFBA9, "hehmedialaltonearabic"}, + {0xFEEC, "hehmedialarabic"}, + {0x337B, "heiseierasquare"}, + {0x30D8, "hekatakana"}, + {0xFF8D, "hekatakanahalfwidth"}, + {0x3336, "hekutaarusquare"}, + {0x0267, "henghook"}, + {0x3339, "herutusquare"}, + {0x05D7, "het"}, + {0x05D7, "hethebrew"}, + {0x0266, "hhook"}, + {0x02B1, "hhooksuperior"}, + {0x327B, "hieuhacirclekorean"}, + {0x321B, "hieuhaparenkorean"}, + {0x326D, "hieuhcirclekorean"}, + {0x314E, "hieuhkorean"}, + {0x320D, "hieuhparenkorean"}, + {0x3072, "hihiragana"}, + {0x30D2, "hikatakana"}, + {0xFF8B, "hikatakanahalfwidth"}, + {0x05B4, "hiriq"}, + {0x05B4, "hiriq14"}, + {0x05B4, "hiriq21"}, + {0x05B4, "hiriq2d"}, + {0x05B4, "hiriqhebrew"}, + {0x05B4, "hiriqnarrowhebrew"}, + {0x05B4, "hiriqquarterhebrew"}, + {0x05B4, "hiriqwidehebrew"}, + {0x1E96, "hlinebelow"}, + {0xFF48, "hmonospace"}, + {0x0570, "hoarmenian"}, + {0x0E2B, "hohipthai"}, + {0x307B, "hohiragana"}, + {0x30DB, "hokatakana"}, + {0xFF8E, "hokatakanahalfwidth"}, + {0x05B9, "holam"}, + {0x05B9, "holam19"}, + {0x05B9, "holam26"}, + {0x05B9, "holam32"}, + {0x05B9, "holamhebrew"}, + {0x05B9, "holamnarrowhebrew"}, + {0x05B9, "holamquarterhebrew"}, + {0x05B9, "holamwidehebrew"}, + {0x0E2E, "honokhukthai"}, + {0x0309, "hookcmb"}, + {0x0321, "hookpalatalizedbelowcmb"}, + {0x0322, "hookretroflexbelowcmb"}, + {0x3342, "hoonsquare"}, + {0x03E9, "horicoptic"}, + {0x2015, "horizontalbar"}, + {0x031B, "horncmb"}, + {0x2668, "hotsprings"}, + {0x24A3, "hparen"}, + {0x02B0, "hsuperior"}, + {0x0265, "hturned"}, + {0x3075, "huhiragana"}, + {0x3333, "huiitosquare"}, + {0x30D5, "hukatakana"}, + {0xFF8C, "hukatakanahalfwidth"}, + {0x030B, "hungarumlautcmb"}, + {0x0195, "hv"}, + {0x002D, "hyphen"}, + {0xFF0D, "hyphenmonospace"}, + {0xFE63, "hyphensmall"}, + {0x2010, "hyphentwo"}, + {0x044F, "iacyrillic"}, + {0x0987, "ibengali"}, + {0x3127, "ibopomofo"}, + {0x01D0, "icaron"}, + {0x24D8, "icircle"}, + {0x0456, "icyrillic"}, + {0x0209, "idblgrave"}, + {0x328F, "ideographearthcircle"}, + {0x328B, "ideographfirecircle"}, + {0x323F, "ideographicallianceparen"}, + {0x323A, "ideographiccallparen"}, + {0x32A5, "ideographiccentrecircle"}, + {0x3006, "ideographicclose"}, + {0x3001, "ideographiccomma"}, + {0xFF64, "ideographiccommaleft"}, + {0x3237, "ideographiccongratulationparen"}, + {0x32A3, "ideographiccorrectcircle"}, + {0x322F, "ideographicearthparen"}, + {0x323D, "ideographicenterpriseparen"}, + {0x329D, "ideographicexcellentcircle"}, + {0x3240, "ideographicfestivalparen"}, + {0x3296, "ideographicfinancialcircle"}, + {0x3236, "ideographicfinancialparen"}, + {0x322B, "ideographicfireparen"}, + {0x3232, "ideographichaveparen"}, + {0x32A4, "ideographichighcircle"}, + {0x3005, "ideographiciterationmark"}, + {0x3298, "ideographiclaborcircle"}, + {0x3238, "ideographiclaborparen"}, + {0x32A7, "ideographicleftcircle"}, + {0x32A6, "ideographiclowcircle"}, + {0x32A9, "ideographicmedicinecircle"}, + {0x322E, "ideographicmetalparen"}, + {0x322A, "ideographicmoonparen"}, + {0x3234, "ideographicnameparen"}, + {0x3002, "ideographicperiod"}, + {0x329E, "ideographicprintcircle"}, + {0x3243, "ideographicreachparen"}, + {0x3239, "ideographicrepresentparen"}, + {0x323E, "ideographicresourceparen"}, + {0x32A8, "ideographicrightcircle"}, + {0x3299, "ideographicsecretcircle"}, + {0x3242, "ideographicselfparen"}, + {0x3233, "ideographicsocietyparen"}, + {0x3000, "ideographicspace"}, + {0x3235, "ideographicspecialparen"}, + {0x3231, "ideographicstockparen"}, + {0x323B, "ideographicstudyparen"}, + {0x3230, "ideographicsunparen"}, + {0x323C, "ideographicsuperviseparen"}, + {0x322C, "ideographicwaterparen"}, + {0x322D, "ideographicwoodparen"}, + {0x3007, "ideographiczero"}, + {0x328E, "ideographmetalcircle"}, + {0x328A, "ideographmooncircle"}, + {0x3294, "ideographnamecircle"}, + {0x3290, "ideographsuncircle"}, + {0x328C, "ideographwatercircle"}, + {0x328D, "ideographwoodcircle"}, + {0x0907, "ideva"}, + {0x1E2F, "idieresisacute"}, + {0x04E5, "idieresiscyrillic"}, + {0x1ECB, "idotbelow"}, + {0x04D7, "iebrevecyrillic"}, + {0x0435, "iecyrillic"}, + {0x3275, "ieungacirclekorean"}, + {0x3215, "ieungaparenkorean"}, + {0x3267, "ieungcirclekorean"}, + {0x3147, "ieungkorean"}, + {0x3207, "ieungparenkorean"}, + {0x0A87, "igujarati"}, + {0x0A07, "igurmukhi"}, + {0x3044, "ihiragana"}, + {0x1EC9, "ihookabove"}, + {0x0988, "iibengali"}, + {0x0438, "iicyrillic"}, + {0x0908, "iideva"}, + {0x0A88, "iigujarati"}, + {0x0A08, "iigurmukhi"}, + {0x0A40, "iimatragurmukhi"}, + {0x020B, "iinvertedbreve"}, + {0x0439, "iishortcyrillic"}, + {0x09C0, "iivowelsignbengali"}, + {0x0940, "iivowelsigndeva"}, + {0x0AC0, "iivowelsigngujarati"}, + {0x30A4, "ikatakana"}, + {0xFF72, "ikatakanahalfwidth"}, + {0x3163, "ikorean"}, + {0x02DC, "ilde"}, + {0x05AC, "iluyhebrew"}, + {0x04E3, "imacroncyrillic"}, + {0x2253, "imageorapproximatelyequal"}, + {0x0A3F, "imatragurmukhi"}, + {0xFF49, "imonospace"}, + {0x2206, "increment"}, + {0x056B, "iniarmenian"}, + {0x2321, "integralbottom"}, + {0x2320, "integraltop"}, + {0x3305, "intisquare"}, + {0x0451, "iocyrillic"}, + {0x0269, "iotalatin"}, + {0x24A4, "iparen"}, + {0x0A72, "irigurmukhi"}, + {0x3043, "ismallhiragana"}, + {0x30A3, "ismallkatakana"}, + {0xFF68, "ismallkatakanahalfwidth"}, + {0x09FA, "issharbengali"}, + {0x0268, "istroke"}, + {0x309D, "iterationhiragana"}, + {0x30FD, "iterationkatakana"}, + {0x1E2D, "itildebelow"}, + {0x3129, "iubopomofo"}, + {0x044E, "iucyrillic"}, + {0x09BF, "ivowelsignbengali"}, + {0x093F, "ivowelsigndeva"}, + {0x0ABF, "ivowelsigngujarati"}, + {0x0475, "izhitsacyrillic"}, + {0x0477, "izhitsadblgravecyrillic"}, + {0x0571, "jaarmenian"}, + {0x099C, "jabengali"}, + {0x091C, "jadeva"}, + {0x0A9C, "jagujarati"}, + {0x0A1C, "jagurmukhi"}, + {0x3110, "jbopomofo"}, + {0x01F0, "jcaron"}, + {0x24D9, "jcircle"}, + {0x029D, "jcrossedtail"}, + {0x025F, "jdotlessstroke"}, + {0x0458, "jecyrillic"}, + {0x062C, "jeemarabic"}, + {0xFE9E, "jeemfinalarabic"}, + {0xFE9F, "jeeminitialarabic"}, + {0xFEA0, "jeemmedialarabic"}, + {0x0698, "jeharabic"}, + {0xFB8B, "jehfinalarabic"}, + {0x099D, "jhabengali"}, + {0x091D, "jhadeva"}, + {0x0A9D, "jhagujarati"}, + {0x0A1D, "jhagurmukhi"}, + {0x057B, "jheharmenian"}, + {0x3004, "jis"}, + {0xFF4A, "jmonospace"}, + {0x24A5, "jparen"}, + {0x02B2, "jsuperior"}, + {0x04A1, "kabashkircyrillic"}, + {0x0995, "kabengali"}, + {0x1E31, "kacute"}, + {0x043A, "kacyrillic"}, + {0x049B, "kadescendercyrillic"}, + {0x0915, "kadeva"}, + {0x05DB, "kaf"}, + {0x0643, "kafarabic"}, + {0xFB3B, "kafdagesh"}, + {0xFB3B, "kafdageshhebrew"}, + {0xFEDA, "kaffinalarabic"}, + {0x05DB, "kafhebrew"}, + {0xFEDB, "kafinitialarabic"}, + {0xFEDC, "kafmedialarabic"}, + {0xFB4D, "kafrafehebrew"}, + {0x0A95, "kagujarati"}, + {0x0A15, "kagurmukhi"}, + {0x304B, "kahiragana"}, + {0x04C4, "kahookcyrillic"}, + {0x30AB, "kakatakana"}, + {0xFF76, "kakatakanahalfwidth"}, + {0x03F0, "kappasymbolgreek"}, + {0x3171, "kapyeounmieumkorean"}, + {0x3184, "kapyeounphieuphkorean"}, + {0x3178, "kapyeounpieupkorean"}, + {0x3179, "kapyeounssangpieupkorean"}, + {0x330D, "karoriisquare"}, + {0x0640, "kashidaautoarabic"}, + {0x0640, "kashidaautonosidebearingarabic"}, + {0x30F5, "kasmallkatakana"}, + {0x3384, "kasquare"}, + {0x0650, "kasraarabic"}, + {0x064D, "kasratanarabic"}, + {0x049F, "kastrokecyrillic"}, + {0xFF70, "katahiraprolongmarkhalfwidth"}, + {0x049D, "kaverticalstrokecyrillic"}, + {0x310E, "kbopomofo"}, + {0x3389, "kcalsquare"}, + {0x01E9, "kcaron"}, + {0x0137, "kcedilla"}, + {0x24DA, "kcircle"}, + {0x1E33, "kdotbelow"}, + {0x0584, "keharmenian"}, + {0x3051, "kehiragana"}, + {0x30B1, "kekatakana"}, + {0xFF79, "kekatakanahalfwidth"}, + {0x056F, "kenarmenian"}, + {0x30F6, "kesmallkatakana"}, + {0x0996, "khabengali"}, + {0x0445, "khacyrillic"}, + {0x0916, "khadeva"}, + {0x0A96, "khagujarati"}, + {0x0A16, "khagurmukhi"}, + {0x062E, "khaharabic"}, + {0xFEA6, "khahfinalarabic"}, + {0xFEA7, "khahinitialarabic"}, + {0xFEA8, "khahmedialarabic"}, + {0x03E7, "kheicoptic"}, + {0x0959, "khhadeva"}, + {0x0A59, "khhagurmukhi"}, + {0x3278, "khieukhacirclekorean"}, + {0x3218, "khieukhaparenkorean"}, + {0x326A, "khieukhcirclekorean"}, + {0x314B, "khieukhkorean"}, + {0x320A, "khieukhparenkorean"}, + {0x0E02, "khokhaithai"}, + {0x0E05, "khokhonthai"}, + {0x0E03, "khokhuatthai"}, + {0x0E04, "khokhwaithai"}, + {0x0E5B, "khomutthai"}, + {0x0199, "khook"}, + {0x0E06, "khorakhangthai"}, + {0x3391, "khzsquare"}, + {0x304D, "kihiragana"}, + {0x30AD, "kikatakana"}, + {0xFF77, "kikatakanahalfwidth"}, + {0x3315, "kiroguramusquare"}, + {0x3316, "kiromeetorusquare"}, + {0x3314, "kirosquare"}, + {0x326E, "kiyeokacirclekorean"}, + {0x320E, "kiyeokaparenkorean"}, + {0x3260, "kiyeokcirclekorean"}, + {0x3131, "kiyeokkorean"}, + {0x3200, "kiyeokparenkorean"}, + {0x3133, "kiyeoksioskorean"}, + {0x045C, "kjecyrillic"}, + {0x1E35, "klinebelow"}, + {0x3398, "klsquare"}, + {0x33A6, "kmcubedsquare"}, + {0xFF4B, "kmonospace"}, + {0x33A2, "kmsquaredsquare"}, + {0x3053, "kohiragana"}, + {0x33C0, "kohmsquare"}, + {0x0E01, "kokaithai"}, + {0x30B3, "kokatakana"}, + {0xFF7A, "kokatakanahalfwidth"}, + {0x331E, "kooposquare"}, + {0x0481, "koppacyrillic"}, + {0x327F, "koreanstandardsymbol"}, + {0x0343, "koroniscmb"}, + {0x24A6, "kparen"}, + {0x33AA, "kpasquare"}, + {0x046F, "ksicyrillic"}, + {0x33CF, "ktsquare"}, + {0x029E, "kturned"}, + {0x304F, "kuhiragana"}, + {0x30AF, "kukatakana"}, + {0xFF78, "kukatakanahalfwidth"}, + {0x33B8, "kvsquare"}, + {0x33BE, "kwsquare"}, + {0x09B2, "labengali"}, + {0x0932, "ladeva"}, + {0x0AB2, "lagujarati"}, + {0x0A32, "lagurmukhi"}, + {0x0E45, "lakkhangyaothai"}, + {0xFEFC, "lamaleffinalarabic"}, + {0xFEF8, "lamalefhamzaabovefinalarabic"}, + {0xFEF7, "lamalefhamzaaboveisolatedarabic"}, + {0xFEFA, "lamalefhamzabelowfinalarabic"}, + {0xFEF9, "lamalefhamzabelowisolatedarabic"}, + {0xFEFB, "lamalefisolatedarabic"}, + {0xFEF6, "lamalefmaddaabovefinalarabic"}, + {0xFEF5, "lamalefmaddaaboveisolatedarabic"}, + {0x0644, "lamarabic"}, + {0x019B, "lambdastroke"}, + {0x05DC, "lamed"}, + {0xFB3C, "lameddagesh"}, + {0xFB3C, "lameddageshhebrew"}, + {0x05DC, "lamedhebrew"}, + {0xFEDE, "lamfinalarabic"}, + {0xFCCA, "lamhahinitialarabic"}, + {0xFEDF, "laminitialarabic"}, + {0xFCC9, "lamjeeminitialarabic"}, + {0xFCCB, "lamkhahinitialarabic"}, + {0xFDF2, "lamlamhehisolatedarabic"}, + {0xFEE0, "lammedialarabic"}, + {0xFD88, "lammeemhahinitialarabic"}, + {0xFCCC, "lammeeminitialarabic"}, + {0x25EF, "largecircle"}, + {0x019A, "lbar"}, + {0x026C, "lbelt"}, + {0x310C, "lbopomofo"}, + {0x013C, "lcedilla"}, + {0x24DB, "lcircle"}, + {0x1E3D, "lcircumflexbelow"}, + {0x0140, "ldotaccent"}, + {0x1E37, "ldotbelow"}, + {0x1E39, "ldotbelowmacron"}, + {0x031A, "leftangleabovecmb"}, + {0x0318, "lefttackbelowcmb"}, + {0x22DA, "lessequalorgreater"}, + {0xFF1C, "lessmonospace"}, + {0x2272, "lessorequivalent"}, + {0x2276, "lessorgreater"}, + {0x2266, "lessoverequal"}, + {0xFE64, "lesssmall"}, + {0x026E, "lezh"}, + {0x026D, "lhookretroflex"}, + {0x056C, "liwnarmenian"}, + {0x01C9, "lj"}, + {0x0459, "ljecyrillic"}, + {0x0933, "lladeva"}, + {0x0AB3, "llagujarati"}, + {0x1E3B, "llinebelow"}, + {0x0934, "llladeva"}, + {0x09E1, "llvocalicbengali"}, + {0x0961, "llvocalicdeva"}, + {0x09E3, "llvocalicvowelsignbengali"}, + {0x0963, "llvocalicvowelsigndeva"}, + {0x026B, "lmiddletilde"}, + {0xFF4C, "lmonospace"}, + {0x33D0, "lmsquare"}, + {0x0E2C, "lochulathai"}, + {0x2310, "logicalnotreversed"}, + {0x0E25, "lolingthai"}, + {0xFE4E, "lowlinecenterline"}, + {0x0332, "lowlinecmb"}, + {0xFE4D, "lowlinedashed"}, + {0x24A7, "lparen"}, + {0x2113, "lsquare"}, + {0x0E26, "luthai"}, + {0x098C, "lvocalicbengali"}, + {0x090C, "lvocalicdeva"}, + {0x09E2, "lvocalicvowelsignbengali"}, + {0x0962, "lvocalicvowelsigndeva"}, + {0x33D3, "lxsquare"}, + {0x09AE, "mabengali"}, + {0x00AF, "macron"}, + {0x0331, "macronbelowcmb"}, + {0x0304, "macroncmb"}, + {0x02CD, "macronlowmod"}, + {0xFFE3, "macronmonospace"}, + {0x1E3F, "macute"}, + {0x092E, "madeva"}, + {0x0AAE, "magujarati"}, + {0x0A2E, "magurmukhi"}, + {0x05A4, "mahapakhhebrew"}, + {0x05A4, "mahapakhlefthebrew"}, + {0x307E, "mahiragana"}, + {0xF895, "maichattawalowleftthai"}, + {0xF894, "maichattawalowrightthai"}, + {0x0E4B, "maichattawathai"}, + {0xF893, "maichattawaupperleftthai"}, + {0xF88C, "maieklowleftthai"}, + {0xF88B, "maieklowrightthai"}, + {0x0E48, "maiekthai"}, + {0xF88A, "maiekupperleftthai"}, + {0xF884, "maihanakatleftthai"}, + {0x0E31, "maihanakatthai"}, + {0xF889, "maitaikhuleftthai"}, + {0x0E47, "maitaikhuthai"}, + {0xF88F, "maitholowleftthai"}, + {0xF88E, "maitholowrightthai"}, + {0x0E49, "maithothai"}, + {0xF88D, "maithoupperleftthai"}, + {0xF892, "maitrilowleftthai"}, + {0xF891, "maitrilowrightthai"}, + {0x0E4A, "maitrithai"}, + {0xF890, "maitriupperleftthai"}, + {0x0E46, "maiyamokthai"}, + {0x30DE, "makatakana"}, + {0xFF8F, "makatakanahalfwidth"}, + {0x3347, "mansyonsquare"}, + {0x05BE, "maqafhebrew"}, + {0x2642, "mars"}, + {0x05AF, "masoracirclehebrew"}, + {0x3383, "masquare"}, + {0x3107, "mbopomofo"}, + {0x33D4, "mbsquare"}, + {0x24DC, "mcircle"}, + {0x33A5, "mcubedsquare"}, + {0x1E41, "mdotaccent"}, + {0x1E43, "mdotbelow"}, + {0x0645, "meemarabic"}, + {0xFEE2, "meemfinalarabic"}, + {0xFEE3, "meeminitialarabic"}, + {0xFEE4, "meemmedialarabic"}, + {0xFCD1, "meemmeeminitialarabic"}, + {0xFC48, "meemmeemisolatedarabic"}, + {0x334D, "meetorusquare"}, + {0x3081, "mehiragana"}, + {0x337E, "meizierasquare"}, + {0x30E1, "mekatakana"}, + {0xFF92, "mekatakanahalfwidth"}, + {0x05DE, "mem"}, + {0xFB3E, "memdagesh"}, + {0xFB3E, "memdageshhebrew"}, + {0x05DE, "memhebrew"}, + {0x0574, "menarmenian"}, + {0x05A5, "merkhahebrew"}, + {0x05A6, "merkhakefulahebrew"}, + {0x05A6, "merkhakefulalefthebrew"}, + {0x05A5, "merkhalefthebrew"}, + {0x0271, "mhook"}, + {0x3392, "mhzsquare"}, + {0xFF65, "middledotkatakanahalfwidth"}, + {0x00B7, "middot"}, + {0x3272, "mieumacirclekorean"}, + {0x3212, "mieumaparenkorean"}, + {0x3264, "mieumcirclekorean"}, + {0x3141, "mieumkorean"}, + {0x3170, "mieumpansioskorean"}, + {0x3204, "mieumparenkorean"}, + {0x316E, "mieumpieupkorean"}, + {0x316F, "mieumsioskorean"}, + {0x307F, "mihiragana"}, + {0x30DF, "mikatakana"}, + {0xFF90, "mikatakanahalfwidth"}, + {0x0320, "minusbelowcmb"}, + {0x2296, "minuscircle"}, + {0x02D7, "minusmod"}, + {0x2213, "minusplus"}, + {0x334A, "miribaarusquare"}, + {0x3349, "mirisquare"}, + {0x0270, "mlonglegturned"}, + {0x3396, "mlsquare"}, + {0x33A3, "mmcubedsquare"}, + {0xFF4D, "mmonospace"}, + {0x339F, "mmsquaredsquare"}, + {0x3082, "mohiragana"}, + {0x33C1, "mohmsquare"}, + {0x30E2, "mokatakana"}, + {0xFF93, "mokatakanahalfwidth"}, + {0x33D6, "molsquare"}, + {0x0E21, "momathai"}, + {0x33A7, "moverssquare"}, + {0x33A8, "moverssquaredsquare"}, + {0x24A8, "mparen"}, + {0x33AB, "mpasquare"}, + {0x33B3, "mssquare"}, + {0x026F, "mturned"}, + {0x00B5, "mu"}, + {0x00B5, "mu1"}, + {0x3382, "muasquare"}, + {0x226B, "muchgreater"}, + {0x226A, "muchless"}, + {0x338C, "mufsquare"}, + {0x03BC, "mugreek"}, + {0x338D, "mugsquare"}, + {0x3080, "muhiragana"}, + {0x30E0, "mukatakana"}, + {0xFF91, "mukatakanahalfwidth"}, + {0x3395, "mulsquare"}, + {0x339B, "mumsquare"}, + {0x05A3, "munahhebrew"}, + {0x05A3, "munahlefthebrew"}, + {0x266D, "musicflatsign"}, + {0x266F, "musicsharpsign"}, + {0x33B2, "mussquare"}, + {0x33B6, "muvsquare"}, + {0x33BC, "muwsquare"}, + {0x33B9, "mvmegasquare"}, + {0x33B7, "mvsquare"}, + {0x33BF, "mwmegasquare"}, + {0x33BD, "mwsquare"}, + {0x09A8, "nabengali"}, + {0x2207, "nabla"}, + {0x0928, "nadeva"}, + {0x0AA8, "nagujarati"}, + {0x0A28, "nagurmukhi"}, + {0x306A, "nahiragana"}, + {0x30CA, "nakatakana"}, + {0xFF85, "nakatakanahalfwidth"}, + {0x3381, "nasquare"}, + {0x310B, "nbopomofo"}, + {0x00A0, "nbspace"}, + {0x0146, "ncedilla"}, + {0x24DD, "ncircle"}, + {0x1E4B, "ncircumflexbelow"}, + {0x1E45, "ndotaccent"}, + {0x1E47, "ndotbelow"}, + {0x306D, "nehiragana"}, + {0x30CD, "nekatakana"}, + {0xFF88, "nekatakanahalfwidth"}, + {0x20AA, "newsheqelsign"}, + {0x338B, "nfsquare"}, + {0x0999, "ngabengali"}, + {0x0919, "ngadeva"}, + {0x0A99, "ngagujarati"}, + {0x0A19, "ngagurmukhi"}, + {0x0E07, "ngonguthai"}, + {0x3093, "nhiragana"}, + {0x0272, "nhookleft"}, + {0x0273, "nhookretroflex"}, + {0x326F, "nieunacirclekorean"}, + {0x320F, "nieunaparenkorean"}, + {0x3135, "nieuncieuckorean"}, + {0x3261, "nieuncirclekorean"}, + {0x3136, "nieunhieuhkorean"}, + {0x3134, "nieunkorean"}, + {0x3168, "nieunpansioskorean"}, + {0x3201, "nieunparenkorean"}, + {0x3167, "nieunsioskorean"}, + {0x3166, "nieuntikeutkorean"}, + {0x306B, "nihiragana"}, + {0x30CB, "nikatakana"}, + {0xFF86, "nikatakanahalfwidth"}, + {0xF899, "nikhahitleftthai"}, + {0x0E4D, "nikhahitthai"}, + {0x0669, "ninearabic"}, + {0x09EF, "ninebengali"}, + {0x2468, "ninecircle"}, + {0x2792, "ninecircleinversesansserif"}, + {0x096F, "ninedeva"}, + {0x0AEF, "ninegujarati"}, + {0x0A6F, "ninegurmukhi"}, + {0x0669, "ninehackarabic"}, + {0x3029, "ninehangzhou"}, + {0x3228, "nineideographicparen"}, + {0xFF19, "ninemonospace"}, + {0x247C, "nineparen"}, + {0x2490, "nineperiod"}, + {0x06F9, "ninepersian"}, + {0x2178, "nineroman"}, + {0x2472, "nineteencircle"}, + {0x2486, "nineteenparen"}, + {0x249A, "nineteenperiod"}, + {0x0E59, "ninethai"}, + {0x01CC, "nj"}, + {0x045A, "njecyrillic"}, + {0x30F3, "nkatakana"}, + {0xFF9D, "nkatakanahalfwidth"}, + {0x019E, "nlegrightlong"}, + {0x1E49, "nlinebelow"}, + {0xFF4E, "nmonospace"}, + {0x339A, "nmsquare"}, + {0x09A3, "nnabengali"}, + {0x0923, "nnadeva"}, + {0x0AA3, "nnagujarati"}, + {0x0A23, "nnagurmukhi"}, + {0x0929, "nnnadeva"}, + {0x306E, "nohiragana"}, + {0x30CE, "nokatakana"}, + {0xFF89, "nokatakanahalfwidth"}, + {0x00A0, "nonbreakingspace"}, + {0x0E13, "nonenthai"}, + {0x0E19, "nonuthai"}, + {0x0646, "noonarabic"}, + {0xFEE6, "noonfinalarabic"}, + {0x06BA, "noonghunnaarabic"}, + {0xFB9F, "noonghunnafinalarabic"}, + {0xFEE7, "nooninitialarabic"}, + {0xFCD2, "noonjeeminitialarabic"}, + {0xFC4B, "noonjeemisolatedarabic"}, + {0xFEE8, "noonmedialarabic"}, + {0xFCD5, "noonmeeminitialarabic"}, + {0xFC4E, "noonmeemisolatedarabic"}, + {0xFC8D, "noonnoonfinalarabic"}, + {0x220C, "notcontains"}, + {0x2209, "notelementof"}, + {0x226F, "notgreater"}, + {0x2271, "notgreaternorequal"}, + {0x2279, "notgreaternorless"}, + {0x2262, "notidentical"}, + {0x226E, "notless"}, + {0x2270, "notlessnorequal"}, + {0x2226, "notparallel"}, + {0x2280, "notprecedes"}, + {0x2281, "notsucceeds"}, + {0x2285, "notsuperset"}, + {0x0576, "nowarmenian"}, + {0x24A9, "nparen"}, + {0x33B1, "nssquare"}, + {0x306C, "nuhiragana"}, + {0x30CC, "nukatakana"}, + {0xFF87, "nukatakanahalfwidth"}, + {0x09BC, "nuktabengali"}, + {0x093C, "nuktadeva"}, + {0x0ABC, "nuktagujarati"}, + {0x0A3C, "nuktagurmukhi"}, + {0xFF03, "numbersignmonospace"}, + {0xFE5F, "numbersignsmall"}, + {0x0374, "numeralsigngreek"}, + {0x0375, "numeralsignlowergreek"}, + {0x2116, "numero"}, + {0x05E0, "nun"}, + {0xFB40, "nundagesh"}, + {0xFB40, "nundageshhebrew"}, + {0x05E0, "nunhebrew"}, + {0x33B5, "nvsquare"}, + {0x33BB, "nwsquare"}, + {0x099E, "nyabengali"}, + {0x091E, "nyadeva"}, + {0x0A9E, "nyagujarati"}, + {0x0A1E, "nyagurmukhi"}, + {0x0E2D, "oangthai"}, + {0x0275, "obarred"}, + {0x04E9, "obarredcyrillic"}, + {0x04EB, "obarreddieresiscyrillic"}, + {0x0993, "obengali"}, + {0x311B, "obopomofo"}, + {0x0911, "ocandradeva"}, + {0x0A91, "ocandragujarati"}, + {0x0949, "ocandravowelsigndeva"}, + {0x0AC9, "ocandravowelsigngujarati"}, + {0x01D2, "ocaron"}, + {0x24DE, "ocircle"}, + {0x1ED1, "ocircumflexacute"}, + {0x1ED9, "ocircumflexdotbelow"}, + {0x1ED3, "ocircumflexgrave"}, + {0x1ED5, "ocircumflexhookabove"}, + {0x1ED7, "ocircumflextilde"}, + {0x043E, "ocyrillic"}, + {0x0151, "odblacute"}, + {0x020D, "odblgrave"}, + {0x0913, "odeva"}, + {0x04E7, "odieresiscyrillic"}, + {0x1ECD, "odotbelow"}, + {0x315A, "oekorean"}, + {0x0328, "ogonekcmb"}, + {0x0A93, "ogujarati"}, + {0x0585, "oharmenian"}, + {0x304A, "ohiragana"}, + {0x1ECF, "ohookabove"}, + {0x1EDB, "ohornacute"}, + {0x1EE3, "ohorndotbelow"}, + {0x1EDD, "ohorngrave"}, + {0x1EDF, "ohornhookabove"}, + {0x1EE1, "ohorntilde"}, + {0x01A3, "oi"}, + {0x020F, "oinvertedbreve"}, + {0x30AA, "okatakana"}, + {0xFF75, "okatakanahalfwidth"}, + {0x3157, "okorean"}, + {0x05AB, "olehebrew"}, + {0x1E53, "omacronacute"}, + {0x1E51, "omacrongrave"}, + {0x0950, "omdeva"}, + {0x0461, "omegacyrillic"}, + {0x0277, "omegalatinclosed"}, + {0x047B, "omegaroundcyrillic"}, + {0x047D, "omegatitlocyrillic"}, + {0x0AD0, "omgujarati"}, + {0xFF4F, "omonospace"}, + {0x0661, "onearabic"}, + {0x09E7, "onebengali"}, + {0x2460, "onecircle"}, + {0x278A, "onecircleinversesansserif"}, + {0x0967, "onedeva"}, + {0x0AE7, "onegujarati"}, + {0x0A67, "onegurmukhi"}, + {0x0661, "onehackarabic"}, + {0x3021, "onehangzhou"}, + {0x3220, "oneideographicparen"}, + {0xFF11, "onemonospace"}, + {0x09F4, "onenumeratorbengali"}, + {0x2474, "oneparen"}, + {0x2488, "oneperiod"}, + {0x06F1, "onepersian"}, + {0x2170, "oneroman"}, + {0x0E51, "onethai"}, + {0x01EB, "oogonek"}, + {0x01ED, "oogonekmacron"}, + {0x0A13, "oogurmukhi"}, + {0x0A4B, "oomatragurmukhi"}, + {0x0254, "oopen"}, + {0x24AA, "oparen"}, + {0x2325, "option"}, + {0x0912, "oshortdeva"}, + {0x094A, "oshortvowelsigndeva"}, + {0x3049, "osmallhiragana"}, + {0x30A9, "osmallkatakana"}, + {0xFF6B, "osmallkatakanahalfwidth"}, + {0x01FF, "ostrokeacute"}, + {0x047F, "otcyrillic"}, + {0x1E4D, "otildeacute"}, + {0x1E4F, "otildedieresis"}, + {0x3121, "oubopomofo"}, + {0x203E, "overline"}, + {0xFE4A, "overlinecenterline"}, + {0x0305, "overlinecmb"}, + {0xFE49, "overlinedashed"}, + {0xFE4C, "overlinedblwavy"}, + {0xFE4B, "overlinewavy"}, + {0x00AF, "overscore"}, + {0x09CB, "ovowelsignbengali"}, + {0x094B, "ovowelsigndeva"}, + {0x0ACB, "ovowelsigngujarati"}, + {0x3380, "paampssquare"}, + {0x332B, "paasentosquare"}, + {0x09AA, "pabengali"}, + {0x1E55, "pacute"}, + {0x092A, "padeva"}, + {0x21DF, "pagedown"}, + {0x21DE, "pageup"}, + {0x0AAA, "pagujarati"}, + {0x0A2A, "pagurmukhi"}, + {0x3071, "pahiragana"}, + {0x0E2F, "paiyannoithai"}, + {0x30D1, "pakatakana"}, + {0x0484, "palatalizationcyrilliccmb"}, + {0x04C0, "palochkacyrillic"}, + {0x317F, "pansioskorean"}, + {0x2225, "parallel"}, + {0xFD3E, "parenleftaltonearabic"}, + {0xFF08, "parenleftmonospace"}, + {0xFE59, "parenleftsmall"}, + {0xFE35, "parenleftvertical"}, + {0xFD3F, "parenrightaltonearabic"}, + {0xFF09, "parenrightmonospace"}, + {0xFE5A, "parenrightsmall"}, + {0xFE36, "parenrightvertical"}, + {0x05C0, "paseqhebrew"}, + {0x0599, "pashtahebrew"}, + {0x33A9, "pasquare"}, + {0x05B7, "patah"}, + {0x05B7, "patah11"}, + {0x05B7, "patah1d"}, + {0x05B7, "patah2a"}, + {0x05B7, "patahhebrew"}, + {0x05B7, "patahnarrowhebrew"}, + {0x05B7, "patahquarterhebrew"}, + {0x05B7, "patahwidehebrew"}, + {0x05A1, "pazerhebrew"}, + {0x3106, "pbopomofo"}, + {0x24DF, "pcircle"}, + {0x1E57, "pdotaccent"}, + {0x05E4, "pe"}, + {0x043F, "pecyrillic"}, + {0xFB44, "pedagesh"}, + {0xFB44, "pedageshhebrew"}, + {0x333B, "peezisquare"}, + {0xFB43, "pefinaldageshhebrew"}, + {0x067E, "peharabic"}, + {0x057A, "peharmenian"}, + {0x05E4, "pehebrew"}, + {0xFB57, "pehfinalarabic"}, + {0xFB58, "pehinitialarabic"}, + {0x307A, "pehiragana"}, + {0xFB59, "pehmedialarabic"}, + {0x30DA, "pekatakana"}, + {0x04A7, "pemiddlehookcyrillic"}, + {0xFB4E, "perafehebrew"}, + {0x066A, "percentarabic"}, + {0xFF05, "percentmonospace"}, + {0xFE6A, "percentsmall"}, + {0x0589, "periodarmenian"}, + {0x00B7, "periodcentered"}, + {0xFF61, "periodhalfwidth"}, + {0xFF0E, "periodmonospace"}, + {0xFE52, "periodsmall"}, + {0x0342, "perispomenigreekcmb"}, + {0x338A, "pfsquare"}, + {0x09AB, "phabengali"}, + {0x092B, "phadeva"}, + {0x0AAB, "phagujarati"}, + {0x0A2B, "phagurmukhi"}, + {0x327A, "phieuphacirclekorean"}, + {0x321A, "phieuphaparenkorean"}, + {0x326C, "phieuphcirclekorean"}, + {0x314D, "phieuphkorean"}, + {0x320C, "phieuphparenkorean"}, + {0x0278, "philatin"}, + {0x0E3A, "phinthuthai"}, + {0x03D5, "phisymbolgreek"}, + {0x01A5, "phook"}, + {0x0E1E, "phophanthai"}, + {0x0E1C, "phophungthai"}, + {0x0E20, "phosamphaothai"}, + {0x3273, "pieupacirclekorean"}, + {0x3213, "pieupaparenkorean"}, + {0x3176, "pieupcieuckorean"}, + {0x3265, "pieupcirclekorean"}, + {0x3172, "pieupkiyeokkorean"}, + {0x3142, "pieupkorean"}, + {0x3205, "pieupparenkorean"}, + {0x3174, "pieupsioskiyeokkorean"}, + {0x3144, "pieupsioskorean"}, + {0x3175, "pieupsiostikeutkorean"}, + {0x3177, "pieupthieuthkorean"}, + {0x3173, "pieuptikeutkorean"}, + {0x3074, "pihiragana"}, + {0x30D4, "pikatakana"}, + {0x03D6, "pisymbolgreek"}, + {0x0583, "piwrarmenian"}, + {0x031F, "plusbelowcmb"}, + {0x2295, "pluscircle"}, + {0x02D6, "plusmod"}, + {0xFF0B, "plusmonospace"}, + {0xFE62, "plussmall"}, + {0x207A, "plussuperior"}, + {0xFF50, "pmonospace"}, + {0x33D8, "pmsquare"}, + {0x307D, "pohiragana"}, + {0x261F, "pointingindexdownwhite"}, + {0x261C, "pointingindexleftwhite"}, + {0x261E, "pointingindexrightwhite"}, + {0x261D, "pointingindexupwhite"}, + {0x30DD, "pokatakana"}, + {0x0E1B, "poplathai"}, + {0x3012, "postalmark"}, + {0x3020, "postalmarkface"}, + {0x24AB, "pparen"}, + {0x227A, "precedes"}, + {0x02B9, "primemod"}, + {0x2035, "primereversed"}, + {0x2305, "projective"}, + {0x30FC, "prolongedkana"}, + {0x2318, "propellor"}, + {0x2237, "proportion"}, + {0x0471, "psicyrillic"}, + {0x0486, "psilipneumatacyrilliccmb"}, + {0x33B0, "pssquare"}, + {0x3077, "puhiragana"}, + {0x30D7, "pukatakana"}, + {0x33B4, "pvsquare"}, + {0x33BA, "pwsquare"}, + {0x0958, "qadeva"}, + {0x05A8, "qadmahebrew"}, + {0x0642, "qafarabic"}, + {0xFED6, "qaffinalarabic"}, + {0xFED7, "qafinitialarabic"}, + {0xFED8, "qafmedialarabic"}, + {0x05B8, "qamats"}, + {0x05B8, "qamats10"}, + {0x05B8, "qamats1a"}, + {0x05B8, "qamats1c"}, + {0x05B8, "qamats27"}, + {0x05B8, "qamats29"}, + {0x05B8, "qamats33"}, + {0x05B8, "qamatsde"}, + {0x05B8, "qamatshebrew"}, + {0x05B8, "qamatsnarrowhebrew"}, + {0x05B8, "qamatsqatanhebrew"}, + {0x05B8, "qamatsqatannarrowhebrew"}, + {0x05B8, "qamatsqatanquarterhebrew"}, + {0x05B8, "qamatsqatanwidehebrew"}, + {0x05B8, "qamatsquarterhebrew"}, + {0x05B8, "qamatswidehebrew"}, + {0x059F, "qarneyparahebrew"}, + {0x3111, "qbopomofo"}, + {0x24E0, "qcircle"}, + {0x02A0, "qhook"}, + {0xFF51, "qmonospace"}, + {0x05E7, "qof"}, + {0xFB47, "qofdagesh"}, + {0xFB47, "qofdageshhebrew"}, + {0x05E7, "qofhebrew"}, + {0x24AC, "qparen"}, + {0x2669, "quarternote"}, + {0x05BB, "qubuts"}, + {0x05BB, "qubuts18"}, + {0x05BB, "qubuts25"}, + {0x05BB, "qubuts31"}, + {0x05BB, "qubutshebrew"}, + {0x05BB, "qubutsnarrowhebrew"}, + {0x05BB, "qubutsquarterhebrew"}, + {0x05BB, "qubutswidehebrew"}, + {0x061F, "questionarabic"}, + {0x055E, "questionarmenian"}, + {0x037E, "questiongreek"}, + {0xFF1F, "questionmonospace"}, + {0xFF02, "quotedblmonospace"}, + {0x301E, "quotedblprime"}, + {0x301D, "quotedblprimereversed"}, + {0x201B, "quoteleftreversed"}, + {0x0149, "quoterightn"}, + {0xFF07, "quotesinglemonospace"}, + {0x057C, "raarmenian"}, + {0x09B0, "rabengali"}, + {0x0930, "radeva"}, + {0x33AE, "radoverssquare"}, + {0x33AF, "radoverssquaredsquare"}, + {0x33AD, "radsquare"}, + {0x05BF, "rafe"}, + {0x05BF, "rafehebrew"}, + {0x0AB0, "ragujarati"}, + {0x0A30, "ragurmukhi"}, + {0x3089, "rahiragana"}, + {0x30E9, "rakatakana"}, + {0xFF97, "rakatakanahalfwidth"}, + {0x09F1, "ralowerdiagonalbengali"}, + {0x09F0, "ramiddlediagonalbengali"}, + {0x0264, "ramshorn"}, + {0x2236, "ratio"}, + {0x3116, "rbopomofo"}, + {0x0157, "rcedilla"}, + {0x24E1, "rcircle"}, + {0x0211, "rdblgrave"}, + {0x1E59, "rdotaccent"}, + {0x1E5B, "rdotbelow"}, + {0x1E5D, "rdotbelowmacron"}, + {0x203B, "referencemark"}, + {0x0631, "reharabic"}, + {0x0580, "reharmenian"}, + {0xFEAE, "rehfinalarabic"}, + {0x308C, "rehiragana"}, + {0x30EC, "rekatakana"}, + {0xFF9A, "rekatakanahalfwidth"}, + {0x05E8, "resh"}, + {0xFB48, "reshdageshhebrew"}, + {0x05E8, "reshhebrew"}, + {0x223D, "reversedtilde"}, + {0x0597, "reviahebrew"}, + {0x0597, "reviamugrashhebrew"}, + {0x027E, "rfishhook"}, + {0x027F, "rfishhookreversed"}, + {0x09DD, "rhabengali"}, + {0x095D, "rhadeva"}, + {0x027D, "rhook"}, + {0x027B, "rhookturned"}, + {0x02B5, "rhookturnedsuperior"}, + {0x03F1, "rhosymbolgreek"}, + {0x02DE, "rhotichookmod"}, + {0x3271, "rieulacirclekorean"}, + {0x3211, "rieulaparenkorean"}, + {0x3263, "rieulcirclekorean"}, + {0x3140, "rieulhieuhkorean"}, + {0x313A, "rieulkiyeokkorean"}, + {0x3169, "rieulkiyeoksioskorean"}, + {0x3139, "rieulkorean"}, + {0x313B, "rieulmieumkorean"}, + {0x316C, "rieulpansioskorean"}, + {0x3203, "rieulparenkorean"}, + {0x313F, "rieulphieuphkorean"}, + {0x313C, "rieulpieupkorean"}, + {0x316B, "rieulpieupsioskorean"}, + {0x313D, "rieulsioskorean"}, + {0x313E, "rieulthieuthkorean"}, + {0x316A, "rieultikeutkorean"}, + {0x316D, "rieulyeorinhieuhkorean"}, + {0x221F, "rightangle"}, + {0x0319, "righttackbelowcmb"}, + {0x22BF, "righttriangle"}, + {0x308A, "rihiragana"}, + {0x30EA, "rikatakana"}, + {0xFF98, "rikatakanahalfwidth"}, + {0x0325, "ringbelowcmb"}, + {0x030A, "ringcmb"}, + {0x02BF, "ringhalfleft"}, + {0x0559, "ringhalfleftarmenian"}, + {0x031C, "ringhalfleftbelowcmb"}, + {0x02D3, "ringhalfleftcentered"}, + {0x02BE, "ringhalfright"}, + {0x0339, "ringhalfrightbelowcmb"}, + {0x02D2, "ringhalfrightcentered"}, + {0x0213, "rinvertedbreve"}, + {0x3351, "rittorusquare"}, + {0x1E5F, "rlinebelow"}, + {0x027C, "rlongleg"}, + {0x027A, "rlonglegturned"}, + {0xFF52, "rmonospace"}, + {0x308D, "rohiragana"}, + {0x30ED, "rokatakana"}, + {0xFF9B, "rokatakanahalfwidth"}, + {0x0E23, "roruathai"}, + {0x24AD, "rparen"}, + {0x09DC, "rrabengali"}, + {0x0931, "rradeva"}, + {0x0A5C, "rragurmukhi"}, + {0x0691, "rreharabic"}, + {0xFB8D, "rrehfinalarabic"}, + {0x09E0, "rrvocalicbengali"}, + {0x0960, "rrvocalicdeva"}, + {0x0AE0, "rrvocalicgujarati"}, + {0x09C4, "rrvocalicvowelsignbengali"}, + {0x0944, "rrvocalicvowelsigndeva"}, + {0x0AC4, "rrvocalicvowelsigngujarati"}, + {0x0279, "rturned"}, + {0x02B4, "rturnedsuperior"}, + {0x308B, "ruhiragana"}, + {0x30EB, "rukatakana"}, + {0xFF99, "rukatakanahalfwidth"}, + {0x09F2, "rupeemarkbengali"}, + {0x09F3, "rupeesignbengali"}, + {0x0E24, "ruthai"}, + {0x098B, "rvocalicbengali"}, + {0x090B, "rvocalicdeva"}, + {0x0A8B, "rvocalicgujarati"}, + {0x09C3, "rvocalicvowelsignbengali"}, + {0x0943, "rvocalicvowelsigndeva"}, + {0x0AC3, "rvocalicvowelsigngujarati"}, + {0x09B8, "sabengali"}, + {0x1E65, "sacutedotaccent"}, + {0x0635, "sadarabic"}, + {0x0938, "sadeva"}, + {0xFEBA, "sadfinalarabic"}, + {0xFEBB, "sadinitialarabic"}, + {0xFEBC, "sadmedialarabic"}, + {0x0AB8, "sagujarati"}, + {0x0A38, "sagurmukhi"}, + {0x3055, "sahiragana"}, + {0x30B5, "sakatakana"}, + {0xFF7B, "sakatakanahalfwidth"}, + {0xFDFA, "sallallahoualayhewasallamarabic"}, + {0x05E1, "samekh"}, + {0xFB41, "samekhdagesh"}, + {0xFB41, "samekhdageshhebrew"}, + {0x05E1, "samekhhebrew"}, + {0x0E32, "saraaathai"}, + {0x0E41, "saraaethai"}, + {0x0E44, "saraaimaimalaithai"}, + {0x0E43, "saraaimaimuanthai"}, + {0x0E33, "saraamthai"}, + {0x0E30, "saraathai"}, + {0x0E40, "saraethai"}, + {0xF886, "saraiileftthai"}, + {0x0E35, "saraiithai"}, + {0xF885, "saraileftthai"}, + {0x0E34, "saraithai"}, + {0x0E42, "saraothai"}, + {0xF888, "saraueeleftthai"}, + {0x0E37, "saraueethai"}, + {0xF887, "saraueleftthai"}, + {0x0E36, "sarauethai"}, + {0x0E38, "sarauthai"}, + {0x0E39, "sarauuthai"}, + {0x3119, "sbopomofo"}, + {0x1E67, "scarondotaccent"}, + {0x015F, "scedilla"}, + {0x0259, "schwa"}, + {0x04D9, "schwacyrillic"}, + {0x04DB, "schwadieresiscyrillic"}, + {0x025A, "schwahook"}, + {0x24E2, "scircle"}, + {0x1E61, "sdotaccent"}, + {0x1E63, "sdotbelow"}, + {0x1E69, "sdotbelowdotaccent"}, + {0x033C, "seagullbelowcmb"}, + {0x02CA, "secondtonechinese"}, + {0x0633, "seenarabic"}, + {0xFEB2, "seenfinalarabic"}, + {0xFEB3, "seeninitialarabic"}, + {0xFEB4, "seenmedialarabic"}, + {0x05B6, "segol"}, + {0x05B6, "segol13"}, + {0x05B6, "segol1f"}, + {0x05B6, "segol2c"}, + {0x05B6, "segolhebrew"}, + {0x05B6, "segolnarrowhebrew"}, + {0x05B6, "segolquarterhebrew"}, + {0x0592, "segoltahebrew"}, + {0x05B6, "segolwidehebrew"}, + {0x057D, "seharmenian"}, + {0x305B, "sehiragana"}, + {0x30BB, "sekatakana"}, + {0xFF7E, "sekatakanahalfwidth"}, + {0x061B, "semicolonarabic"}, + {0xFF1B, "semicolonmonospace"}, + {0xFE54, "semicolonsmall"}, + {0x309C, "semivoicedmarkkana"}, + {0xFF9F, "semivoicedmarkkanahalfwidth"}, + {0x3322, "sentisquare"}, + {0x3323, "sentosquare"}, + {0x0667, "sevenarabic"}, + {0x09ED, "sevenbengali"}, + {0x2466, "sevencircle"}, + {0x2790, "sevencircleinversesansserif"}, + {0x096D, "sevendeva"}, + {0x0AED, "sevengujarati"}, + {0x0A6D, "sevengurmukhi"}, + {0x0667, "sevenhackarabic"}, + {0x3027, "sevenhangzhou"}, + {0x3226, "sevenideographicparen"}, + {0xFF17, "sevenmonospace"}, + {0x247A, "sevenparen"}, + {0x248E, "sevenperiod"}, + {0x06F7, "sevenpersian"}, + {0x2176, "sevenroman"}, + {0x2470, "seventeencircle"}, + {0x2484, "seventeenparen"}, + {0x2498, "seventeenperiod"}, + {0x0E57, "seventhai"}, + {0x00AD, "sfthyphen"}, + {0x0577, "shaarmenian"}, + {0x09B6, "shabengali"}, + {0x0448, "shacyrillic"}, + {0x0651, "shaddaarabic"}, + {0xFC61, "shaddadammaarabic"}, + {0xFC5E, "shaddadammatanarabic"}, + {0xFC60, "shaddafathaarabic"}, + {0xFC62, "shaddakasraarabic"}, + {0xFC5F, "shaddakasratanarabic"}, + {0x2593, "shadedark"}, + {0x2591, "shadelight"}, + {0x2592, "shademedium"}, + {0x0936, "shadeva"}, + {0x0AB6, "shagujarati"}, + {0x0A36, "shagurmukhi"}, + {0x0593, "shalshelethebrew"}, + {0x3115, "shbopomofo"}, + {0x0449, "shchacyrillic"}, + {0x0634, "sheenarabic"}, + {0xFEB6, "sheenfinalarabic"}, + {0xFEB7, "sheeninitialarabic"}, + {0xFEB8, "sheenmedialarabic"}, + {0x03E3, "sheicoptic"}, + {0x20AA, "sheqel"}, + {0x20AA, "sheqelhebrew"}, + {0x05B0, "sheva"}, + {0x05B0, "sheva115"}, + {0x05B0, "sheva15"}, + {0x05B0, "sheva22"}, + {0x05B0, "sheva2e"}, + {0x05B0, "shevahebrew"}, + {0x05B0, "shevanarrowhebrew"}, + {0x05B0, "shevaquarterhebrew"}, + {0x05B0, "shevawidehebrew"}, + {0x04BB, "shhacyrillic"}, + {0x03ED, "shimacoptic"}, + {0x05E9, "shin"}, + {0xFB49, "shindagesh"}, + {0xFB49, "shindageshhebrew"}, + {0xFB2C, "shindageshshindot"}, + {0xFB2C, "shindageshshindothebrew"}, + {0xFB2D, "shindageshsindot"}, + {0xFB2D, "shindageshsindothebrew"}, + {0x05C1, "shindothebrew"}, + {0x05E9, "shinhebrew"}, + {0xFB2A, "shinshindot"}, + {0xFB2A, "shinshindothebrew"}, + {0xFB2B, "shinsindot"}, + {0xFB2B, "shinsindothebrew"}, + {0x0282, "shook"}, + {0x03C2, "sigmafinal"}, + {0x03F2, "sigmalunatesymbolgreek"}, + {0x3057, "sihiragana"}, + {0x30B7, "sikatakana"}, + {0xFF7C, "sikatakanahalfwidth"}, + {0x05BD, "siluqhebrew"}, + {0x05BD, "siluqlefthebrew"}, + {0x05C2, "sindothebrew"}, + {0x3274, "siosacirclekorean"}, + {0x3214, "siosaparenkorean"}, + {0x317E, "sioscieuckorean"}, + {0x3266, "sioscirclekorean"}, + {0x317A, "sioskiyeokkorean"}, + {0x3145, "sioskorean"}, + {0x317B, "siosnieunkorean"}, + {0x3206, "siosparenkorean"}, + {0x317D, "siospieupkorean"}, + {0x317C, "siostikeutkorean"}, + {0x0666, "sixarabic"}, + {0x09EC, "sixbengali"}, + {0x2465, "sixcircle"}, + {0x278F, "sixcircleinversesansserif"}, + {0x096C, "sixdeva"}, + {0x0AEC, "sixgujarati"}, + {0x0A6C, "sixgurmukhi"}, + {0x0666, "sixhackarabic"}, + {0x3026, "sixhangzhou"}, + {0x3225, "sixideographicparen"}, + {0xFF16, "sixmonospace"}, + {0x2479, "sixparen"}, + {0x248D, "sixperiod"}, + {0x06F6, "sixpersian"}, + {0x2175, "sixroman"}, + {0x246F, "sixteencircle"}, + {0x09F9, "sixteencurrencydenominatorbengali"}, + {0x2483, "sixteenparen"}, + {0x2497, "sixteenperiod"}, + {0x0E56, "sixthai"}, + {0xFF0F, "slashmonospace"}, + {0x017F, "slong"}, + {0x1E9B, "slongdotaccent"}, + {0xFF53, "smonospace"}, + {0x05C3, "sofpasuqhebrew"}, + {0x00AD, "softhyphen"}, + {0x044C, "softsigncyrillic"}, + {0x305D, "sohiragana"}, + {0x30BD, "sokatakana"}, + {0xFF7F, "sokatakanahalfwidth"}, + {0x0338, "soliduslongoverlaycmb"}, + {0x0337, "solidusshortoverlaycmb"}, + {0x0E29, "sorusithai"}, + {0x0E28, "sosalathai"}, + {0x0E0B, "sosothai"}, + {0x0E2A, "sosuathai"}, + {0x0020, "space"}, + {0x0020, "spacehackarabic"}, + {0x2660, "spadesuitblack"}, + {0x2664, "spadesuitwhite"}, + {0x24AE, "sparen"}, + {0x033B, "squarebelowcmb"}, + {0x33C4, "squarecc"}, + {0x339D, "squarecm"}, + {0x25A9, "squarediagonalcrosshatchfill"}, + {0x25A4, "squarehorizontalfill"}, + {0x338F, "squarekg"}, + {0x339E, "squarekm"}, + {0x33CE, "squarekmcapital"}, + {0x33D1, "squareln"}, + {0x33D2, "squarelog"}, + {0x338E, "squaremg"}, + {0x33D5, "squaremil"}, + {0x339C, "squaremm"}, + {0x33A1, "squaremsquared"}, + {0x25A6, "squareorthogonalcrosshatchfill"}, + {0x25A7, "squareupperlefttolowerrightfill"}, + {0x25A8, "squareupperrighttolowerleftfill"}, + {0x25A5, "squareverticalfill"}, + {0x25A3, "squarewhitewithsmallblack"}, + {0x33DB, "srsquare"}, + {0x09B7, "ssabengali"}, + {0x0937, "ssadeva"}, + {0x0AB7, "ssagujarati"}, + {0x3149, "ssangcieuckorean"}, + {0x3185, "ssanghieuhkorean"}, + {0x3180, "ssangieungkorean"}, + {0x3132, "ssangkiyeokkorean"}, + {0x3165, "ssangnieunkorean"}, + {0x3143, "ssangpieupkorean"}, + {0x3146, "ssangsioskorean"}, + {0x3138, "ssangtikeutkorean"}, + {0xFFE1, "sterlingmonospace"}, + {0x0336, "strokelongoverlaycmb"}, + {0x0335, "strokeshortoverlaycmb"}, + {0x2282, "subset"}, + {0x228A, "subsetnotequal"}, + {0x2286, "subsetorequal"}, + {0x227B, "succeeds"}, + {0x3059, "suhiragana"}, + {0x30B9, "sukatakana"}, + {0xFF7D, "sukatakanahalfwidth"}, + {0x0652, "sukunarabic"}, + {0x2283, "superset"}, + {0x228B, "supersetnotequal"}, + {0x2287, "supersetorequal"}, + {0x33DC, "svsquare"}, + {0x337C, "syouwaerasquare"}, + {0x09A4, "tabengali"}, + {0x22A4, "tackdown"}, + {0x22A3, "tackleft"}, + {0x0924, "tadeva"}, + {0x0AA4, "tagujarati"}, + {0x0A24, "tagurmukhi"}, + {0x0637, "taharabic"}, + {0xFEC2, "tahfinalarabic"}, + {0xFEC3, "tahinitialarabic"}, + {0x305F, "tahiragana"}, + {0xFEC4, "tahmedialarabic"}, + {0x337D, "taisyouerasquare"}, + {0x30BF, "takatakana"}, + {0xFF80, "takatakanahalfwidth"}, + {0x0640, "tatweelarabic"}, + {0x05EA, "tav"}, + {0xFB4A, "tavdages"}, + {0xFB4A, "tavdagesh"}, + {0xFB4A, "tavdageshhebrew"}, + {0x05EA, "tavhebrew"}, + {0x310A, "tbopomofo"}, + {0x02A8, "tccurl"}, + {0x0163, "tcedilla"}, + {0x0686, "tcheharabic"}, + {0xFB7B, "tchehfinalarabic"}, + {0xFB7C, "tchehinitialarabic"}, + {0xFB7D, "tchehmedialarabic"}, + {0x24E3, "tcircle"}, + {0x1E71, "tcircumflexbelow"}, + {0x0163, "tcommaaccent"}, + {0x1E97, "tdieresis"}, + {0x1E6B, "tdotaccent"}, + {0x1E6D, "tdotbelow"}, + {0x0442, "tecyrillic"}, + {0x04AD, "tedescendercyrillic"}, + {0x062A, "teharabic"}, + {0xFE96, "tehfinalarabic"}, + {0xFCA2, "tehhahinitialarabic"}, + {0xFC0C, "tehhahisolatedarabic"}, + {0xFE97, "tehinitialarabic"}, + {0x3066, "tehiragana"}, + {0xFCA1, "tehjeeminitialarabic"}, + {0xFC0B, "tehjeemisolatedarabic"}, + {0x0629, "tehmarbutaarabic"}, + {0xFE94, "tehmarbutafinalarabic"}, + {0xFE98, "tehmedialarabic"}, + {0xFCA4, "tehmeeminitialarabic"}, + {0xFC0E, "tehmeemisolatedarabic"}, + {0xFC73, "tehnoonfinalarabic"}, + {0x30C6, "tekatakana"}, + {0xFF83, "tekatakanahalfwidth"}, + {0x2121, "telephone"}, + {0x260E, "telephoneblack"}, + {0x05A0, "telishagedolahebrew"}, + {0x05A9, "telishaqetanahebrew"}, + {0x2469, "tencircle"}, + {0x3229, "tenideographicparen"}, + {0x247D, "tenparen"}, + {0x2491, "tenperiod"}, + {0x2179, "tenroman"}, + {0x02A7, "tesh"}, + {0x05D8, "tet"}, + {0xFB38, "tetdagesh"}, + {0xFB38, "tetdageshhebrew"}, + {0x05D8, "tethebrew"}, + {0x04B5, "tetsecyrillic"}, + {0x059B, "tevirhebrew"}, + {0x059B, "tevirlefthebrew"}, + {0x09A5, "thabengali"}, + {0x0925, "thadeva"}, + {0x0AA5, "thagujarati"}, + {0x0A25, "thagurmukhi"}, + {0x0630, "thalarabic"}, + {0xFEAC, "thalfinalarabic"}, + {0xF898, "thanthakhatlowleftthai"}, + {0xF897, "thanthakhatlowrightthai"}, + {0x0E4C, "thanthakhatthai"}, + {0xF896, "thanthakhatupperleftthai"}, + {0x062B, "theharabic"}, + {0xFE9A, "thehfinalarabic"}, + {0xFE9B, "thehinitialarabic"}, + {0xFE9C, "thehmedialarabic"}, + {0x2203, "thereexists"}, + {0x03D1, "thetasymbolgreek"}, + {0x3279, "thieuthacirclekorean"}, + {0x3219, "thieuthaparenkorean"}, + {0x326B, "thieuthcirclekorean"}, + {0x314C, "thieuthkorean"}, + {0x320B, "thieuthparenkorean"}, + {0x246C, "thirteencircle"}, + {0x2480, "thirteenparen"}, + {0x2494, "thirteenperiod"}, + {0x0E11, "thonangmonthothai"}, + {0x01AD, "thook"}, + {0x0E12, "thophuthaothai"}, + {0x0E17, "thothahanthai"}, + {0x0E10, "thothanthai"}, + {0x0E18, "thothongthai"}, + {0x0E16, "thothungthai"}, + {0x0482, "thousandcyrillic"}, + {0x066C, "thousandsseparatorarabic"}, + {0x066C, "thousandsseparatorpersian"}, + {0x0663, "threearabic"}, + {0x09E9, "threebengali"}, + {0x2462, "threecircle"}, + {0x278C, "threecircleinversesansserif"}, + {0x0969, "threedeva"}, + {0x0AE9, "threegujarati"}, + {0x0A69, "threegurmukhi"}, + {0x0663, "threehackarabic"}, + {0x3023, "threehangzhou"}, + {0x3222, "threeideographicparen"}, + {0xFF13, "threemonospace"}, + {0x09F6, "threenumeratorbengali"}, + {0x2476, "threeparen"}, + {0x248A, "threeperiod"}, + {0x06F3, "threepersian"}, + {0x2172, "threeroman"}, + {0x0E53, "threethai"}, + {0x3394, "thzsquare"}, + {0x3061, "tihiragana"}, + {0x30C1, "tikatakana"}, + {0xFF81, "tikatakanahalfwidth"}, + {0x3270, "tikeutacirclekorean"}, + {0x3210, "tikeutaparenkorean"}, + {0x3262, "tikeutcirclekorean"}, + {0x3137, "tikeutkorean"}, + {0x3202, "tikeutparenkorean"}, + {0x0330, "tildebelowcmb"}, + {0x0303, "tildecmb"}, + {0x0360, "tildedoublecmb"}, + {0x223C, "tildeoperator"}, + {0x0334, "tildeoverlaycmb"}, + {0x033E, "tildeverticalcmb"}, + {0x2297, "timescircle"}, + {0x0596, "tipehahebrew"}, + {0x0596, "tipehalefthebrew"}, + {0x0A70, "tippigurmukhi"}, + {0x0483, "titlocyrilliccmb"}, + {0x057F, "tiwnarmenian"}, + {0x1E6F, "tlinebelow"}, + {0xFF54, "tmonospace"}, + {0x0569, "toarmenian"}, + {0x3068, "tohiragana"}, + {0x30C8, "tokatakana"}, + {0xFF84, "tokatakanahalfwidth"}, + {0x02E5, "tonebarextrahighmod"}, + {0x02E9, "tonebarextralowmod"}, + {0x02E6, "tonebarhighmod"}, + {0x02E8, "tonebarlowmod"}, + {0x02E7, "tonebarmidmod"}, + {0x01BD, "tonefive"}, + {0x0185, "tonesix"}, + {0x01A8, "tonetwo"}, + {0x3327, "tonsquare"}, + {0x0E0F, "topatakthai"}, + {0x3014, "tortoiseshellbracketleft"}, + {0xFE5D, "tortoiseshellbracketleftsmall"}, + {0xFE39, "tortoiseshellbracketleftvertical"}, + {0x3015, "tortoiseshellbracketright"}, + {0xFE5E, "tortoiseshellbracketrightsmall"}, + {0xFE3A, "tortoiseshellbracketrightvertical"}, + {0x0E15, "totaothai"}, + {0x01AB, "tpalatalhook"}, + {0x24AF, "tparen"}, + {0x0288, "tretroflexhook"}, + {0x02A6, "ts"}, + {0x05E6, "tsadi"}, + {0xFB46, "tsadidagesh"}, + {0xFB46, "tsadidageshhebrew"}, + {0x05E6, "tsadihebrew"}, + {0x0446, "tsecyrillic"}, + {0x05B5, "tsere"}, + {0x05B5, "tsere12"}, + {0x05B5, "tsere1e"}, + {0x05B5, "tsere2b"}, + {0x05B5, "tserehebrew"}, + {0x05B5, "tserenarrowhebrew"}, + {0x05B5, "tserequarterhebrew"}, + {0x05B5, "tserewidehebrew"}, + {0x045B, "tshecyrillic"}, + {0x099F, "ttabengali"}, + {0x091F, "ttadeva"}, + {0x0A9F, "ttagujarati"}, + {0x0A1F, "ttagurmukhi"}, + {0x0679, "tteharabic"}, + {0xFB67, "ttehfinalarabic"}, + {0xFB68, "ttehinitialarabic"}, + {0xFB69, "ttehmedialarabic"}, + {0x09A0, "tthabengali"}, + {0x0920, "tthadeva"}, + {0x0AA0, "tthagujarati"}, + {0x0A20, "tthagurmukhi"}, + {0x0287, "tturned"}, + {0x3064, "tuhiragana"}, + {0x30C4, "tukatakana"}, + {0xFF82, "tukatakanahalfwidth"}, + {0x3063, "tusmallhiragana"}, + {0x30C3, "tusmallkatakana"}, + {0xFF6F, "tusmallkatakanahalfwidth"}, + {0x246B, "twelvecircle"}, + {0x247F, "twelveparen"}, + {0x2493, "twelveperiod"}, + {0x217B, "twelveroman"}, + {0x2473, "twentycircle"}, + {0x5344, "twentyhangzhou"}, + {0x2487, "twentyparen"}, + {0x249B, "twentyperiod"}, + {0x0662, "twoarabic"}, + {0x09E8, "twobengali"}, + {0x2461, "twocircle"}, + {0x278B, "twocircleinversesansserif"}, + {0x0968, "twodeva"}, + {0x2025, "twodotleader"}, + {0xFE30, "twodotleadervertical"}, + {0x0AE8, "twogujarati"}, + {0x0A68, "twogurmukhi"}, + {0x0662, "twohackarabic"}, + {0x3022, "twohangzhou"}, + {0x3221, "twoideographicparen"}, + {0xFF12, "twomonospace"}, + {0x09F5, "twonumeratorbengali"}, + {0x2475, "twoparen"}, + {0x2489, "twoperiod"}, + {0x06F2, "twopersian"}, + {0x2171, "tworoman"}, + {0x01BB, "twostroke"}, + {0x0E52, "twothai"}, + {0x0289, "ubar"}, + {0x0989, "ubengali"}, + {0x3128, "ubopomofo"}, + {0x01D4, "ucaron"}, + {0x24E4, "ucircle"}, + {0x1E77, "ucircumflexbelow"}, + {0x0443, "ucyrillic"}, + {0x0951, "udattadeva"}, + {0x0171, "udblacute"}, + {0x0215, "udblgrave"}, + {0x0909, "udeva"}, + {0x01D8, "udieresisacute"}, + {0x1E73, "udieresisbelow"}, + {0x01DA, "udieresiscaron"}, + {0x04F1, "udieresiscyrillic"}, + {0x01DC, "udieresisgrave"}, + {0x01D6, "udieresismacron"}, + {0x1EE5, "udotbelow"}, + {0x0A89, "ugujarati"}, + {0x0A09, "ugurmukhi"}, + {0x3046, "uhiragana"}, + {0x1EE7, "uhookabove"}, + {0x1EE9, "uhornacute"}, + {0x1EF1, "uhorndotbelow"}, + {0x1EEB, "uhorngrave"}, + {0x1EED, "uhornhookabove"}, + {0x1EEF, "uhorntilde"}, + {0x04F3, "uhungarumlautcyrillic"}, + {0x0217, "uinvertedbreve"}, + {0x30A6, "ukatakana"}, + {0xFF73, "ukatakanahalfwidth"}, + {0x0479, "ukcyrillic"}, + {0x315C, "ukorean"}, + {0x04EF, "umacroncyrillic"}, + {0x1E7B, "umacrondieresis"}, + {0x0A41, "umatragurmukhi"}, + {0xFF55, "umonospace"}, + {0xFF3F, "underscoremonospace"}, + {0xFE33, "underscorevertical"}, + {0xFE4F, "underscorewavy"}, + {0x24B0, "uparen"}, + {0x05C4, "upperdothebrew"}, + {0x028A, "upsilonlatin"}, + {0x031D, "uptackbelowcmb"}, + {0x02D4, "uptackmod"}, + {0x0A73, "uragurmukhi"}, + {0x045E, "ushortcyrillic"}, + {0x3045, "usmallhiragana"}, + {0x30A5, "usmallkatakana"}, + {0xFF69, "usmallkatakanahalfwidth"}, + {0x04AF, "ustraightcyrillic"}, + {0x04B1, "ustraightstrokecyrillic"}, + {0x1E79, "utildeacute"}, + {0x1E75, "utildebelow"}, + {0x098A, "uubengali"}, + {0x090A, "uudeva"}, + {0x0A8A, "uugujarati"}, + {0x0A0A, "uugurmukhi"}, + {0x0A42, "uumatragurmukhi"}, + {0x09C2, "uuvowelsignbengali"}, + {0x0942, "uuvowelsigndeva"}, + {0x0AC2, "uuvowelsigngujarati"}, + {0x09C1, "uvowelsignbengali"}, + {0x0941, "uvowelsigndeva"}, + {0x0AC1, "uvowelsigngujarati"}, + {0x0935, "vadeva"}, + {0x0AB5, "vagujarati"}, + {0x0A35, "vagurmukhi"}, + {0x30F7, "vakatakana"}, + {0x05D5, "vav"}, + {0xFB35, "vavdagesh"}, + {0xFB35, "vavdagesh65"}, + {0xFB35, "vavdageshhebrew"}, + {0x05D5, "vavhebrew"}, + {0xFB4B, "vavholam"}, + {0xFB4B, "vavholamhebrew"}, + {0x05F0, "vavvavhebrew"}, + {0x05F1, "vavyodhebrew"}, + {0x24E5, "vcircle"}, + {0x1E7F, "vdotbelow"}, + {0x0432, "vecyrillic"}, + {0x06A4, "veharabic"}, + {0xFB6B, "vehfinalarabic"}, + {0xFB6C, "vehinitialarabic"}, + {0xFB6D, "vehmedialarabic"}, + {0x30F9, "vekatakana"}, + {0x2640, "venus"}, + {0x007C, "verticalbar"}, + {0x030D, "verticallineabovecmb"}, + {0x0329, "verticallinebelowcmb"}, + {0x02CC, "verticallinelowmod"}, + {0x02C8, "verticallinemod"}, + {0x057E, "vewarmenian"}, + {0x028B, "vhook"}, + {0x30F8, "vikatakana"}, + {0x09CD, "viramabengali"}, + {0x094D, "viramadeva"}, + {0x0ACD, "viramagujarati"}, + {0x0983, "visargabengali"}, + {0x0903, "visargadeva"}, + {0x0A83, "visargagujarati"}, + {0xFF56, "vmonospace"}, + {0x0578, "voarmenian"}, + {0x309E, "voicediterationhiragana"}, + {0x30FE, "voicediterationkatakana"}, + {0x309B, "voicedmarkkana"}, + {0xFF9E, "voicedmarkkanahalfwidth"}, + {0x30FA, "vokatakana"}, + {0x24B1, "vparen"}, + {0x1E7D, "vtilde"}, + {0x028C, "vturned"}, + {0x3094, "vuhiragana"}, + {0x30F4, "vukatakana"}, + {0x3159, "waekorean"}, + {0x308F, "wahiragana"}, + {0x30EF, "wakatakana"}, + {0xFF9C, "wakatakanahalfwidth"}, + {0x3158, "wakorean"}, + {0x308E, "wasmallhiragana"}, + {0x30EE, "wasmallkatakana"}, + {0x3357, "wattosquare"}, + {0x301C, "wavedash"}, + {0xFE34, "wavyunderscorevertical"}, + {0x0648, "wawarabic"}, + {0xFEEE, "wawfinalarabic"}, + {0x0624, "wawhamzaabovearabic"}, + {0xFE86, "wawhamzaabovefinalarabic"}, + {0x33DD, "wbsquare"}, + {0x24E6, "wcircle"}, + {0x1E87, "wdotaccent"}, + {0x1E89, "wdotbelow"}, + {0x3091, "wehiragana"}, + {0x30F1, "wekatakana"}, + {0x315E, "wekorean"}, + {0x315D, "weokorean"}, + {0x25E6, "whitebullet"}, + {0x25CB, "whitecircle"}, + {0x25D9, "whitecircleinverse"}, + {0x300E, "whitecornerbracketleft"}, + {0xFE43, "whitecornerbracketleftvertical"}, + {0x300F, "whitecornerbracketright"}, + {0xFE44, "whitecornerbracketrightvertical"}, + {0x25C7, "whitediamond"}, + {0x25C8, "whitediamondcontainingblacksmalldiamond"}, + {0x25BF, "whitedownpointingsmalltriangle"}, + {0x25BD, "whitedownpointingtriangle"}, + {0x25C3, "whiteleftpointingsmalltriangle"}, + {0x25C1, "whiteleftpointingtriangle"}, + {0x3016, "whitelenticularbracketleft"}, + {0x3017, "whitelenticularbracketright"}, + {0x25B9, "whiterightpointingsmalltriangle"}, + {0x25B7, "whiterightpointingtriangle"}, + {0x25AB, "whitesmallsquare"}, + {0x263A, "whitesmilingface"}, + {0x25A1, "whitesquare"}, + {0x2606, "whitestar"}, + {0x260F, "whitetelephone"}, + {0x3018, "whitetortoiseshellbracketleft"}, + {0x3019, "whitetortoiseshellbracketright"}, + {0x25B5, "whiteuppointingsmalltriangle"}, + {0x25B3, "whiteuppointingtriangle"}, + {0x3090, "wihiragana"}, + {0x30F0, "wikatakana"}, + {0x315F, "wikorean"}, + {0xFF57, "wmonospace"}, + {0x3092, "wohiragana"}, + {0x30F2, "wokatakana"}, + {0xFF66, "wokatakanahalfwidth"}, + {0x20A9, "won"}, + {0xFFE6, "wonmonospace"}, + {0x0E27, "wowaenthai"}, + {0x24B2, "wparen"}, + {0x1E98, "wring"}, + {0x02B7, "wsuperior"}, + {0x028D, "wturned"}, + {0x01BF, "wynn"}, + {0x033D, "xabovecmb"}, + {0x3112, "xbopomofo"}, + {0x24E7, "xcircle"}, + {0x1E8D, "xdieresis"}, + {0x1E8B, "xdotaccent"}, + {0x056D, "xeharmenian"}, + {0xFF58, "xmonospace"}, + {0x24B3, "xparen"}, + {0x02E3, "xsuperior"}, + {0x334E, "yaadosquare"}, + {0x09AF, "yabengali"}, + {0x092F, "yadeva"}, + {0x3152, "yaekorean"}, + {0x0AAF, "yagujarati"}, + {0x0A2F, "yagurmukhi"}, + {0x3084, "yahiragana"}, + {0x30E4, "yakatakana"}, + {0xFF94, "yakatakanahalfwidth"}, + {0x3151, "yakorean"}, + {0x0E4E, "yamakkanthai"}, + {0x3083, "yasmallhiragana"}, + {0x30E3, "yasmallkatakana"}, + {0xFF6C, "yasmallkatakanahalfwidth"}, + {0x0463, "yatcyrillic"}, + {0x24E8, "ycircle"}, + {0x1E8F, "ydotaccent"}, + {0x1EF5, "ydotbelow"}, + {0x064A, "yeharabic"}, + {0x06D2, "yehbarreearabic"}, + {0xFBAF, "yehbarreefinalarabic"}, + {0xFEF2, "yehfinalarabic"}, + {0x0626, "yehhamzaabovearabic"}, + {0xFE8A, "yehhamzaabovefinalarabic"}, + {0xFE8B, "yehhamzaaboveinitialarabic"}, + {0xFE8C, "yehhamzaabovemedialarabic"}, + {0xFEF3, "yehinitialarabic"}, + {0xFEF4, "yehmedialarabic"}, + {0xFCDD, "yehmeeminitialarabic"}, + {0xFC58, "yehmeemisolatedarabic"}, + {0xFC94, "yehnoonfinalarabic"}, + {0x06D1, "yehthreedotsbelowarabic"}, + {0x3156, "yekorean"}, + {0xFFE5, "yenmonospace"}, + {0x3155, "yeokorean"}, + {0x3186, "yeorinhieuhkorean"}, + {0x05AA, "yerahbenyomohebrew"}, + {0x05AA, "yerahbenyomolefthebrew"}, + {0x044B, "yericyrillic"}, + {0x04F9, "yerudieresiscyrillic"}, + {0x3181, "yesieungkorean"}, + {0x3183, "yesieungpansioskorean"}, + {0x3182, "yesieungsioskorean"}, + {0x059A, "yetivhebrew"}, + {0x01B4, "yhook"}, + {0x1EF7, "yhookabove"}, + {0x0575, "yiarmenian"}, + {0x0457, "yicyrillic"}, + {0x3162, "yikorean"}, + {0x262F, "yinyang"}, + {0x0582, "yiwnarmenian"}, + {0xFF59, "ymonospace"}, + {0x05D9, "yod"}, + {0xFB39, "yoddagesh"}, + {0xFB39, "yoddageshhebrew"}, + {0x05D9, "yodhebrew"}, + {0x05F2, "yodyodhebrew"}, + {0xFB1F, "yodyodpatahhebrew"}, + {0x3088, "yohiragana"}, + {0x3189, "yoikorean"}, + {0x30E8, "yokatakana"}, + {0xFF96, "yokatakanahalfwidth"}, + {0x315B, "yokorean"}, + {0x3087, "yosmallhiragana"}, + {0x30E7, "yosmallkatakana"}, + {0xFF6E, "yosmallkatakanahalfwidth"}, + {0x03F3, "yotgreek"}, + {0x3188, "yoyaekorean"}, + {0x3187, "yoyakorean"}, + {0x0E22, "yoyakthai"}, + {0x0E0D, "yoyingthai"}, + {0x24B4, "yparen"}, + {0x037A, "ypogegrammeni"}, + {0x0345, "ypogegrammenigreekcmb"}, + {0x01A6, "yr"}, + {0x1E99, "yring"}, + {0x02B8, "ysuperior"}, + {0x1EF9, "ytilde"}, + {0x028E, "yturned"}, + {0x3086, "yuhiragana"}, + {0x318C, "yuikorean"}, + {0x30E6, "yukatakana"}, + {0xFF95, "yukatakanahalfwidth"}, + {0x3160, "yukorean"}, + {0x046B, "yusbigcyrillic"}, + {0x046D, "yusbigiotifiedcyrillic"}, + {0x0467, "yuslittlecyrillic"}, + {0x0469, "yuslittleiotifiedcyrillic"}, + {0x3085, "yusmallhiragana"}, + {0x30E5, "yusmallkatakana"}, + {0xFF6D, "yusmallkatakanahalfwidth"}, + {0x318B, "yuyekorean"}, + {0x318A, "yuyeokorean"}, + {0x09DF, "yyabengali"}, + {0x095F, "yyadeva"}, + {0x0566, "zaarmenian"}, + {0x095B, "zadeva"}, + {0x0A5B, "zagurmukhi"}, + {0x0638, "zaharabic"}, + {0xFEC6, "zahfinalarabic"}, + {0xFEC7, "zahinitialarabic"}, + {0x3056, "zahiragana"}, + {0xFEC8, "zahmedialarabic"}, + {0x0632, "zainarabic"}, + {0xFEB0, "zainfinalarabic"}, + {0x30B6, "zakatakana"}, + {0x0595, "zaqefgadolhebrew"}, + {0x0594, "zaqefqatanhebrew"}, + {0x0598, "zarqahebrew"}, + {0x05D6, "zayin"}, + {0xFB36, "zayindagesh"}, + {0xFB36, "zayindageshhebrew"}, + {0x05D6, "zayinhebrew"}, + {0x3117, "zbopomofo"}, + {0x24E9, "zcircle"}, + {0x1E91, "zcircumflex"}, + {0x0291, "zcurl"}, + {0x017C, "zdot"}, + {0x1E93, "zdotbelow"}, + {0x0437, "zecyrillic"}, + {0x0499, "zedescendercyrillic"}, + {0x04DF, "zedieresiscyrillic"}, + {0x305C, "zehiragana"}, + {0x30BC, "zekatakana"}, + {0x0660, "zeroarabic"}, + {0x09E6, "zerobengali"}, + {0x0966, "zerodeva"}, + {0x0AE6, "zerogujarati"}, + {0x0A66, "zerogurmukhi"}, + {0x0660, "zerohackarabic"}, + {0xFF10, "zeromonospace"}, + {0x06F0, "zeropersian"}, + {0x0E50, "zerothai"}, + {0xFEFF, "zerowidthjoiner"}, + {0x200C, "zerowidthnonjoiner"}, + {0x200B, "zerowidthspace"}, + {0x3113, "zhbopomofo"}, + {0x056A, "zhearmenian"}, + {0x04C2, "zhebrevecyrillic"}, + {0x0436, "zhecyrillic"}, + {0x0497, "zhedescendercyrillic"}, + {0x04DD, "zhedieresiscyrillic"}, + {0x3058, "zihiragana"}, + {0x30B8, "zikatakana"}, + {0x05AE, "zinorhebrew"}, + {0x1E95, "zlinebelow"}, + {0xFF5A, "zmonospace"}, + {0x305E, "zohiragana"}, + {0x30BE, "zokatakana"}, + {0x24B5, "zparen"}, + {0x0290, "zretroflexhook"}, + {0x01B6, "zstroke"}, + {0x305A, "zuhiragana"}, + {0x30BA, "zukatakana"}, + {0xFFFF, NULL} }; @@ -2474,26 +5648,34 @@ HPDF_BasicEncoder_Write (HPDF_Encoder encoder, ret = HPDF_Stream_WriteStr (out, "/Differences ["); if (ret != HPDF_OK) return ret; - - for (i = attr->first_char; i <= attr->last_char; i++) { - if (attr->differences[i] == 1) { - char tmp[HPDF_TEXT_DEFAULT_LEN]; - char* ptmp = tmp; - const char* char_name = - HPDF_UnicodeToGryphName (attr->unicode_map[i]); - - ptmp = HPDF_IToA (ptmp, i, tmp + HPDF_TEXT_DEFAULT_LEN - 1); - *ptmp++ = ' '; - *ptmp++ = '/'; - ptmp = (char *)HPDF_StrCpy (ptmp, char_name, tmp + - HPDF_TEXT_DEFAULT_LEN - 1); - *ptmp++ = ' '; - *ptmp = 0; - - ret = HPDF_Stream_WriteStr (out, tmp); - if (ret != HPDF_OK) - return ret; - } + if ( !attr->differences_str ) + { + for (i = attr->first_char; i <= attr->last_char; i++) { + if (attr->differences[i] == 1) { + char tmp[HPDF_TEXT_DEFAULT_LEN]; + char* ptmp = tmp; + const char* char_name = + HPDF_UnicodeToGryphName (attr->unicode_map[i]); + + ptmp = HPDF_IToA (ptmp, i, tmp + HPDF_TEXT_DEFAULT_LEN - 1); + *ptmp++ = ' '; + *ptmp++ = '/'; + ptmp = (char *)HPDF_StrCpy (ptmp, char_name, tmp + + HPDF_TEXT_DEFAULT_LEN - 1); + *ptmp++ = ' '; + *ptmp = 0; + + ret = HPDF_Stream_WriteStr (out, tmp); + if (ret != HPDF_OK) + return ret; + } + } + } + else + { + ret = HPDF_Stream_WriteStr (out, attr->differences_str); + if (ret != HPDF_OK) + return ret; } ret = HPDF_Stream_WriteStr (out, "]\012>>\012"); diff --git a/src/hpdf_fontdef_type1.c b/src/hpdf_fontdef_type1.c index 454435a0..5a53b2cf 100644 --- a/src/hpdf_fontdef_type1.c +++ b/src/hpdf_fontdef_type1.c @@ -134,10 +134,6 @@ LoadAfm (HPDF_FontDef fontdef, HPDF_UINT len; char keyword[HPDF_LIMIT_MAX_NAME_LEN + 1]; HPDF_UINT i; - HPDF_CharData* cdata_temp; - HPDF_CharData* cdata_temp_root; - HPDF_INT16 temp_count = 0; - HPDF_INT16 unicode = 0; HPDF_PTRACE ((" LoadAfm\n")); @@ -236,24 +232,18 @@ LoadAfm (HPDF_FontDef fontdef, } cdata = (HPDF_CharData*)HPDF_GetMem (fontdef->mmgr, - sizeof(HPDF_CharData) * attr->widths_count * 2); + sizeof(HPDF_CharData) * attr->widths_count); - cdata_temp = (HPDF_CharData*)HPDF_GetMem (fontdef->mmgr, sizeof(HPDF_CharData) * attr->widths_count); - - if (cdata == NULL || cdata_temp == NULL) + if (cdata == NULL) return HPDF_Error_GetCode (fontdef->error); - HPDF_MemSet (cdata, 0, sizeof(HPDF_CharData) * attr->widths_count * 2); + HPDF_MemSet (cdata, 0, sizeof(HPDF_CharData) * attr->widths_count); attr->widths = cdata; - HPDF_MemSet (cdata_temp, 0, sizeof(HPDF_CharData) * attr->widths_count); - cdata_temp_root = cdata_temp; - /* load CharMetrics */ for (i = 0; i < attr->widths_count; i++, cdata++) { const char *s; char buf2[HPDF_LIMIT_MAX_NAME_LEN + 1]; - unicode = 0; len = HPDF_TMP_BUF_SIZ; if ((ret = HPDF_Stream_ReadLn (stream, buf, &len)) != HPDF_OK) @@ -267,7 +257,6 @@ LoadAfm (HPDF_FontDef fontdef, HPDF_INVALID_CHAR_MATRICS_DATA, 0); } else if (HPDF_StrCmp (buf2, "C") == 0) { - unicode = (HPDF_INT16)HPDF_AToI (s); s += 2; s = GetKeyword (s, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); @@ -302,45 +291,7 @@ LoadAfm (HPDF_FontDef fontdef, GetKeyword (s, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); cdata->unicode = HPDF_GryphNameToUnicode (buf2); - - if( cdata->unicode != unicode && unicode != -1 ) - { - cdata_temp->char_cd = cdata->char_cd; - cdata_temp->width = cdata->width; - cdata_temp->unicode = unicode; - cdata_temp++; - temp_count++; - } - } - - cdata_temp = cdata_temp_root; - int x = 0; - int y = 0; - int flag = 0; - for( x = 0; x < temp_count; x++, cdata_temp++ ) - { - HPDF_CharData *cdata_cmp = attr->widths; - flag = 0; - for( y = 0; y < i; y++ ) - { - if( cdata_cmp->unicode == cdata_temp->unicode ) - { - // cdata already contains this unicode - flag = 1; - break; - } - cdata_cmp++; - } - if( flag == 0 ) - { - cdata++; - cdata->char_cd = cdata_temp->char_cd; - cdata->width = cdata_temp->width; - cdata->unicode = cdata_temp->unicode; - i++; - } } - attr->widths_count = i; return HPDF_OK; } diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index a4290581..7145e666 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -36,6 +36,7 @@ EXPORTS HPDF_GetCurrentEncoder@4 = HPDF_GetCurrentEncoder HPDF_GetCurrentPage@4 = HPDF_GetCurrentPage HPDF_GetEncoder@8 = HPDF_GetEncoder + HPDF_GetEncoder2@8 = HPDF_GetEncoder2 HPDF_GetError@4 = HPDF_GetError HPDF_GetErrorDetail@4 = HPDF_GetErrorDetail HPDF_GetFont@12 = HPDF_GetFont From 624efb6c595bcd7c226589d013e823a12436d76e Mon Sep 17 00:00:00 2001 From: Gerhard Gruber Date: Mon, 27 Jan 2014 12:56:46 +0100 Subject: [PATCH 08/24] Parsing of AFM files allows wrong count of C When parsing a corrupt AFM file the libharu will not rise an error when there are not enough / too much C-commands. Fixes #15 --- src/hpdf_fontdef_type1.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hpdf_fontdef_type1.c b/src/hpdf_fontdef_type1.c index 5a53b2cf..352e1de7 100644 --- a/src/hpdf_fontdef_type1.c +++ b/src/hpdf_fontdef_type1.c @@ -251,6 +251,10 @@ LoadAfm (HPDF_FontDef fontdef, /* C default character code. */ s = GetKeyword (buf, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); + if (HPDF_StrCmp (buf2, "EndCharMetrics") == 0) { + attr->widths_count = i; + break; + } else if (HPDF_StrCmp (buf2, "CX") == 0) { /* not suppoted yet. */ return HPDF_SetError (fontdef->error, From 0618e19347dcac6adbbc29881df4609e6176929c Mon Sep 17 00:00:00 2001 From: Hammerschmid Daniel Date: Mon, 3 Feb 2014 13:29:12 +0100 Subject: [PATCH 09/24] Added function to load native type 1 fonts Added function HPDF_LoadType1FontFromFileNative which loads a native type 1 font. The function does not use the HPDF_GryphNameToUnicode method to determine the unicode value of a character. fixes #17 Fixed wrong HPDF_PTRACE --- include/hpdf.h | 5 ++++ include/hpdf_fontdef.h | 3 ++- src/hpdf_doc.c | 52 ++++++++++++++++++++++++++++++++++++---- src/hpdf_fontdef_type1.c | 22 +++++++++++++---- win32/mingw/libhpdf.def | 1 + 5 files changed, 72 insertions(+), 11 deletions(-) diff --git a/include/hpdf.h b/include/hpdf.h index 7319513f..cd241547 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -283,6 +283,11 @@ HPDF_LoadType1FontFromFile2 (HPDF_Doc pdf, const char *afm_file_name, const char *font_name); +HPDF_EXPORT(const char*) +HPDF_LoadType1FontFromFileNative (HPDF_Doc pdf, + const char *afm_file_name, + const char *data_file_name); + HPDF_EXPORT(HPDF_FontDef) HPDF_GetTTFontDefFromFile (HPDF_Doc pdf, const char *file_name, diff --git a/include/hpdf_fontdef.h b/include/hpdf_fontdef.h index b5a03061..d29e41b0 100644 --- a/include/hpdf_fontdef.h +++ b/include/hpdf_fontdef.h @@ -164,7 +164,8 @@ HPDF_Type1FontDef_New (HPDF_MMgr mmgr); HPDF_FontDef HPDF_Type1FontDef_Load (HPDF_MMgr mmgr, HPDF_Stream afm, - HPDF_Stream font_data); + HPDF_Stream font_data, + HPDF_BOOL native); HPDF_FontDef diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index a530c217..1c6803da 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -67,7 +67,8 @@ InternalSaveToStream (HPDF_Doc pdf, static const char* LoadType1FontFromStream (HPDF_Doc pdf, HPDF_Stream afmdata, - HPDF_Stream pfmdata); + HPDF_Stream pfmdata, + HPDF_BOOL native); static const char* LoadType1FontFromStream2 (HPDF_Doc pdf, @@ -1452,7 +1453,7 @@ HPDF_LoadType1FontFromFile (HPDF_Doc pdf, if (HPDF_Stream_Validate (afm) && (!data_file_name || HPDF_Stream_Validate (pfm))) { - ret = LoadType1FontFromStream (pdf, afm, pfm); + ret = LoadType1FontFromStream (pdf, afm, pfm, HPDF_FALSE); } else ret = NULL; @@ -1505,10 +1506,51 @@ HPDF_LoadType1FontFromFile2 (HPDF_Doc pdf, return ret; } +HPDF_EXPORT(const char*) +HPDF_LoadType1FontFromFileNative (HPDF_Doc pdf, + const char *afm_file_name, + const char *data_file_name) +{ + HPDF_Stream afm; + HPDF_Stream pfm = NULL; + const char *ret; + + HPDF_PTRACE ((" HPDF_LoadType1FontFromFileNative\n")); + + if (!HPDF_HasDoc (pdf)) + return NULL; + + /* create file stream */ + afm = HPDF_FileReader_New (pdf->mmgr, afm_file_name); + + if (data_file_name) + pfm = HPDF_FileReader_New (pdf->mmgr, data_file_name); + + if (HPDF_Stream_Validate (afm) && + (!data_file_name || HPDF_Stream_Validate (pfm))) { + + ret = LoadType1FontFromStream (pdf, afm, pfm, HPDF_TRUE); + } else + ret = NULL; + + /* destroy file stream */ + if (afm) + HPDF_Stream_Free (afm); + + if (pfm) + HPDF_Stream_Free (pfm); + + if (!ret) + HPDF_CheckError (&pdf->error); + + return ret; +} + static const char* LoadType1FontFromStream (HPDF_Doc pdf, HPDF_Stream afmdata, - HPDF_Stream pfmdata) + HPDF_Stream pfmdata, + HPDF_BOOL native) { HPDF_FontDef def; @@ -1517,7 +1559,7 @@ LoadType1FontFromStream (HPDF_Doc pdf, if (!HPDF_HasDoc (pdf)) return NULL; - def = HPDF_Type1FontDef_Load (pdf->mmgr, afmdata, pfmdata); + def = HPDF_Type1FontDef_Load (pdf->mmgr, afmdata, pfmdata, native); if (def) { HPDF_FontDef tmpdef = HPDF_Doc_FindFontDef (pdf, def->base_font); if (tmpdef) { @@ -1548,7 +1590,7 @@ LoadType1FontFromStream2 (HPDF_Doc pdf, if (!HPDF_HasDoc (pdf)) return NULL; - def = HPDF_Type1FontDef_Load (pdf->mmgr, afmdata, NULL); + def = HPDF_Type1FontDef_Load (pdf->mmgr, afmdata, NULL, HPDF_FALSE); if (def) { char newname[] = "HPDF_"; diff --git a/src/hpdf_fontdef_type1.c b/src/hpdf_fontdef_type1.c index 352e1de7..e4600885 100644 --- a/src/hpdf_fontdef_type1.c +++ b/src/hpdf_fontdef_type1.c @@ -34,7 +34,8 @@ GetKeyword (const char *src, static HPDF_STATUS LoadAfm (HPDF_FontDef fontdef, - HPDF_Stream stream); + HPDF_Stream stream, + HPDF_BOOL native); static HPDF_STATUS @@ -125,7 +126,8 @@ GetKeyword (const char *src, static HPDF_STATUS LoadAfm (HPDF_FontDef fontdef, - HPDF_Stream stream) + HPDF_Stream stream, + HPDF_BOOL native) { HPDF_Type1FontDefAttr attr = (HPDF_Type1FontDefAttr)fontdef->attr; char buf[HPDF_TMP_BUF_SIZ]; @@ -244,6 +246,7 @@ LoadAfm (HPDF_FontDef fontdef, for (i = 0; i < attr->widths_count; i++, cdata++) { const char *s; char buf2[HPDF_LIMIT_MAX_NAME_LEN + 1]; + HPDF_INT16 unicode = 0; len = HPDF_TMP_BUF_SIZ; if ((ret = HPDF_Stream_ReadLn (stream, buf, &len)) != HPDF_OK) @@ -261,6 +264,7 @@ LoadAfm (HPDF_FontDef fontdef, HPDF_INVALID_CHAR_MATRICS_DATA, 0); } else if (HPDF_StrCmp (buf2, "C") == 0) { + unicode = (HPDF_INT16)HPDF_AToI (s); s += 2; s = GetKeyword (s, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); @@ -294,7 +298,14 @@ LoadAfm (HPDF_FontDef fontdef, GetKeyword (s, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); - cdata->unicode = HPDF_GryphNameToUnicode (buf2); + if( native ) + { + cdata->unicode = unicode; + } + else + { + cdata->unicode = HPDF_GryphNameToUnicode (buf2); + } } return HPDF_OK; @@ -384,7 +395,8 @@ LoadFontData (HPDF_FontDef fontdef, HPDF_FontDef HPDF_Type1FontDef_Load (HPDF_MMgr mmgr, HPDF_Stream afm, - HPDF_Stream font_data) + HPDF_Stream font_data, + HPDF_BOOL native) { HPDF_FontDef fontdef; HPDF_STATUS ret; @@ -399,7 +411,7 @@ HPDF_Type1FontDef_Load (HPDF_MMgr mmgr, if (!fontdef) return NULL; - ret = LoadAfm (fontdef, afm); + ret = LoadAfm (fontdef, afm, native); if (ret != HPDF_OK) { HPDF_FontDef_Free (fontdef); return NULL; diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index 7145e666..77fd33fa 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -69,6 +69,7 @@ EXPORTS HPDF_LoadTTFontFromFile2@16 = HPDF_LoadTTFontFromFile2 HPDF_LoadType1FontFromFile@12 = HPDF_LoadType1FontFromFile HPDF_LoadType1FontFromFile2@12 = HPDF_LoadType1FontFromFile2 + HPDF_LoadType1FontFromFileNative@12 = HPDF_LoadType1FontFromFileNative HPDF_New@8 = HPDF_New HPDF_NewDoc@4 = HPDF_NewDoc HPDF_NewEx@20 = HPDF_NewEx From 3c67642506bebfdf76fc9468b092ff752d8ea702 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 8 Apr 2014 11:14:23 +0200 Subject: [PATCH 10/24] Added unicode string support for bookmarks If the value of unicode_len from the HPDF_CreateOutline method is greater than 0, the title string will be treated as a unicode string. Also, the zoom value from the HPDF_Destination_SetXYZ method can now be 0. fixes #19 Fixed HPDF_PTRACE in HPDF_STRING_NEW_UNICODE --- include/hpdf.h | 3 ++- include/hpdf_objects.h | 1 + include/hpdf_outline.h | 3 ++- src/hpdf_destination.c | 2 +- src/hpdf_doc.c | 5 +++-- src/hpdf_outline.c | 9 +++++++-- src/hpdf_string.c | 44 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 60 insertions(+), 7 deletions(-) diff --git a/include/hpdf.h b/include/hpdf.h index cd241547..b4c31320 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -338,7 +338,8 @@ HPDF_EXPORT(HPDF_Outline) HPDF_CreateOutline (HPDF_Doc pdf, HPDF_Outline parent, const char *title, - HPDF_Encoder encoder); + HPDF_Encoder encoder, + HPDF_UINT16 unicode_len); HPDF_EXPORT(HPDF_STATUS) diff --git a/include/hpdf_objects.h b/include/hpdf_objects.h index 525adda0..7f827554 100644 --- a/include/hpdf_objects.h +++ b/include/hpdf_objects.h @@ -249,6 +249,7 @@ typedef struct _HPDF_String_Rec { HPDF_Encoder encoder; HPDF_BYTE *value; HPDF_UINT len; + HPDF_UINT16 unicode_len; } HPDF_String_Rec; diff --git a/include/hpdf_outline.h b/include/hpdf_outline.h index 18cdb08d..b319d742 100644 --- a/include/hpdf_outline.h +++ b/include/hpdf_outline.h @@ -38,7 +38,8 @@ HPDF_Outline_New (HPDF_MMgr mmgr, HPDF_Outline parent, const char *title, HPDF_Encoder encoder, - HPDF_Xref xref); + HPDF_Xref xref, + HPDF_UINT16 unicode_len); HPDF_Outline diff --git a/src/hpdf_destination.c b/src/hpdf_destination.c index e2566c89..01d70249 100644 --- a/src/hpdf_destination.c +++ b/src/hpdf_destination.c @@ -108,7 +108,7 @@ HPDF_Destination_SetXYZ (HPDF_Destination dst, if (!HPDF_Destination_Validate (dst)) return HPDF_INVALID_DESTINATION; - if (left < 0 || top < 0 || zoom < 0.08 || zoom > 32) + if (left < 0 || top < 0 || zoom < 0 || zoom > 32) return HPDF_RaiseError (dst->error, HPDF_INVALID_PARAMETER, 0); diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index 1c6803da..ec1d1a1a 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -2214,7 +2214,8 @@ HPDF_EXPORT(HPDF_Outline) HPDF_CreateOutline (HPDF_Doc pdf, HPDF_Outline parent, const char *title, - HPDF_Encoder encoder) + HPDF_Encoder encoder, + HPDF_UINT16 unicode_len) { HPDF_Outline outline; @@ -2249,7 +2250,7 @@ HPDF_CreateOutline (HPDF_Doc pdf, return NULL; } - outline = HPDF_Outline_New (pdf->mmgr, parent, title, encoder, pdf->xref); + outline = HPDF_Outline_New (pdf->mmgr, parent, title, encoder, pdf->xref, unicode_len); if (!outline) HPDF_CheckError (&pdf->error); diff --git a/src/hpdf_outline.c b/src/hpdf_outline.c index 56ce5e38..3e89b3f7 100644 --- a/src/hpdf_outline.c +++ b/src/hpdf_outline.c @@ -83,7 +83,8 @@ HPDF_Outline_New (HPDF_MMgr mmgr, HPDF_Outline parent, const char *title, HPDF_Encoder encoder, - HPDF_Xref xref) + HPDF_Xref xref, + HPDF_UINT16 unicode_len) { HPDF_Outline outline; HPDF_String s; @@ -104,7 +105,11 @@ HPDF_Outline_New (HPDF_MMgr mmgr, if (HPDF_Xref_Add (xref, outline) != HPDF_OK) return NULL; - s = HPDF_String_New (mmgr, title, encoder); + if(unicode_len > 0) + s = HPDF_String_New_Unicode (mmgr, title, unicode_len); + else + s = HPDF_String_New (mmgr, title, encoder); + if (!s) return NULL; else diff --git a/src/hpdf_string.c b/src/hpdf_string.c index f915093d..9ed5d584 100644 --- a/src/hpdf_string.c +++ b/src/hpdf_string.c @@ -44,6 +44,7 @@ HPDF_String_New (HPDF_MMgr mmgr, obj->encoder = encoder; obj->value = NULL; obj->len = 0; + obj->unicode_len = 0; if (HPDF_String_SetValue (obj, value) != HPDF_OK) { HPDF_FreeMem (obj->mmgr, obj); @@ -54,6 +55,36 @@ HPDF_String_New (HPDF_MMgr mmgr, return obj; } +HPDF_String +HPDF_String_New_Unicode (HPDF_MMgr mmgr, + const char *value, + HPDF_UINT16 unicode_len) +{ + HPDF_String obj; + + HPDF_PTRACE((" HPDF_String_New_Unicode\n")); + + obj = (HPDF_String)HPDF_GetMem (mmgr, sizeof(HPDF_String_Rec)); + if (obj) { + HPDF_MemSet (&obj->header, 0, sizeof(HPDF_Obj_Header)); + obj->header.obj_class = HPDF_OCLASS_STRING; + + obj->mmgr = mmgr; + obj->error = mmgr->error; + obj->encoder = NULL; + obj->value = NULL; + obj->len = 0; + obj->unicode_len = unicode_len; + + obj->value = HPDF_GetMem (obj->mmgr, unicode_len + 1); + if (!obj->value) + return HPDF_Error_GetCode (obj->error); + + HPDF_MemCpy ((char *)obj->value, value, unicode_len); + } + + return obj; +} HPDF_STATUS HPDF_String_SetValue (HPDF_String obj, @@ -114,6 +145,19 @@ HPDF_String_Write (HPDF_String obj, if (e) HPDF_Encrypt_Reset (e); + if (obj->unicode_len > 0) { + if ((ret = HPDF_Stream_WriteChar (stream, '<')) != HPDF_OK) + return ret; + + if ((ret = HPDF_Stream_WriteBinary (stream, UNICODE_HEADER, 2, e)) != HPDF_OK) + return ret; + + if ((ret = HPDF_Stream_WriteBinary (stream, obj->value, obj->unicode_len, e)) != HPDF_OK) + return ret; + + return HPDF_Stream_WriteChar (stream, '>'); + } + if (obj->encoder == NULL) { if (e) { if ((ret = HPDF_Stream_WriteChar (stream, '<')) != HPDF_OK) From 419f981013c191c2ac79a0e02cd5a0fcb443d173 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 15 Apr 2014 14:53:07 +0200 Subject: [PATCH 11/24] Added HPDF_Outline_GetParent to libhpdf.def file fixes #21 --- win32/mingw/libhpdf.def | 1 + 1 file changed, 1 insertion(+) diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index 77fd33fa..6513fd6a 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -75,6 +75,7 @@ EXPORTS HPDF_NewEx@20 = HPDF_NewEx HPDF_Outline_SetDestination@8 = HPDF_Outline_SetDestination HPDF_Outline_SetOpened@8 = HPDF_Outline_SetOpened + HPDF_Outline_GetParent@8 = HPDF_Outline_GetParent HPDF_Page_Arc@24 = HPDF_Page_Arc HPDF_Page_BeginText@4 = HPDF_Page_BeginText HPDF_Page_Circle@16 = HPDF_Page_Circle From a5abacfeffe8aa56fbcb073bdcb257f932748d63 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 23 Apr 2014 12:02:27 +0200 Subject: [PATCH 12/24] Added declaration of HPDF_String_New_Unicode to... hpdf_objects.h fixes #23 --- include/hpdf_objects.h | 4 ++++ src/hpdf_string.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/hpdf_objects.h b/include/hpdf_objects.h index 7f827554..c9e61e4a 100644 --- a/include/hpdf_objects.h +++ b/include/hpdf_objects.h @@ -259,6 +259,10 @@ HPDF_String_New (HPDF_MMgr mmgr, const char *value, HPDF_Encoder encoder); +HPDF_String +HPDF_String_New_Unicode (HPDF_MMgr mmgr, + const char *value, + HPDF_UINT16 unicode_len); HPDF_STATUS HPDF_String_SetValue (HPDF_String obj, diff --git a/src/hpdf_string.c b/src/hpdf_string.c index 9ed5d584..afcae167 100644 --- a/src/hpdf_string.c +++ b/src/hpdf_string.c @@ -78,9 +78,9 @@ HPDF_String_New_Unicode (HPDF_MMgr mmgr, obj->value = HPDF_GetMem (obj->mmgr, unicode_len + 1); if (!obj->value) - return HPDF_Error_GetCode (obj->error); + return NULL; - HPDF_MemCpy ((char *)obj->value, value, unicode_len); + HPDF_MemCpy (obj->value, (HPDF_BYTE*)value, unicode_len); } return obj; From af6ebb1a867e86520bafe5938aa578d9fb54e761 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 22 May 2015 11:49:43 +0200 Subject: [PATCH 13/24] Text with width 0 will now be written fixes #27 --- src/hpdf_page_operator.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index 3fb577a1..d6e07101 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -1431,8 +1431,6 @@ HPDF_Page_ShowText (HPDF_Page page, return HPDF_RaiseError (page->error, HPDF_PAGE_FONT_NOT_FOUND, 0); tw = HPDF_Page_TextWidth (page, text); - if (!tw) - return ret; if (InternalWriteText (attr, text) != HPDF_OK) return HPDF_CheckError (page->error); From ca79a24cc10ebb0a4cc1b3fccf69e4b71711f9f7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 19 May 2015 16:06:33 +0200 Subject: [PATCH 14/24] HPDF_FONT_SYMBOLIC flag is now set for native ... type 1 fonts. fixes #25 --- src/hpdf_fontdef_type1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hpdf_fontdef_type1.c b/src/hpdf_fontdef_type1.c index e4600885..caefb094 100644 --- a/src/hpdf_fontdef_type1.c +++ b/src/hpdf_fontdef_type1.c @@ -150,6 +150,9 @@ LoadAfm (HPDF_FontDef fontdef, if (HPDF_StrCmp (keyword, "StartFontMetrics") != 0) return HPDF_INVALID_AFM_HEADER; + if (native) + fontdef->flags = HPDF_FONT_SYMBOLIC; + /* Global Font Information */ for (;;) { From ca75a6daf092ac54e5a53e9332a080ad80586af7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 18 Jun 2015 10:05:21 +0200 Subject: [PATCH 15/24] Added support for glyphs with names like uni0411 fixes #29 --- src/hpdf_encoder.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hpdf_encoder.c b/src/hpdf_encoder.c index 3cb0cf64..a4967727 100644 --- a/src/hpdf_encoder.c +++ b/src/hpdf_encoder.c @@ -5591,6 +5591,11 @@ HPDF_GryphNameToUnicode (const char *gryph_name) map++; } + if ( HPDF_MemCmp( gryph_name, "uni", 3 ) == 0 ) + { + return strtol( gryph_name + 3, NULL, 16 ); + } + return 0x0000; } From adb98c8bb24a5ac9054f9e4500f7e56dae7d00f3 Mon Sep 17 00:00:00 2001 From: alexanderwieland Date: Fri, 9 Oct 2015 15:17:41 +0200 Subject: [PATCH 16/24] HPDF_UseUTFEncodings kann jetzt verwendet werden --- script/Makefile.in | 1 + script/Makefile.mingw | 1 + script/Makefile.mingw_cross | 1 + script/Makefile.mingw_dll | 1 + script/Makefile.mingw_dll_cross | 1 + script/Makefile.msvc | 1 + script/Makefile.msvc_dll | 1 + win32/mingw/libhpdf.def | 1 + win32/mingw/libhpdf_cdecl.def | 1 + win32/msvc/libhpdf.def | 1 + 10 files changed, 10 insertions(+) diff --git a/script/Makefile.in b/script/Makefile.in index 7551fe66..c5bbc3be 100644 --- a/script/Makefile.in +++ b/script/Makefile.in @@ -71,6 +71,7 @@ OBJS = \ src_SEP_hpdf_encoder_kr_OBJ_EXT \ src_SEP_hpdf_encoder_cns_OBJ_EXT \ src_SEP_hpdf_encoder_cnt_OBJ_EXT \ + src_SEP_hpdf_encoder_utf_OBJ_EXT \ src_SEP_hpdf_fontdef_jp_OBJ_EXT \ src_SEP_hpdf_fontdef_kr_OBJ_EXT \ src_SEP_hpdf_fontdef_cns_OBJ_EXT \ diff --git a/script/Makefile.mingw b/script/Makefile.mingw index 325f33ce..6b5cd45f 100644 --- a/script/Makefile.mingw +++ b/script/Makefile.mingw @@ -71,6 +71,7 @@ OBJS = \ src/hpdf_encoder_kr.o \ src/hpdf_encoder_cns.o \ src/hpdf_encoder_cnt.o \ + src/hpdf_encoder_utf.o \ src/hpdf_fontdef_jp.o \ src/hpdf_fontdef_kr.o \ src/hpdf_fontdef_cns.o \ diff --git a/script/Makefile.mingw_cross b/script/Makefile.mingw_cross index 7e8530c2..0a11235a 100644 --- a/script/Makefile.mingw_cross +++ b/script/Makefile.mingw_cross @@ -71,6 +71,7 @@ OBJS = \ src/hpdf_encoder_kr.o \ src/hpdf_encoder_cns.o \ src/hpdf_encoder_cnt.o \ + src/hpdf_encoder_utf.o \ src/hpdf_fontdef_jp.o \ src/hpdf_fontdef_kr.o \ src/hpdf_fontdef_cns.o \ diff --git a/script/Makefile.mingw_dll b/script/Makefile.mingw_dll index a3ffb1fa..0a1677fa 100644 --- a/script/Makefile.mingw_dll +++ b/script/Makefile.mingw_dll @@ -71,6 +71,7 @@ OBJS = \ src/hpdf_encoder_kr.o \ src/hpdf_encoder_cns.o \ src/hpdf_encoder_cnt.o \ + src/hpdf_encoder_utf.o \ src/hpdf_fontdef_jp.o \ src/hpdf_fontdef_kr.o \ src/hpdf_fontdef_cns.o \ diff --git a/script/Makefile.mingw_dll_cross b/script/Makefile.mingw_dll_cross index 89933f17..2bb2cbc2 100644 --- a/script/Makefile.mingw_dll_cross +++ b/script/Makefile.mingw_dll_cross @@ -71,6 +71,7 @@ OBJS = \ src/hpdf_encoder_kr.o \ src/hpdf_encoder_cns.o \ src/hpdf_encoder_cnt.o \ + src/hpdf_encoder_utf.o \ src/hpdf_fontdef_jp.o \ src/hpdf_fontdef_kr.o \ src/hpdf_fontdef_cns.o \ diff --git a/script/Makefile.msvc b/script/Makefile.msvc index fb5a13c9..8fb6a13a 100644 --- a/script/Makefile.msvc +++ b/script/Makefile.msvc @@ -80,6 +80,7 @@ OBJS = \ src\hpdf_encoder_kr.obj \ src\hpdf_encoder_cns.obj \ src\hpdf_encoder_cnt.obj \ + src\hpdf_encoder_utf.obj \ src\hpdf_fontdef_jp.obj \ src\hpdf_fontdef_kr.obj \ src\hpdf_fontdef_cns.obj \ diff --git a/script/Makefile.msvc_dll b/script/Makefile.msvc_dll index 838453ae..d8fb3c71 100644 --- a/script/Makefile.msvc_dll +++ b/script/Makefile.msvc_dll @@ -80,6 +80,7 @@ OBJS = \ src\hpdf_encoder_kr.obj \ src\hpdf_encoder_cns.obj \ src\hpdf_encoder_cnt.obj \ + src\hpdf_encoder_utf.obj \ src\hpdf_fontdef_jp.obj \ src\hpdf_fontdef_kr.obj \ src\hpdf_fontdef_cns.obj \ diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index 6513fd6a..c43be1db 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -208,3 +208,4 @@ EXPORTS HPDF_UseJPFonts@4 = HPDF_UseJPFonts HPDF_UseKREncodings@4 = HPDF_UseKREncodings HPDF_UseKRFonts@4 = HPDF_UseKRFonts + HPDF_UseUTFEncodings@4 = HPDF_UseUTFEncodings diff --git a/win32/mingw/libhpdf_cdecl.def b/win32/mingw/libhpdf_cdecl.def index bb1ec58a..a1a97729 100644 --- a/win32/mingw/libhpdf_cdecl.def +++ b/win32/mingw/libhpdf_cdecl.def @@ -207,6 +207,7 @@ EXPORTS HPDF_UseJPFonts HPDF_UseKREncodings HPDF_UseKRFonts + HPDF_UseUTFEncodings HPDF_Annot_Set3DView HPDF_Page_Create3DView HPDF_MarkupAnnot_SetTitle diff --git a/win32/msvc/libhpdf.def b/win32/msvc/libhpdf.def index a4e9b7f7..f6525bed 100644 --- a/win32/msvc/libhpdf.def +++ b/win32/msvc/libhpdf.def @@ -221,6 +221,7 @@ EXPORTS HPDF_UseJPFonts HPDF_UseKREncodings HPDF_UseKRFonts + HPDF_UseUTFEncodings HPDF_Annot_Set3DView HPDF_Page_Create3DView HPDF_MarkupAnnot_SetTitle From af91818ccaef7606035de9eb599dd69abd3066b5 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 30 Nov 2015 16:54:42 +0100 Subject: [PATCH 17/24] Added HPDF_Annotation_SetFlags method CapHeight attribute of Type1 fonts will now be added to the FontDescriptor --- include/hpdf.h | 4 ++++ src/hpdf_annotation.c | 9 +++++++++ src/hpdf_font_type1.c | 4 ++++ win32/mingw/libhpdf.def | 1 + win32/mingw/libhpdf_cdecl.def | 1 + win32/msvc/libhpdf.def | 1 + 6 files changed, 20 insertions(+) diff --git a/include/hpdf.h b/include/hpdf.h index b4c31320..5f9dc383 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -562,6 +562,10 @@ HPDF_Page_CreateCircleAnnot (HPDF_Page page, const char *text, HPDF_Encoder encoder); +HPDF_EXPORT(HPDF_STATUS) +HPDF_Annotation_SetFlags (HPDF_Annotation annot, + HPDF_UINT32 flags); + HPDF_EXPORT(HPDF_STATUS) HPDF_LinkAnnot_SetHighlightMode (HPDF_Annotation annot, HPDF_AnnotHighlightMode mode); diff --git a/src/hpdf_annotation.c b/src/hpdf_annotation.c index f9050061..5509fa99 100644 --- a/src/hpdf_annotation.c +++ b/src/hpdf_annotation.c @@ -328,6 +328,15 @@ HPDF_LinkAnnot_SetBorderStyle (HPDF_Annotation annot, return HPDF_OK; } +HPDF_EXPORT(HPDF_STATUS) +HPDF_Annotation_SetFlags (HPDF_Annotation annot, + HPDF_UINT32 flags) +{ + HPDF_PTRACE((" HPDF_Annotation_SetFlags\n")); + + return HPDF_Dict_AddNumber(annot, "F", flags); +} + HPDF_EXPORT(HPDF_STATUS) HPDF_LinkAnnot_SetHighlightMode (HPDF_Annotation annot, HPDF_AnnotHighlightMode mode) diff --git a/src/hpdf_font_type1.c b/src/hpdf_font_type1.c index b6716c4c..347a5d2c 100644 --- a/src/hpdf_font_type1.c +++ b/src/hpdf_font_type1.c @@ -180,6 +180,10 @@ Type1Font_CreateDescriptor (HPDF_MMgr mmgr, ret += HPDF_Dict_AddName (descriptor, "Type", "FontDescriptor"); ret += HPDF_Dict_AddNumber (descriptor, "Ascent", def->ascent); ret += HPDF_Dict_AddNumber (descriptor, "Descent", def->descent); + if (def->cap_height) + { + ret += HPDF_Dict_AddNumber (descriptor, "CapHeight", def->cap_height); + } ret += HPDF_Dict_AddNumber (descriptor, "Flags", def->flags); array = HPDF_Box_Array_New (mmgr, def->font_bbox); diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index c43be1db..f0233028 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -58,6 +58,7 @@ EXPORTS HPDF_Image_SetMaskImage@8 = HPDF_Image_SetMaskImage HPDF_Image_SetMask@8 = HPDF_Image_SetMask HPDF_InsertPage@8 = HPDF_InsertPage + HPDF_Annotation_SetFlags@8 = HPDF_Annotation_SetFlags HPDF_LinkAnnot_SetBorderStyle@16 = HPDF_LinkAnnot_SetBorderStyle HPDF_LinkAnnot_SetHighlightMode@8 = HPDF_LinkAnnot_SetHighlightMode HPDF_LoadJpegImageFromFile@8 = HPDF_LoadJpegImageFromFile diff --git a/win32/mingw/libhpdf_cdecl.def b/win32/mingw/libhpdf_cdecl.def index a1a97729..74899982 100644 --- a/win32/mingw/libhpdf_cdecl.def +++ b/win32/mingw/libhpdf_cdecl.def @@ -59,6 +59,7 @@ EXPORTS HPDF_Image_SetColorMask HPDF_Image_SetMaskImage HPDF_InsertPage + HPDF_Annotation_SetFlags HPDF_LinkAnnot_SetBorderStyle HPDF_LinkAnnot_SetHighlightMode HPDF_LoadJpegImageFromFile diff --git a/win32/msvc/libhpdf.def b/win32/msvc/libhpdf.def index f6525bed..70798c81 100644 --- a/win32/msvc/libhpdf.def +++ b/win32/msvc/libhpdf.def @@ -68,6 +68,7 @@ EXPORTS HPDF_Image_SetColorMask HPDF_Image_SetMaskImage HPDF_InsertPage + HPDF_Annotation_SetFlags HPDF_LinkAnnot_SetBorderStyle HPDF_LinkAnnot_SetHighlightMode HPDF_LoadJpegImageFromFile From 118cbfb388e573fd0b278c0b1f61d1b493164048 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 14 Dec 2015 15:59:55 +0100 Subject: [PATCH 18/24] Some PDF/A functions can now be cross compiled The functions HPDF_PDFA_SetPDFAConformance, HPDF_PDFA_AppendOutputIntents and HPDF_LoadIccProfileFromFile can now be cross compiled. --- script/Makefile.in | 1 + script/Makefile.mingw | 1 + script/Makefile.mingw_cross | 1 + script/Makefile.mingw_dll | 1 + script/Makefile.mingw_dll_cross | 1 + script/Makefile.msvc | 1 + script/Makefile.msvc_dll | 1 + win32/mingw/libhpdf.def | 3 +++ win32/mingw/libhpdf_cdecl.def | 3 +++ win32/msvc/libhpdf.def | 3 +++ 10 files changed, 16 insertions(+) diff --git a/script/Makefile.in b/script/Makefile.in index c5bbc3be..830bebd5 100644 --- a/script/Makefile.in +++ b/script/Makefile.in @@ -65,6 +65,7 @@ OBJS = \ src_SEP_hpdf_page_operator_OBJ_EXT \ src_SEP_hpdf_destination_OBJ_EXT \ src_SEP_hpdf_annotation_OBJ_EXT \ + src_SEP_hpdf_pdfa_OBJ_EXT \ src_SEP_hpdf_outline_OBJ_EXT \ src_SEP_hpdf_image_OBJ_EXT \ src_SEP_hpdf_encoder_jp_OBJ_EXT \ diff --git a/script/Makefile.mingw b/script/Makefile.mingw index 6b5cd45f..2f27c6d5 100644 --- a/script/Makefile.mingw +++ b/script/Makefile.mingw @@ -65,6 +65,7 @@ OBJS = \ src/hpdf_page_operator.o \ src/hpdf_destination.o \ src/hpdf_annotation.o \ + src/hpdf_pdfa.o \ src/hpdf_outline.o \ src/hpdf_image.o \ src/hpdf_encoder_jp.o \ diff --git a/script/Makefile.mingw_cross b/script/Makefile.mingw_cross index 0a11235a..da2e7860 100644 --- a/script/Makefile.mingw_cross +++ b/script/Makefile.mingw_cross @@ -65,6 +65,7 @@ OBJS = \ src/hpdf_page_operator.o \ src/hpdf_destination.o \ src/hpdf_annotation.o \ + src/hpdf_pdfa.o \ src/hpdf_outline.o \ src/hpdf_image.o \ src/hpdf_encoder_jp.o \ diff --git a/script/Makefile.mingw_dll b/script/Makefile.mingw_dll index 0a1677fa..b1a42123 100644 --- a/script/Makefile.mingw_dll +++ b/script/Makefile.mingw_dll @@ -65,6 +65,7 @@ OBJS = \ src/hpdf_page_operator.o \ src/hpdf_destination.o \ src/hpdf_annotation.o \ + src/hpdf_pdfa.o \ src/hpdf_outline.o \ src/hpdf_image.o \ src/hpdf_encoder_jp.o \ diff --git a/script/Makefile.mingw_dll_cross b/script/Makefile.mingw_dll_cross index 2bb2cbc2..0765294f 100644 --- a/script/Makefile.mingw_dll_cross +++ b/script/Makefile.mingw_dll_cross @@ -65,6 +65,7 @@ OBJS = \ src/hpdf_page_operator.o \ src/hpdf_destination.o \ src/hpdf_annotation.o \ + src/hpdf_pdfa.o \ src/hpdf_outline.o \ src/hpdf_image.o \ src/hpdf_encoder_jp.o \ diff --git a/script/Makefile.msvc b/script/Makefile.msvc index 8fb6a13a..9051000a 100644 --- a/script/Makefile.msvc +++ b/script/Makefile.msvc @@ -74,6 +74,7 @@ OBJS = \ src\hpdf_page_operator.obj \ src\hpdf_destination.obj \ src\hpdf_annotation.obj \ + src\hpdf_pdfa.obj \ src\hpdf_outline.obj \ src\hpdf_image.obj \ src\hpdf_encoder_jp.obj \ diff --git a/script/Makefile.msvc_dll b/script/Makefile.msvc_dll index d8fb3c71..df77e440 100644 --- a/script/Makefile.msvc_dll +++ b/script/Makefile.msvc_dll @@ -74,6 +74,7 @@ OBJS = \ src\hpdf_page_operator.obj \ src\hpdf_destination.obj \ src\hpdf_annotation.obj \ + src\hpdf_pdfa.obj \ src\hpdf_outline.obj \ src\hpdf_image.obj \ src\hpdf_encoder_jp.obj \ diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index f0233028..6cc58fcc 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -71,6 +71,7 @@ EXPORTS HPDF_LoadType1FontFromFile@12 = HPDF_LoadType1FontFromFile HPDF_LoadType1FontFromFile2@12 = HPDF_LoadType1FontFromFile2 HPDF_LoadType1FontFromFileNative@12 = HPDF_LoadType1FontFromFileNative + HPDF_LoadIccProfileFromFile@12 = HPDF_LoadIccProfileFromFile HPDF_New@8 = HPDF_New HPDF_NewDoc@4 = HPDF_NewDoc HPDF_NewEx@20 = HPDF_NewEx @@ -210,3 +211,5 @@ EXPORTS HPDF_UseKREncodings@4 = HPDF_UseKREncodings HPDF_UseKRFonts@4 = HPDF_UseKRFonts HPDF_UseUTFEncodings@4 = HPDF_UseUTFEncodings + HPDF_PDFA_SetPDFAConformance@8 = HPDF_PDFA_SetPDFAConformance + HPDF_PDFA_AppendOutputIntents@12 = HPDF_PDFA_AppendOutputIntents diff --git a/win32/mingw/libhpdf_cdecl.def b/win32/mingw/libhpdf_cdecl.def index 74899982..3905495a 100644 --- a/win32/mingw/libhpdf_cdecl.def +++ b/win32/mingw/libhpdf_cdecl.def @@ -72,6 +72,7 @@ EXPORTS HPDF_LoadTTFontFromFile HPDF_LoadTTFontFromFile2 HPDF_LoadType1FontFromFile + HPDF_LoadIccProfileFromFile HPDF_New HPDF_NewDoc HPDF_NewEx @@ -247,3 +248,5 @@ EXPORTS HPDF_Page_CreateCircleAnnot HPDF_Page_CreateSquareAnnot HPDF_Annotation_SetBorderStyle + HPDF_PDFA_SetPDFAConformance + HPDF_PDFA_AppendOutputIntents diff --git a/win32/msvc/libhpdf.def b/win32/msvc/libhpdf.def index 70798c81..93bc6305 100644 --- a/win32/msvc/libhpdf.def +++ b/win32/msvc/libhpdf.def @@ -82,6 +82,7 @@ EXPORTS HPDF_LoadTTFontFromFile2 HPDF_LoadType1FontFromFile HPDF_LoadU3DFromFile + HPDF_LoadIccProfileFromFile HPDF_New HPDF_NewDoc HPDF_NewEx @@ -261,3 +262,5 @@ EXPORTS HPDF_Page_CreateCircleAnnot HPDF_Page_CreateSquareAnnot HPDF_Annotation_SetBorderStyle + HPDF_PDFA_SetPDFAConformance + HPDF_PDFA_AppendOutputIntents From 2e425170ea1359b151159b0a32678442d60130b8 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 10 Feb 2016 10:27:35 +0100 Subject: [PATCH 19/24] Added mingw64 makefiles --- script/Makefile.mingw64_cross | 230 ++++++++++++++++++++++++++++++ script/Makefile.mingw64_dll_cross | 229 +++++++++++++++++++++++++++++ 2 files changed, 459 insertions(+) create mode 100755 script/Makefile.mingw64_cross create mode 100755 script/Makefile.mingw64_dll_cross diff --git a/script/Makefile.mingw64_cross b/script/Makefile.mingw64_cross new file mode 100755 index 00000000..a15dd536 --- /dev/null +++ b/script/Makefile.mingw64_cross @@ -0,0 +1,230 @@ +# makefile for Haru Free PDFLibrary II (Libharu) +# Copyright (C) 1999-2006 Takeshi Kanno +# For conditions of distribution and use, see copyright notice in hpdf.h +# +# To compile, type: +# ./configure; make +# If you wish to build zlib as a shared library, use: ./configure -s +# To install /usr/local/lib/libhpdf.* and /usr/local/include/hpdf.h, type: +# make install +# To install in $HOME instead of /usr/local, use: +# make install prefix=$HOME + +CC=x86_64-w64-mingw32-gcc +PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw + +LIBNAME=libhpdf.a +SONAME=libhpdf.dll +SOVER1=.1 +SOVER2=.0.0 +LIBTARGET=libhpdf.a +CFLAGS=-Iinclude -O2 -Wall -Iwin32/include +CFLAGS_DEMO=-Iinclude -O2 -Wall +CFLAGS_EXE=-o +LDFLAGS=-L. -lpng -lz +LDFLAGS_DEMO1= +LDFLAGS_DEMO2=-Lwin32/mingw -L. -lhpdf -lpng -lz +DEFNAME=win32/mingw/libhpdf.def +RESNAME= + +OBJS = \ + src/hpdf_utils.o \ + src/hpdf_error.o \ + src/hpdf_mmgr.o \ + src/hpdf_list.o \ + src/hpdf_streams.o \ + src/hpdf_objects.o \ + src/hpdf_null.o \ + src/hpdf_boolean.o \ + src/hpdf_number.o \ + src/hpdf_real.o \ + src/hpdf_name.o \ + src/hpdf_array.o \ + src/hpdf_dict.o \ + src/hpdf_xref.o \ + src/hpdf_encoder.o \ + src/hpdf_string.o \ + src/hpdf_binary.o \ + src/hpdf_encrypt.o \ + src/hpdf_encryptdict.o \ + src/hpdf_fontdef.o \ + src/hpdf_fontdef_tt.o \ + src/hpdf_fontdef_type1.o \ + src/hpdf_fontdef_base14.o \ + src/hpdf_fontdef_cid.o \ + src/hpdf_font.o \ + src/hpdf_font_type1.o \ + src/hpdf_font_tt.o \ + src/hpdf_font_cid.o \ + src/hpdf_doc.o \ + src/hpdf_info.o \ + src/hpdf_catalog.o \ + src/hpdf_page_label.o\ + src/hpdf_gstate.o \ + src/hpdf_pages.o \ + src/hpdf_page_operator.o \ + src/hpdf_destination.o \ + src/hpdf_annotation.o \ + src/hpdf_pdfa.o \ + src/hpdf_outline.o \ + src/hpdf_image.o \ + src/hpdf_encoder_jp.o \ + src/hpdf_encoder_kr.o \ + src/hpdf_encoder_cns.o \ + src/hpdf_encoder_cnt.o \ + src/hpdf_encoder_utf.o \ + src/hpdf_fontdef_jp.o \ + src/hpdf_fontdef_kr.o \ + src/hpdf_fontdef_cns.o \ + src/hpdf_fontdef_cnt.o \ + src/hpdf_image_png.o \ + src/hpdf_image_ccitt.o \ + src/hpdf_doc_png.o \ + src/hpdf_ext_gstate.o \ + src/hpdf_3dmeasure.o \ + src/hpdf_exdata.o \ + src/hpdf_namedict.o \ + src/hpdf_u3d.o \ + +PROGRAMS = \ + demo/encoding_list.exe \ + demo/font_demo.exe \ + demo/text_demo.exe \ + demo/text_demo2.exe \ + demo/image_demo.exe \ + demo/jpeg_demo.exe \ + demo/jpfont_demo.exe \ + demo/line_demo.exe \ + demo/link_annotation.exe \ + demo/outline_demo.exe \ + demo/png_demo.exe \ + demo/text_annotation.exe \ + demo/ttfont_demo.exe \ + demo/character_map.exe \ + demo/grid_sheet.exe \ + demo/arc_demo.exe \ + demo/raw_image_demo.exe \ + demo/encryption.exe \ + demo/permission.exe \ + demo/slide_show_demo.exe \ + demo/ext_gstate_demo.exe \ + +.SUFFIXES: .c .o + +all: $(LIBTARGET) + +$(LIBNAME): $(OBJS) + ar rc $(LIBNAME) $(OBJS) + ranlib $(LIBNAME) + +$(SONAME): $(OBJS) + $(CC) -Wall -shared -o $(SONAME) $(OBJS) $(DEFNAME) $(RESNAME) -Wl,--kill-at,--enable-stdcall-fixup $(LDFLAGS) + x86_64-w64-mingw32-dlltool -k -d $(DEFNAME) -l $(LIBNAME) + strip $(SONAME) + cp -p $(SONAME) demo + + +demo: $(LIBTARGET) $(PROGRAMS) + +clean: + rm -f src/*.o src/*.obj ./*.a ./*.so* ./*.lib demo/*.exe + +install: all installfiles + +installfiles: + if [ ! -d $(PREFIX) ]; then mkdir -p $(PREFIX); fi + if [ ! -d $(PREFIX)/include ]; then mkdir -p $(PREFIX)/include; fi + if [ ! -d $(PREFIX)/lib ]; then mkdir -p $(PREFIX)/lib; fi + cp -p $(SONAME) $(PREFIX)/bin/ + cp include/hpdf*.h $(PREFIX)/include/; chmod 644 $(PREFIX)/include/hpdf*.h + cp -p $(LIBNAME) $(PREFIX)/lib/ + + + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $*.c + +demo/encoding_list.exe : demo/encoding_list.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encoding_list.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encoding_list.exe + +demo/font_demo.exe : demo/font_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/font_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./font_demo.exe + +demo/text_demo.exe : demo/text_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo.exe + +demo/text_demo2.exe : demo/text_demo2.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo2.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo2.exe + +demo/image_demo.exe : demo/image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./image_demo.exe + +demo/jpeg_demo.exe : demo/jpeg_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpeg_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpeg_demo.exe + +demo/jpfont_demo.exe : demo/jpfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpfont_demo.exe + +demo/line_demo.exe : demo/line_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/line_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./line_demo.exe + +demo/link_annotation.exe : demo/link_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/link_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./link_annotation.exe + +demo/outline_demo.exe : demo/outline_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/outline_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./outline_demo.exe + +demo/png_demo.exe : demo/png_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/png_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./png_demo.exe + +demo/text_annotation.exe : demo/text_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_annotation.exe + +demo/encryption.exe : demo/encryption.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encryption.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encryption.exe + +demo/permission.exe : demo/permission.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/permission.c $(LDFLAGS_DEMO2) + cd demo/ ; ./permission.exe + +demo/ttfont_demo.exe : demo/ttfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ttfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ttfont_demo.exe ttfont/PenguinAttack.ttf -E + +demo/character_map.exe : demo/character_map.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/character_map.c $(LDFLAGS_DEMO2) + +demo/raw_image_demo.exe : demo/raw_image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/raw_image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./raw_image_demo.exe + +demo/arc_demo.exe : demo/arc_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/arc_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./arc_demo.exe + +demo/grid_sheet.exe : demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) -DSTAND_ALONE $(LDFLAGS_DEMO1) demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./grid_sheet.exe + +demo/slide_show_demo.exe : demo/slide_show_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/slide_show_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./slide_show_demo.exe + +demo/ext_gstate_demo.exe : demo/ext_gstate_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ext_gstate_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ext_gstate_demo.exe + + diff --git a/script/Makefile.mingw64_dll_cross b/script/Makefile.mingw64_dll_cross new file mode 100755 index 00000000..52065623 --- /dev/null +++ b/script/Makefile.mingw64_dll_cross @@ -0,0 +1,229 @@ +# makefile for Haru Free PDFLibrary II (Libharu) +# Copyright (C) 1999-2006 Takeshi Kanno +# For conditions of distribution and use, see copyright notice in hpdf.h +# +# To compile, type: +# ./configure; make +# If you wish to build zlib as a shared library, use: ./configure -s +# To install /usr/local/lib/libhpdf.* and /usr/local/include/hpdf.h, type: +# make install +# To install in $HOME instead of /usr/local, use: +# make install prefix=$HOME + +CC=x86_64-w64-mingw32-gcc +PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw + +LIBNAME=libhpdf.a +SONAME=libhpdf.dll +SOVER1=.1 +SOVER2=.0.0 +LIBTARGET=libhpdf.dll +CFLAGS=-Iinclude -O2 -Wall -Iwin32/include -DHPDF_DLL_MAKE -DHPDF_DLL_MAKE_CDECL +CFLAGS_DEMO=-Iinclude -O2 -Wall -DHPDF_DLL +CFLAGS_EXE=-o +LDFLAGS=-Lwin32/mingw -L. -lpng -lz +LDFLAGS_DEMO1= +LDFLAGS_DEMO2=-L. -lhpdf +DEFNAME=win32/mingw/libhpdf.def +RESNAME= + +OBJS = \ + src/hpdf_utils.o \ + src/hpdf_error.o \ + src/hpdf_mmgr.o \ + src/hpdf_list.o \ + src/hpdf_streams.o \ + src/hpdf_objects.o \ + src/hpdf_null.o \ + src/hpdf_boolean.o \ + src/hpdf_number.o \ + src/hpdf_real.o \ + src/hpdf_name.o \ + src/hpdf_array.o \ + src/hpdf_dict.o \ + src/hpdf_xref.o \ + src/hpdf_encoder.o \ + src/hpdf_string.o \ + src/hpdf_binary.o \ + src/hpdf_encrypt.o \ + src/hpdf_encryptdict.o \ + src/hpdf_fontdef.o \ + src/hpdf_fontdef_tt.o \ + src/hpdf_fontdef_type1.o \ + src/hpdf_fontdef_base14.o \ + src/hpdf_fontdef_cid.o \ + src/hpdf_font.o \ + src/hpdf_font_type1.o \ + src/hpdf_font_tt.o \ + src/hpdf_font_cid.o \ + src/hpdf_doc.o \ + src/hpdf_info.o \ + src/hpdf_catalog.o \ + src/hpdf_page_label.o\ + src/hpdf_gstate.o \ + src/hpdf_pages.o \ + src/hpdf_page_operator.o \ + src/hpdf_destination.o \ + src/hpdf_annotation.o \ + src/hpdf_pdfa.o \ + src/hpdf_outline.o \ + src/hpdf_image.o \ + src/hpdf_encoder_jp.o \ + src/hpdf_encoder_kr.o \ + src/hpdf_encoder_cns.o \ + src/hpdf_encoder_cnt.o \ + src/hpdf_encoder_utf.o \ + src/hpdf_fontdef_jp.o \ + src/hpdf_fontdef_kr.o \ + src/hpdf_fontdef_cns.o \ + src/hpdf_fontdef_cnt.o \ + src/hpdf_image_png.o \ + src/hpdf_image_ccitt.o \ + src/hpdf_doc_png.o \ + src/hpdf_ext_gstate.o \ + src/hpdf_namedict.o \ + src/hpdf_3dmeasure.o \ + src/hpdf_exdata.o \ + src/hpdf_u3d.o \ + +PROGRAMS = \ + demo/encoding_list.exe \ + demo/font_demo.exe \ + demo/text_demo.exe \ + demo/text_demo2.exe \ + demo/image_demo.exe \ + demo/jpeg_demo.exe \ + demo/jpfont_demo.exe \ + demo/line_demo.exe \ + demo/link_annotation.exe \ + demo/outline_demo.exe \ + demo/png_demo.exe \ + demo/text_annotation.exe \ + demo/ttfont_demo.exe \ + demo/character_map.exe \ + demo/grid_sheet.exe \ + demo/arc_demo.exe \ + demo/raw_image_demo.exe \ + demo/encryption.exe \ + demo/permission.exe \ + demo/slide_show_demo.exe \ + demo/ext_gstate_demo.exe \ + +.SUFFIXES: .c .o + +all: $(LIBTARGET) + +$(LIBNAME): $(OBJS) + ar rc $(LIBNAME) $(OBJS) + ranlib $(LIBNAME) + +$(SONAME): $(OBJS) + $(CC) -Wall -shared -o $(SONAME) $(OBJS) $(DEFNAME) $(RESNAME) -Wl,--kill-at,--enable-stdcall-fixup $(LDFLAGS) + x86_64-w64-mingw32-dlltool -k -d $(DEFNAME) -l $(LIBNAME) + strip $(SONAME) + cp -p $(SONAME) demo + + +demo: $(LIBTARGET) $(PROGRAMS) + +clean: + rm -f src/*.o src/*.obj ./*.a ./*.so* ./*.lib demo/*.exe + +install: all installfiles + +installfiles: + if [ ! -d $(PREFIX) ]; then mkdir -p $(PREFIX); fi + if [ ! -d $(PREFIX)/include ]; then mkdir -p $(PREFIX)/include; fi + if [ ! -d $(PREFIX)/lib ]; then mkdir -p $(PREFIX)/lib; fi + cp include/hpdf.h include/hpdf_consts.h include/hpdf_types.h $(PREFIX)/include/; chmod 644 $(PREFIX)/include/hpdf*.h + cp -p $(SONAME) $(PREFIX)/bin/ + cp -p $(LIBNAME) $(PREFIX)/lib/ + + +.c.o: + $(CC) -o $@ $(CFLAGS) -c $*.c + +demo/encoding_list.exe : demo/encoding_list.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encoding_list.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encoding_list.exe + +demo/font_demo.exe : demo/font_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/font_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./font_demo.exe + +demo/text_demo.exe : demo/text_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo.exe + +demo/text_demo2.exe : demo/text_demo2.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_demo2.c demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_demo2.exe + +demo/image_demo.exe : demo/image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./image_demo.exe + +demo/jpeg_demo.exe : demo/jpeg_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpeg_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpeg_demo.exe + +demo/jpfont_demo.exe : demo/jpfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/jpfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./jpfont_demo.exe + +demo/line_demo.exe : demo/line_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/line_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./line_demo.exe + +demo/link_annotation.exe : demo/link_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/link_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./link_annotation.exe + +demo/outline_demo.exe : demo/outline_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/outline_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./outline_demo.exe + +demo/png_demo.exe : demo/png_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/png_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./png_demo.exe + +demo/text_annotation.exe : demo/text_annotation.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/text_annotation.c $(LDFLAGS_DEMO2) + cd demo/ ; ./text_annotation.exe + +demo/encryption.exe : demo/encryption.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/encryption.c $(LDFLAGS_DEMO2) + cd demo/ ; ./encryption.exe + +demo/permission.exe : demo/permission.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/permission.c $(LDFLAGS_DEMO2) + cd demo/ ; ./permission.exe + +demo/ttfont_demo.exe : demo/ttfont_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ttfont_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ttfont_demo.exe ttfont/PenguinAttack.ttf -E + +demo/character_map.exe : demo/character_map.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/character_map.c $(LDFLAGS_DEMO2) + +demo/raw_image_demo.exe : demo/raw_image_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/raw_image_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./raw_image_demo.exe + +demo/arc_demo.exe : demo/arc_demo.c demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/grid_sheet.c demo/arc_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./arc_demo.exe + +demo/grid_sheet.exe : demo/grid_sheet.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) -DSTAND_ALONE $(LDFLAGS_DEMO1) demo/grid_sheet.c $(LDFLAGS_DEMO2) + cd demo/ ; ./grid_sheet.exe + +demo/slide_show_demo.exe : demo/slide_show_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/slide_show_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./slide_show_demo.exe + +demo/ext_gstate_demo.exe : demo/ext_gstate_demo.c $(LIBTARGET) + $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo/ext_gstate_demo.c $(LDFLAGS_DEMO2) + cd demo/ ; ./ext_gstate_demo.exe + + From 3e144e713cee46332f85d505c4d46b302f80288d Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 26 Feb 2016 12:36:51 +0100 Subject: [PATCH 20/24] Added methods HPDF_SetTextPlacementAccuracy and HPDF_SetWriteFontWidths HPDF_SetTextPlacementAccuracy can be used to set how many decimal places should be used when positioning text. HPDF_SetWriteFontWidths can be used to set if width entries of fonts which are not embedded should be written. --- include/hpdf.h | 8 ++++++++ include/hpdf_consts.h | 3 +++ include/hpdf_doc.h | 6 ++++++ include/hpdf_fontdef.h | 1 + include/hpdf_pages.h | 1 + include/hpdf_utils.h | 8 ++++++++ src/hpdf_doc.c | 38 +++++++++++++++++++++++++++++++++++ src/hpdf_font_type1.c | 2 +- src/hpdf_page_operator.c | 16 +++++++++++---- src/hpdf_pages.c | 11 ++++++++++ src/hpdf_utils.c | 17 +++++++++++++--- win32/mingw/libhpdf.def | 2 ++ win32/mingw/libhpdf_cdecl.def | 2 ++ win32/msvc/libhpdf.def | 2 ++ 14 files changed, 109 insertions(+), 8 deletions(-) diff --git a/include/hpdf.h b/include/hpdf.h index 5f9dc383..7ed66c79 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -1595,6 +1595,14 @@ HPDF_Page_TextField (HPDF_Page page, HPDF_Font font, HPDF_REAL font_size, HPDF_Color color); + +HPDF_EXPORT(HPDF_STATUS) +HPDF_SetTextPlacementAccuracy (HPDF_Doc pdf, + HPDF_UINT decimal_places); + +HPDF_EXPORT(HPDF_STATUS) +HPDF_SetWriteFontWidths (HPDF_Doc pdf, + HPDF_BOOL write_font_widths); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/include/hpdf_consts.h b/include/hpdf_consts.h index 78732327..0313295a 100644 --- a/include/hpdf_consts.h +++ b/include/hpdf_consts.h @@ -68,6 +68,9 @@ #define HPDF_DEF_PAGE_WIDTH 595.276F #define HPDF_DEF_PAGE_HEIGHT 841.89F +/* default decimal places for text placement accuracy */ +#define HPDF_DEF_TEXT_PLACEMENT_ACCURACY 5 + /*---------------------------------------------------------------------------*/ /*----- compression mode ----------------------------------------------------*/ diff --git a/include/hpdf_doc.h b/include/hpdf_doc.h index fcf3039d..0a8ec0af 100644 --- a/include/hpdf_doc.h +++ b/include/hpdf_doc.h @@ -63,6 +63,12 @@ typedef struct _HPDF_Doc_Rec { /* default compression mode */ HPDF_BOOL compression_mode; + /* decimal places for text placement accuracy */ + HPDF_UINT text_placement_accuracy; + + /* states if font widths will be written for fonts without font data */ + HPDF_BOOL write_font_widths; + HPDF_BOOL encrypt_on; HPDF_EncryptDict encrypt_dict; diff --git a/include/hpdf_fontdef.h b/include/hpdf_fontdef.h index d29e41b0..3fa579c2 100644 --- a/include/hpdf_fontdef.h +++ b/include/hpdf_fontdef.h @@ -151,6 +151,7 @@ typedef struct _HPDF_Type1FontDefAttrRec { HPDF_UINT length3; HPDF_BOOL is_base14font; HPDF_BOOL is_fixed_pitch; + HPDF_BOOL write_widths; HPDF_Stream font_data; } HPDF_Type1FontDefAttr_Rec; diff --git a/include/hpdf_pages.h b/include/hpdf_pages.h index 44b816c2..5265adc9 100644 --- a/include/hpdf_pages.h +++ b/include/hpdf_pages.h @@ -65,6 +65,7 @@ typedef struct _HPDF_PageAttr_Rec { HPDF_Stream stream; HPDF_Xref xref; HPDF_UINT compression_mode; + HPDF_UINT text_placement_accuracy; HPDF_PDFVer *ver; } HPDF_PageAttr_Rec; diff --git a/include/hpdf_utils.h b/include/hpdf_utils.h index 9028004a..cf1c264d 100644 --- a/include/hpdf_utils.h +++ b/include/hpdf_utils.h @@ -25,6 +25,9 @@ extern "C" { #endif /* __cplusplus */ +/* can be used for rounding to 0-5 decimal places */ +static const int HPDF_DECIMAL_ROUND_COEFFICIENT[] = {1, 10, 100, 1000, 10000, 100000}; + HPDF_INT HPDF_AToI (const char* s); @@ -50,6 +53,11 @@ HPDF_FToA (char *s, HPDF_REAL val, char *eptr); +char* +HPDF_FToA2 (char *s, + HPDF_REAL val, + char *eptr, + HPDF_UINT decimal_places); HPDF_BYTE* HPDF_MemCpy (HPDF_BYTE* out, diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index ec1d1a1a..c916266d 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -175,6 +175,9 @@ HPDF_NewEx (HPDF_Error_Handler user_error_fn, pdf->pdf_version = HPDF_VER_13; pdf->compression_mode = HPDF_COMP_NONE; + pdf->text_placement_accuracy = HPDF_DEF_TEXT_PLACEMENT_ACCURACY; + pdf->write_font_widths = HPDF_TRUE; + /* copy the data of temporary-error object to the one which is included in pdf_doc object */ pdf->error = tmp_error; @@ -342,6 +345,8 @@ HPDF_FreeDocAll (HPDF_Doc pdf) FreeEncoderList (pdf); pdf->compression_mode = HPDF_COMP_NONE; + pdf->text_placement_accuracy = HPDF_DEF_TEXT_PLACEMENT_ACCURACY; + pdf->write_font_widths = HPDF_TRUE; HPDF_Error_Reset (&pdf->error); } @@ -900,6 +905,8 @@ HPDF_AddPage (HPDF_Doc pdf) if (pdf->compression_mode & HPDF_COMP_TEXT) HPDF_Page_SetFilter (page, HPDF_STREAM_FILTER_FLATE_DECODE); + HPDF_Page_SetTextPlacementAccuracy (page, pdf->text_placement_accuracy); + pdf->cur_page_num++; return page; @@ -981,6 +988,8 @@ HPDF_InsertPage (HPDF_Doc pdf, if (pdf->compression_mode & HPDF_COMP_TEXT) HPDF_Page_SetFilter (page, HPDF_STREAM_FILTER_FLATE_DECODE); + HPDF_Page_SetTextPlacementAccuracy (page, pdf->text_placement_accuracy); + return page; } @@ -1568,6 +1577,9 @@ LoadType1FontFromStream (HPDF_Doc pdf, return NULL; } + HPDF_Type1FontDefAttr fontdef_attr = (HPDF_Type1FontDefAttr)def->attr; + fontdef_attr->write_widths = pdf->write_font_widths; + if (HPDF_List_Add (pdf->fontdef_list, def) != HPDF_OK) { HPDF_FontDef_Free (def); return NULL; @@ -2526,3 +2538,29 @@ HPDF_LoadIccProfileFromFile (HPDF_Doc pdf, return iccentry; } +HPDF_EXPORT(HPDF_STATUS) +HPDF_SetTextPlacementAccuracy (HPDF_Doc pdf, + HPDF_UINT decimal_places) +{ + if (!HPDF_HasDoc (pdf)) + return HPDF_INVALID_DOCUMENT; + + if (decimal_places > 5) + return HPDF_RaiseError (&pdf->error, HPDF_INVALID_PARAMETER, 0); + + pdf->text_placement_accuracy = decimal_places; + + return HPDF_OK; +} + +HPDF_EXPORT(HPDF_STATUS) +HPDF_SetWriteFontWidths (HPDF_Doc pdf, + HPDF_BOOL write_font_widths) +{ + if (!HPDF_HasDoc (pdf)) + return HPDF_INVALID_DOCUMENT; + + pdf->write_font_widths = write_font_widths; + + return HPDF_OK; +} diff --git a/src/hpdf_font_type1.c b/src/hpdf_font_type1.c index 347a5d2c..b13cc9fd 100644 --- a/src/hpdf_font_type1.c +++ b/src/hpdf_font_type1.c @@ -349,7 +349,7 @@ Type1Font_OnWrite (HPDF_Dict obj, HPDF_PTRACE ((" HPDF_Font_Type1Font_OnWrite\n")); /* if font is base14-font these entries is not required */ - if (!fontdef_attr->is_base14font || encoder_attr->has_differences) { + if ( ( fontdef_attr->write_widths || fontdef_attr->font_data ) && ( !fontdef_attr->is_base14font || encoder_attr->has_differences ) ) { char *pbuf; pbuf = (char *)HPDF_StrCpy (buf, "/FirstChar ", eptr); diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index d6e07101..ba05a440 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -1270,14 +1270,18 @@ HPDF_Page_MoveTextPos (HPDF_Page page, HPDF_MemSet (buf, 0, HPDF_TMP_BUF_SIZ); - pbuf = HPDF_FToA (pbuf, x, eptr); + pbuf = HPDF_FToA2 (pbuf, x, eptr, attr->text_placement_accuracy); *pbuf++ = ' '; - pbuf = HPDF_FToA (pbuf, y, eptr); + pbuf = HPDF_FToA2 (pbuf, y, eptr, attr->text_placement_accuracy); HPDF_StrCpy (pbuf, " Td\012", eptr); if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); + float round = HPDF_DECIMAL_ROUND_COEFFICIENT[attr->text_placement_accuracy]; + x = roundf(x * round) / round; + y = roundf(y * round) / round; + attr->text_matrix.x += x * attr->text_matrix.a + y * attr->text_matrix.c; attr->text_matrix.y += y * attr->text_matrix.d + x * attr->text_matrix.b; attr->text_pos.x = attr->text_matrix.x; @@ -1307,14 +1311,18 @@ HPDF_Page_MoveTextPos2 (HPDF_Page page, HPDF_MemSet (buf, 0, HPDF_TMP_BUF_SIZ); - pbuf = HPDF_FToA (pbuf, x, eptr); + pbuf = HPDF_FToA2 (pbuf, x, eptr, attr->text_placement_accuracy); *pbuf++ = ' '; - pbuf = HPDF_FToA (pbuf, y, eptr); + pbuf = HPDF_FToA2 (pbuf, y, eptr, attr->text_placement_accuracy); HPDF_StrCpy (pbuf, " TD\012", eptr); if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); + float round = HPDF_DECIMAL_ROUND_COEFFICIENT[attr->text_placement_accuracy]; + x = roundf(x * round) / round; + y = roundf(y * round) / round; + attr->text_matrix.x += x * attr->text_matrix.a + y * attr->text_matrix.c; attr->text_matrix.y += y * attr->text_matrix.d + x * attr->text_matrix.b; attr->text_pos.x = attr->text_matrix.x; diff --git a/src/hpdf_pages.c b/src/hpdf_pages.c index d82f3f15..36904f3c 100644 --- a/src/hpdf_pages.c +++ b/src/hpdf_pages.c @@ -1981,3 +1981,14 @@ HPDF_Page_SetFilter (HPDF_Page page, attr->contents->filter = filter; } +void +HPDF_Page_SetTextPlacementAccuracy (HPDF_Page page, + HPDF_UINT decimal_places) +{ + HPDF_PageAttr attr; + + HPDF_PTRACE((" HPDF_Page_SetTextPlacementAccuracy\n")); + + attr = (HPDF_PageAttr)page->attr; + attr->text_placement_accuracy = decimal_places; +} diff --git a/src/hpdf_utils.c b/src/hpdf_utils.c index 728da5a8..59fcb806 100644 --- a/src/hpdf_utils.c +++ b/src/hpdf_utils.c @@ -181,6 +181,16 @@ char* HPDF_FToA (char *s, HPDF_REAL val, char *eptr) +{ + return HPDF_FToA2 (s, val, eptr, HPDF_DEF_TEXT_PLACEMENT_ACCURACY); +} + + +char* +HPDF_FToA2 (char *s, + HPDF_REAL val, + char *eptr, + HPDF_UINT decimal_places) { HPDF_INT32 int_val; HPDF_INT32 fpart_val; @@ -204,11 +214,12 @@ HPDF_FToA (char *s, } /* separate an integer part and a decimal part. */ - int_val = (HPDF_INT32)(val + 0.000005); - fpart_val = (HPDF_INT32)((HPDF_REAL)(val - int_val + 0.000005) * 100000); + HPDF_REAL round = 0.5f / HPDF_DECIMAL_ROUND_COEFFICIENT[decimal_places]; + int_val = (HPDF_INT32)(val + round); + fpart_val = (HPDF_INT32)((HPDF_REAL)(val - int_val + round) * HPDF_DECIMAL_ROUND_COEFFICIENT[decimal_places]); /* process decimal part */ - for (i = 0; i < 5; i++) { + for (i = 0; i < decimal_places; i++) { *t = (char)((char)(fpart_val % 10) + '0'); fpart_val /= 10; t--; diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index 6cc58fcc..51c3bde2 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -188,6 +188,8 @@ EXPORTS HPDF_SaveToFile@8 = HPDF_SaveToFile HPDF_SaveToStream@4 = HPDF_SaveToStream HPDF_SetCompressionMode@8 = HPDF_SetCompressionMode + HPDF_SetTextPlacementAccuracy@8 = HPDF_SetTextPlacementAccuracy + HPDF_SetWriteFontWidths@8 = HPDF_SetWriteFontWidths HPDF_SetCurrentEncoder@8 = HPDF_SetCurrentEncoder HPDF_SetEncryptionMode@12 = HPDF_SetEncryptionMode HPDF_SetErrorHandler@8 = HPDF_SetErrorHandler diff --git a/win32/mingw/libhpdf_cdecl.def b/win32/mingw/libhpdf_cdecl.def index 3905495a..35a1d429 100644 --- a/win32/mingw/libhpdf_cdecl.def +++ b/win32/mingw/libhpdf_cdecl.def @@ -187,6 +187,8 @@ EXPORTS HPDF_SaveToFile HPDF_SaveToStream HPDF_SetCompressionMode + HPDF_SetTextPlacementAccuracy + HPDF_SetWriteFontWidths HPDF_SetCurrentEncoder HPDF_SetEncryptionMode HPDF_SetErrorHandler diff --git a/win32/msvc/libhpdf.def b/win32/msvc/libhpdf.def index 93bc6305..0535c6c1 100644 --- a/win32/msvc/libhpdf.def +++ b/win32/msvc/libhpdf.def @@ -199,6 +199,8 @@ EXPORTS HPDF_SaveToFile HPDF_SaveToStream HPDF_SetCompressionMode + HPDF_SetTextPlacementAccuracy + HPDF_SetWriteFontWidths HPDF_SetCurrentEncoder HPDF_SetEncryptionMode HPDF_SetErrorHandler From 78f859b064ff6dbd942ff2ff988b490c47c9983a Mon Sep 17 00:00:00 2001 From: Wolfgang Dechow Date: Thu, 25 Aug 2016 18:29:52 +0200 Subject: [PATCH 21/24] fixed segfault in LoadType1FontFromStream2 correct length used for realloc realloc uses correct length --- src/hpdf_doc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index c916266d..43136245 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -1605,11 +1605,17 @@ LoadType1FontFromStream2 (HPDF_Doc pdf, def = HPDF_Type1FontDef_Load (pdf->mmgr, afmdata, NULL, HPDF_FALSE); if (def) { - char newname[] = "HPDF_"; - if(font_name) + char *newname; + newname = (char *)malloc( 6 ); + strcpy( newname, "HPDF_" ); + + if(font_name) { + newname = (char *)realloc( newname, strlen( newname ) + strlen( font_name ) + 1 ); strcat(newname, font_name); - else + } else { + newname = (char *)realloc( newname, strlen( newname ) + strlen( def->base_font ) + 1 ); strcat(newname, def->base_font); + } HPDF_StrCpy (def->base_font, newname, def->base_font + HPDF_LIMIT_MAX_NAME_LEN); def->is_form_font = HPDF_TRUE; From 9515ac71f9a15374aab86c6482b0b194a4400b83 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 30 Nov 2016 12:13:13 +0100 Subject: [PATCH 22/24] AFM files with CharMetrics lines that contain more than 512 charaters can now be read --- src/hpdf_fontdef_type1.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/hpdf_fontdef_type1.c b/src/hpdf_fontdef_type1.c index caefb094..53bedaef 100644 --- a/src/hpdf_fontdef_type1.c +++ b/src/hpdf_fontdef_type1.c @@ -252,8 +252,19 @@ LoadAfm (HPDF_FontDef fontdef, HPDF_INT16 unicode = 0; len = HPDF_TMP_BUF_SIZ; - if ((ret = HPDF_Stream_ReadLn (stream, buf, &len)) != HPDF_OK) - return ret; + if ((ret = HPDF_Stream_ReadLn (stream, buf, &len)) != HPDF_OK) { + if (ret == HPDF_STREAM_READLN_CONTINUE) { + /* Skip the rest of the line */ + char skip[HPDF_TMP_BUF_SIZ]; + while ((ret = HPDF_Stream_ReadLn (stream, skip, &len)) == HPDF_STREAM_READLN_CONTINUE); + + if (ret != HPDF_OK) { + return ret; + } + } else { + return ret; + } + } /* C default character code. */ s = GetKeyword (buf, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); From d4a2efc74a95a2a9f5fd07c85ef4d3c234650e29 Mon Sep 17 00:00:00 2001 From: docTYPE Compile Date: Mon, 23 Jan 2017 12:00:37 +0100 Subject: [PATCH 23/24] Added functions for cross compilation HPDF_Page_New_Content_Stream HPDF_Page_Insert_Shared_Content_Stream --- win32/mingw/libhpdf.def | 2 ++ win32/mingw/libhpdf_cdecl.def | 2 ++ win32/msvc/libhpdf.def | 2 ++ 3 files changed, 6 insertions(+) diff --git a/win32/mingw/libhpdf.def b/win32/mingw/libhpdf.def index 51c3bde2..361358ec 100644 --- a/win32/mingw/libhpdf.def +++ b/win32/mingw/libhpdf.def @@ -139,12 +139,14 @@ EXPORTS HPDF_Page_GetWordSpace@4 = HPDF_Page_GetWordSpace HPDF_Page_GRestore@4 = HPDF_Page_GRestore HPDF_Page_GSave@4 = HPDF_Page_GSave + HPDF_Page_Insert_Shared_Content_Stream@8 = HPDF_Page_Insert_Shared_Content_Stream HPDF_Page_LineTo@12 = HPDF_Page_LineTo HPDF_Page_MeasureText@20 = HPDF_Page_MeasureText HPDF_Page_MoveTextPos@12 = HPDF_Page_MoveTextPos HPDF_Page_MoveTextPos2@12 = HPDF_Page_MoveTextPos2 HPDF_Page_MoveTo@12 = HPDF_Page_MoveTo HPDF_Page_MoveToNextLine@4 = HPDF_Page_MoveToNextLine + HPDF_Page_New_Content_Stream@8 = HPDF_Page_New_Content_Stream HPDF_Page_Rectangle@20 = HPDF_Page_Rectangle HPDF_Page_SetCharSpace@8 = HPDF_Page_SetCharSpace HPDF_Page_SetCMYKFill@20 = HPDF_Page_SetCMYKFill diff --git a/win32/mingw/libhpdf_cdecl.def b/win32/mingw/libhpdf_cdecl.def index 35a1d429..b392fc56 100644 --- a/win32/mingw/libhpdf_cdecl.def +++ b/win32/mingw/libhpdf_cdecl.def @@ -139,12 +139,14 @@ EXPORTS HPDF_Page_GetWordSpace HPDF_Page_GRestore HPDF_Page_GSave + HPDF_Page_Insert_Shared_Content_Stream HPDF_Page_LineTo HPDF_Page_MeasureText HPDF_Page_MoveTextPos HPDF_Page_MoveTextPos2 HPDF_Page_MoveTo HPDF_Page_MoveToNextLine + HPDF_Page_New_Content_Stream HPDF_Page_Rectangle HPDF_Page_SetCharSpace HPDF_Page_SetCMYKFill diff --git a/win32/msvc/libhpdf.def b/win32/msvc/libhpdf.def index 0535c6c1..0384c576 100644 --- a/win32/msvc/libhpdf.def +++ b/win32/msvc/libhpdf.def @@ -151,12 +151,14 @@ EXPORTS HPDF_Page_GetTransMatrix HPDF_Page_GetWidth HPDF_Page_GetWordSpace + HPDF_Page_Insert_Shared_Content_Stream HPDF_Page_LineTo HPDF_Page_MeasureText HPDF_Page_MoveTextPos HPDF_Page_MoveTextPos2 HPDF_Page_MoveTo HPDF_Page_MoveToNextLine + HPDF_Page_New_Content_Stream HPDF_Page_Rectangle HPDF_Page_SetCMYKFill HPDF_Page_SetCMYKStroke From 0fff0400fe15e3adf2acef8c410eb4a4833a73d4 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 16 Oct 2013 12:09:38 +0400 Subject: [PATCH 24/24] support huge fonts (patch by Alan W. Irwin) --- include/hpdf_consts.h | 2 +- src/hpdf_page_operator.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hpdf_consts.h b/include/hpdf_consts.h index 0313295a..602a6dbe 100644 --- a/include/hpdf_consts.h +++ b/include/hpdf_consts.h @@ -148,7 +148,7 @@ #define HPDF_MAX_WORDSPACE 300 #define HPDF_MIN_CHARSPACE -30 #define HPDF_MAX_CHARSPACE 300 -#define HPDF_MAX_FONTSIZE 300 +#define HPDF_MAX_FONTSIZE 600 #define HPDF_MAX_ZOOMSIZE 10 #define HPDF_MAX_LEADING 300 #define HPDF_MAX_LINEWIDTH 100 diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index ba05a440..340a754f 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -1151,7 +1151,7 @@ HPDF_Page_SetFontAndSize (HPDF_Page page, return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT, 0); if (size <= 0 || size > HPDF_MAX_FONTSIZE) - return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT_SIZE, 0); + return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT_SIZE, size); if (page->mmgr != font->mmgr) return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT, 0);