freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Type1 header format checking


From: Ammar ul hassan
Subject: [ft] Type1 header format checking
Date: Thu, 1 Jun 2017 14:10:34 +0900

HI!

I am working on understanding the code flow of how Type1 driver actually
checks header format before doing parsing.

The T1_New_Parser function is responsible for parsing .PFA or .PFB files.
This function contains another function check_type1_format that actually
checks the header format before parsing. What i understand till now is that
every type 1 postscript font file starts with some text like
"%!PS-AdobeFont" which has length 14 characters.

This check_type1_format function contains other functions
like FT_STREAM_SEEK, read_pfb_tag, FT_FRAME_ENTER, ft_memcmp. 1) Is there
any documentation about these functions as i am unable to track them and
know what they are actually doing? 2) if i am wrong than how is this,
checking header format part working in Type1 driver.

What i want to do for my understanding is that i will modify first few
bytes of .pfb file with some random text and than edit the type1 driver
code to check if it successfully reads and parse i.e. changing something
like %!PS-AdobeFont to %!PS-CustomFont with header length 15 in this case.

Thanks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]