Navigation Menu

Skip to content

Commit

Permalink
support more true type fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
Koen Deforche committed Feb 21, 2011
1 parent 69c5540 commit 5490f3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/hpdf_consts.h
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/hpdf_fontdef_tt.c
Expand Up @@ -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"));

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5490f3d

Please sign in to comment.