Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

support more true type fonts

  • Loading branch information...
commit 5490f3d0ccfff6190cb085c6c5d89c08c1fbd42f 1 parent 69c5540
Koen Deforche authored
Showing with 7 additions and 1 deletion.
  1. +1 −1  include/hpdf_consts.h
  2. +6 −0 src/hpdf_fontdef_tt.c
View
2  include/hpdf_consts.h
@@ -115,7 +115,7 @@
#define HPDF_LIMIT_MAX_STRING_LEN 65535
#define HPDF_LIMIT_MAX_NAME_LEN 127
-#define HPDF_LIMIT_MAX_ARRAY 8191
+#define HPDF_LIMIT_MAX_ARRAY 32767
#define HPDF_LIMIT_MAX_DICT_ELEMENT 4095
#define HPDF_LIMIT_MAX_XREF_ELEMENT 8388607
#define HPDF_LIMIT_MAX_GSTATE 28
View
6 src/hpdf_fontdef_tt.c
@@ -1959,6 +1959,9 @@ HPDF_TTFontDef_SaveFontData (HPDF_FontDef fontdef,
HPDF_STATUS ret;
HPDF_UINT32 offset_base;
HPDF_UINT32 tmp_check_sum = 0xB1B0AFBA;
+ HPDF_TTFTable emptyTable;
+ emptyTable.length = 0;
+ emptyTable.offset = 0;
HPDF_PTRACE ((" SaveFontData\n"));
@@ -1991,6 +1994,9 @@ HPDF_TTFontDef_SaveFontData (HPDF_FontDef fontdef,
HPDF_UINT32 *poffset;
HPDF_UINT32 value;
+ if (!tbl)
+ tbl = &emptyTable;
+
if (!tbl) {
ret = HPDF_SetError (fontdef->error, HPDF_TTF_MISSING_TABLE, i);
goto Exit;
Please sign in to comment.
Something went wrong with that request. Please try again.