About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pdffont.c File Reference
#include <string.h>
#include "system.h"
#include "error.h"
#include "mem.h"
#include "dpxconf.h"
#include "dpxfile.h"
#include "dpxutil.h"
#include "pdfobj.h"
#include "agl.h"
#include "pdfencoding.h"
#include "cmap.h"
#include "unicode.h"
#include "type1.h"
#include "type1c.h"
#include "truetype.h"
#include "pkfont.h"
#include "cidtype0.h"
#include "type0.h"
#include "tt_cmap.h"
#include "pdffont.h"
#include "tfm.h"
Include dependency graph for pdffont.c:

Go to the source code of this file.


#define MREC_HAS_TOUNICODE(m)   ((m) && (m)->opt.tounicode)
#define CACHE_ALLOC_SIZE   16u
#define CHECK_ID(n)


void pdf_font_set_dpi (int font_dpi)
void pdf_font_make_uniqueTag (char *tag)
static void init_CIDSysInfo (CIDSysInfo *csi)
static void pdf_init_font_struct (pdf_font *font)
static void pdf_flush_font (pdf_font *font)
static void pdf_clean_font_struct (pdf_font *font)
void pdf_init_fonts (void)
static pdf_fontGET_FONT (int font_id)
pdf_fontpdf_get_font_data (int font_id)
char * pdf_get_font_ident (int font_id)
pdf_objpdf_get_font_reference (int font_id)
pdf_objpdf_get_font_resource (int font_id)
char * pdf_get_font_usedchars (int font_id)
int pdf_get_font_wmode (int font_id)
int pdf_get_font_subtype (int font_id)
int pdf_get_font_encoding (int font_id)
int pdf_font_resource_name (int font_id, char *buff)
static int try_load_ToUnicode_CMap (pdf_font *font)
void pdf_close_fonts (void)
int pdf_font_findresource (const char *ident, double scale)
static int create_font_alias (const char *ident, int font_id)
static int create_font_reencoded (const char *ident, int font_id, int cmap_id)
int pdf_font_load_font (const char *ident, double font_scale, const fontmap_rec *mrec)
pdf_objpdf_font_get_resource (pdf_font *font)
pdf_objpdf_font_get_descriptor (pdf_font *font)
char * pdf_font_get_uniqueTag (pdf_font *font)
int pdf_check_tfm_widths (const char *ident, double *widths, int firstchar, int lastchar, const char *usedchars)


struct {
   int   count
   int   capacity
   pdf_font *   fonts

Macro Definition Documentation


#define CACHE_ALLOC_SIZE   16u

Definition at line 222 of file pdffont.c.


#define CHECK_ID (   n)
do {\
if ((n) < 0 || (n) >= font_cache.count) {\
ERROR("Invalid font ID: %d", (n));\
} while (0)
#define n
Definition: t4ht.c:1290
static struct @1559 font_cache

Definition at line 256 of file pdffont.c.


#define MREC_HAS_TOUNICODE (   m)    ((m) && (m)->opt.tounicode)

Definition at line 56 of file pdffont.c.

Function Documentation

◆ create_font_alias()

static int create_font_alias ( const char *  ident,
int  font_id 

◆ create_font_reencoded()

static int create_font_reencoded ( const char *  ident,
int  font_id,
int  cmap_id 


◆ init_CIDSysInfo()

static void init_CIDSysInfo ( CIDSysInfo csi)

Definition at line 78 of file pdffont.c.

References NULL, CIDSysInfo::ordering, CIDSysInfo::registry, and CIDSysInfo::supplement.

Referenced by pdf_init_font_struct().

◆ pdf_check_tfm_widths()

int pdf_check_tfm_widths ( const char *  ident,
double *  widths,
int  firstchar,
int  lastchar,
const char *  usedchars 

◆ pdf_clean_font_struct()

static void pdf_clean_font_struct ( pdf_font font)

◆ pdf_close_fonts()

◆ pdf_flush_font()

◆ pdf_font_findresource()

◆ pdf_font_get_descriptor()

pdf_obj* pdf_font_get_descriptor ( pdf_font font)

◆ pdf_font_get_resource()

◆ pdf_font_get_uniqueTag()

char* pdf_font_get_uniqueTag ( pdf_font font)

Definition at line 1034 of file pdffont.c.

References ASSERT, and pdf_font_make_uniqueTag().

◆ pdf_font_load_font()

◆ pdf_font_make_uniqueTag()

void pdf_font_make_uniqueTag ( char *  tag)

Definition at line 65 of file pdffont.c.

References ch, i, and rand.

◆ pdf_font_resource_name()

int pdf_font_resource_name ( int  font_id,
char *  buff 

◆ pdf_font_set_dpi()

void pdf_font_set_dpi ( int  font_dpi)

Definition at line 59 of file pdffont.c.

References font_dpi, and PKFont_set_dpi().

◆ pdf_get_font_data()

pdf_font* pdf_get_font_data ( int  font_id)

Definition at line 278 of file pdffont.c.

References CHECK_ID, font_cache, and font_id.

◆ pdf_get_font_encoding()

int pdf_get_font_encoding ( int  font_id)

Definition at line 396 of file pdffont.c.

References CHECK_ID, font, font_id, and GET_FONT().

◆ pdf_get_font_ident()

char* pdf_get_font_ident ( int  font_id)

Definition at line 286 of file pdffont.c.

References CHECK_ID, font, font_cache, and font_id.

◆ pdf_get_font_reference()

◆ pdf_get_font_resource()

pdf_obj* pdf_get_font_resource ( int  font_id)

◆ pdf_get_font_subtype()

int pdf_get_font_subtype ( int  font_id)

Definition at line 381 of file pdffont.c.

References CHECK_ID, font::flags, font, font_id, GET_FONT(), and PDF_FONT_FLAG_IS_REENCODE.

◆ pdf_get_font_usedchars()

char* pdf_get_font_usedchars ( int  font_id)

◆ pdf_get_font_wmode()

int pdf_get_font_wmode ( int  font_id)

◆ pdf_init_font_struct()

static void pdf_init_font_struct ( pdf_font font)

◆ pdf_init_fonts()

◆ try_load_ToUnicode_CMap()

Variable Documentation

◆ capacity

int capacity

Definition at line 226 of file pdffont.c.

◆ count

int count

Definition at line 225 of file pdffont.c.


◆ fonts

pdf_font* fonts

Definition at line 227 of file pdffont.c.