summaryrefslogtreecommitdiff
path: root/gs/src/ttload.c
diff options
context:
space:
mode:
Diffstat (limited to 'gs/src/ttload.c')
-rw-r--r--gs/src/ttload.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gs/src/ttload.c b/gs/src/ttload.c
index 97fe284dd..2773baec8 100644
--- a/gs/src/ttload.c
+++ b/gs/src/ttload.c
@@ -138,9 +138,11 @@
face->cvtSize = 300; /* Work around DynaLab bug in DingBat1. */
#endif
- face->cvt = mem->alloc_bytes(mem, face->cvtSize * sizeof(Short), "Load_TrueType_CVT");
- if (!face->cvt)
- return TT_Err_Out_Of_Memory;
+ if(face->cvtSize > 0) { /* allow fonts with a CVT table */
+ face->cvt = mem->alloc_bytes(mem, face->cvtSize * sizeof(Short), "Load_TrueType_CVT");
+ if (!face->cvt)
+ return TT_Err_Out_Of_Memory;
+ }
limit = face->cvtSize;