Search code examples
fontsghostscriptpostscripttruetype

What is structure of TrueType cid file


I want to read true type CID font file. Can any one guide me about the file structure. How can I read sfnts array correctly? Is there any open source library available in C++ through which I can read the CID keyed TrueType file?


Solution

  • A Google search will find you the relevant documents for CIDFonts;

    • Adobe Technical Note 5092 - CID-Keyed Font Technology Overview
    • Adobe Technical Specification 5174 - CID-Keyed Font Installation for PostScript
    • Adobe Technical Specification 5014 - Adobe CMap and CIDFont Files Specification

    The sfnts array is just an array, you read it like any other PostScript array. What it contains is the TrueType outlines of the glyphs and other TrueType information. This is documented in:

    • Adobe Tech Note 5012 - The Type 42 Font Format Specification

    Unless you already have it you will also need the TrueType specification.

    The FreeType Project FreeType library will read all kinds of fonts. Its not C++, its C, but that should be comprehensible enough to a C++ developer.