zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cffload.c File Reference
#include <ft2build.h>
#include <FT_INTERNAL_DEBUG_H>
#include <FT_INTERNAL_OBJECTS_H>
#include <FT_INTERNAL_STREAM_H>
#include <FT_TRUETYPE_TAGS_H>
#include <FT_TYPE1_TABLES_H>
#include "cffload.h"
#include "cffparse.h"
#include "cfferrs.h"

Go to the source code of this file.

Macros

#define FT_COMPONENT   trace_cffload
 
#define FT_STRUCTURE   CFF_FontRec
 

Functions

 cff_charset_cid_to_gindex (CFF_Charset charset, FT_UInt cid)
 
static FT_Error cff_charset_compute_cids (CFF_Charset charset, FT_UInt num_glyphs, FT_Memory memory)
 
static void cff_charset_done (CFF_Charset charset, FT_Stream stream)
 
static void cff_charset_free_cids (CFF_Charset charset, FT_Memory memory)
 
static FT_Error cff_charset_load (CFF_Charset charset, FT_UInt num_glyphs, FT_Stream stream, FT_ULong base_offset, FT_ULong offset, FT_Bool invert)
 
static void CFF_Done_FD_Select (CFF_FDSelect fdselect, FT_Stream stream)
 
static void cff_encoding_done (CFF_Encoding encoding)
 
static FT_Error cff_encoding_load (CFF_Encoding encoding, CFF_Charset charset, FT_UInt num_glyphs, FT_Stream stream, FT_ULong base_offset, FT_ULong offset)
 
 cff_fd_select_get (CFF_FDSelect fdselect, FT_UInt glyph_index)
 
 cff_font_done (CFF_Font font)
 
 cff_font_load (FT_Library library, FT_Stream stream, FT_Int face_index, CFF_Font font, FT_Bool pure_cff)
 
 cff_get_standard_encoding (FT_UInt charcode)
 
 cff_index_access_element (CFF_Index idx, FT_UInt element, FT_Byte **pbytes, FT_ULong *pbyte_len)
 
static void cff_index_done (CFF_Index idx)
 
 cff_index_forget_element (CFF_Index idx, FT_Byte **pbytes)
 
 cff_index_get_name (CFF_Font font, FT_UInt element)
 
static FT_Error cff_index_get_pointers (CFF_Index idx, FT_Byte ***table, FT_Byte **pool)
 
 cff_index_get_sid_string (CFF_Font font, FT_UInt sid)
 
 cff_index_get_string (CFF_Font font, FT_UInt element)
 
static FT_Error cff_index_init (CFF_Index idx, FT_Stream stream, FT_Bool load)
 
static FT_Error cff_index_load_offsets (CFF_Index idx)
 
static FT_ULong cff_index_read_offset (CFF_Index idx, FT_Error *errorp)
 
static FT_Error CFF_Load_FD_Select (CFF_FDSelect fdselect, FT_UInt num_glyphs, FT_Stream stream, FT_ULong offset)
 
static void cff_subfont_done (FT_Memory memory, CFF_SubFont subfont)
 
static FT_Error cff_subfont_load (CFF_SubFont font, CFF_Index idx, FT_UInt font_index, FT_Stream stream, FT_ULong base_offset, FT_Library library)
 

Variables

static const FT_UShort cff_expert_charset [166]
 
static const FT_UShort cff_expert_encoding [256]
 
static const FT_UShort cff_expertsubset_charset [87]
 
static const FT_UShort cff_isoadobe_charset [229]
 
static const FT_UShort cff_standard_encoding [256]
 

Macro Definition Documentation

#define FT_COMPONENT   trace_cffload

Definition at line 197 of file cffload.c.

#define FT_STRUCTURE   CFF_FontRec

Function Documentation

cff_charset_cid_to_gindex ( CFF_Charset  charset,
FT_UInt  cid 
)

Definition at line 816 of file cffload.c.

Referenced by cff_encoding_load(), and cff_slot_load().

static FT_Error cff_charset_compute_cids ( CFF_Charset  charset,
FT_UInt  num_glyphs,
FT_Memory  memory 
)
static
static void cff_charset_done ( CFF_Charset  charset,
FT_Stream  stream 
)
static
static void cff_charset_free_cids ( CFF_Charset  charset,
FT_Memory  memory 
)
static

Definition at line 830 of file cffload.c.

References CFF_CharsetRec_::cids, FT_FREE, and CFF_CharsetRec_::max_cid.

Referenced by cff_charset_done().

static void CFF_Done_FD_Select ( CFF_FDSelect  fdselect,
FT_Stream  stream 
)
static
static void cff_encoding_done ( CFF_Encoding  encoding)
static

Definition at line 1044 of file cffload.c.

References CFF_EncodingRec_::count, CFF_EncodingRec_::format, and CFF_EncodingRec_::offset.

Referenced by cff_font_done().

cff_fd_select_get ( CFF_FDSelect  fdselect,
FT_UInt  glyph_index 
)

Definition at line 708 of file cffload.c.

References FT_NEXT_USHORT.

Referenced by cff_decoder_prepare(), and cff_slot_load().

cff_font_done ( CFF_Font  font)
cff_get_standard_encoding ( FT_UInt  charcode)

Definition at line 183 of file cffload.c.

References cff_standard_encoding.

Referenced by cff_lookup_glyph_by_stdcharcode().

cff_index_access_element ( CFF_Index  idx,
FT_UInt  element,
FT_Byte **  pbytes,
FT_ULong pbyte_len 
)
static void cff_index_done ( CFF_Index  idx)
static

Definition at line 301 of file cffload.c.

References FT_FRAME_RELEASE, FT_FREE, FT_MEM_ZERO, and FT_StreamRec_::memory.

Referenced by cff_font_done(), cff_font_load(), and cff_subfont_done().

cff_index_forget_element ( CFF_Index  idx,
FT_Byte **  pbytes 
)

Definition at line 567 of file cffload.c.

References FT_FRAME_RELEASE.

Referenced by cff_free_glyph_data(), cff_index_get_name(), and cff_subfont_load().

cff_index_get_name ( CFF_Font  font,
FT_UInt  element 
)
static FT_Error cff_index_get_pointers ( CFF_Index  idx,
FT_Byte ***  table,
FT_Byte **  pool 
)
static

Definition at line 383 of file cffload.c.

References cff_index_load_offsets(), error, FT_ALLOC, FT_MEM_COPY, FT_NEW_ARRAY, FT_TRACE0, and NULL.

Referenced by cff_font_load(), and cff_subfont_load().

cff_index_get_sid_string ( CFF_Font  font,
FT_UInt  sid 
)

Definition at line 621 of file cffload.c.

References cff_index_get_string(), and NULL.

cff_index_get_string ( CFF_Font  font,
FT_UInt  element 
)

Definition at line 611 of file cffload.c.

References NULL.

Referenced by cff_get_name_index(), and cff_index_get_sid_string().

static FT_Error cff_index_init ( CFF_Index  idx,
FT_Stream  stream,
FT_Bool  load 
)
static
static FT_ULong cff_index_read_offset ( CFF_Index  idx,
FT_Error errorp 
)
static

Definition at line 202 of file cffload.c.

References error, and FT_STREAM_READ.

Referenced by cff_index_access_element(), and cff_index_init().

static FT_Error CFF_Load_FD_Select ( CFF_FDSelect  fdselect,
FT_UInt  num_glyphs,
FT_Stream  stream,
FT_ULong  offset 
)
static
static void cff_subfont_done ( FT_Memory  memory,
CFF_SubFont  subfont 
)
static
static FT_Error cff_subfont_load ( CFF_SubFont  font,
CFF_Index  idx,
FT_UInt  font_index,
FT_Stream  stream,
FT_ULong  base_offset,
FT_Library  library 
)
static

Variable Documentation

const FT_UShort cff_expert_charset[166]
static
Initial value:
=
{
0, 1, 229, 230, 231, 232, 233, 234,
235, 236, 237, 238, 13, 14, 15, 99,
239, 240, 241, 242, 243, 244, 245, 246,
247, 248, 27, 28, 249, 250, 251, 252,
253, 254, 255, 256, 257, 258, 259, 260,
261, 262, 263, 264, 265, 266, 109, 110,
267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282,
283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314,
315, 316, 317, 318, 158, 155, 163, 319,
320, 321, 322, 323, 324, 325, 326, 150,
164, 169, 327, 328, 329, 330, 331, 332,
333, 334, 335, 336, 337, 338, 339, 340,
341, 342, 343, 344, 345, 346, 347, 348,
349, 350, 351, 352, 353, 354, 355, 356,
357, 358, 359, 360, 361, 362, 363, 364,
365, 366, 367, 368, 369, 370, 371, 372,
373, 374, 375, 376, 377, 378
}

Definition at line 67 of file cffload.c.

Referenced by cff_charset_load().

const FT_UShort cff_expert_encoding[256]
static

Definition at line 143 of file cffload.c.

Referenced by cff_encoding_load().

const FT_UShort cff_expertsubset_charset[87]
static
Initial value:
=
{
0, 1, 231, 232, 235, 236, 237, 238,
13, 14, 15, 99, 239, 240, 241, 242,
243, 244, 245, 246, 247, 248, 27, 28,
249, 250, 251, 253, 254, 255, 256, 257,
258, 259, 260, 261, 262, 263, 264, 265,
266, 109, 110, 267, 268, 269, 270, 272,
300, 301, 302, 305, 314, 315, 158, 155,
163, 320, 321, 322, 323, 324, 325, 326,
150, 164, 169, 327, 328, 329, 330, 331,
332, 333, 334, 335, 336, 337, 338, 339,
340, 341, 342, 343, 344, 345, 346
}

Definition at line 92 of file cffload.c.

Referenced by cff_charset_load().

const FT_UShort cff_isoadobe_charset[229]
static

Definition at line 34 of file cffload.c.

Referenced by cff_charset_load().

const FT_UShort cff_standard_encoding[256]
static

Definition at line 107 of file cffload.c.

Referenced by cff_encoding_load(), and cff_get_standard_encoding().