Question
Self-written program cannot convert Truetype to Type 42 fonts
I wrote a C program these days to convert a Truetype font into Type 42 format (without doing any tests). The ps2pdf program (in GPL Ghostscript) generates an "invalidfont" error.
Error: /invalidfont in definefont
Operand stack:
FZSSK--GBK1-0 --dict:10/11(L)-- Font
Execution stack:
%interp_exit .runexec2 --nostringval-- definefont --nostringval-- 2 %stopped_push --nostringval-- definefont definefont false 1 %stopped_push 2077 1 3 %oparray_pop 2076 1 3 %oparray_pop 2057 1 3 %oparray_pop 1916 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- definefont --nostringval-- 2 %stopped_push --nostringval-- 2005 2 3 %oparray_pop
Dictionary stack:
--dict:966/1684(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)--
Current allocation mode is local
Current file position is 20175127
GPL Ghostscript 9.26: Unrecoverable error, exit code 1The postscript file generated can be found at
https://drive.google.com/file/d/1u184Si4c8Ja7KQ0heMuUB_-3goCUN6Z9/view?usp=sharing.
