Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members  

Adobe Font Metrics

Adobe font metric routines. More...

Compounds

struct  psAFM
struct  psAFMCharMetric
struct  psAFMDirection

Typedefs

typedef struct psAFMDirection  PSAFMDirection
 Typedef for psAFMDirection.

typedef struct psAFMCharMetric  PSAFMCharMetric
 Typedef for psAFMCharMetric.

typedef struct psAFM  PSAFM
 Typedef for psAFM.


Functions

PSAFMDirectionpsAFMDirectionAlloc (void)
 Allocates and initializes a psAFMDirection structure. More...

PSAFMDirectionpsAFMDirectionCalloc (int count)
 Allocates and initializes count psAFMDirection structures. More...

void psAFMDirectionFree (PSAFMDirection* d)
 Frees up a psAFMDirection structure. More...

PSAFMCharMetricpsAFMCharMetricAlloc (void)
 Allocates and initializes a psAFMCharMetric structure. More...

PSAFMCharMetricpsAFMCharMetricCalloc (int count)
 Allocates and initializes count psAFMCharMetric structures. More...

void psAFMCharMetricFree (PSAFMCharMetric* cm)
 Frees up psAFMCharMetrics structure. More...

PSAFMpsAFMAlloc (void)
 Allocates and initializes a new psAFM structure. More...

PSAFMpsAFMCalloc (int count)
 Allocates and initializes count psAFM structures. More...

void psAFMFree (PSAFM *fontMetric)
 Frees up a psAFM structure. More...

PSAFMpsAFMLoad (char *fileName)
 Loads/parses an AFM file into a psAFM structure. More...

PSAFMpsAFMParse (PSStream *str)
 Parses the AFM file referenced by str. More...

PSAFMCharMetricpsAFMLookupCharMetricByCode (PSAFM* fm, int code)
 Looks up an AFM character metric by code. More...

PSAFMCharMetricpsAFMLookupCharMetricByName (PSAFM* fm, char *name)
 Looks up an AFM character metric by name. More...

double psAFMGetTextWidth (PSAFM* fm, char* text)
 Calculates the width of text for the font metric \fm. More...

int psAFMGetPSWeight (PSAFM* fm)
 Get weight from font metric fm. More...

int psAFMGetPSWidth (PSAFM* fm)
 Get width from font metric fm. More...

int psAFMGetPSItalic (PSAFM* fm)
 Determines if the font referenced by the font metric fm is an italic font. More...


Detailed Description

Adobe font metric routines.


Function Documentation

PSAFM * psAFMAlloc ( void )
 

Allocates and initializes a new psAFM structure.

Returns:
a pointer to the newly allocated structure on success or NULL on failure.
See also:
psAFMCalloc(), psAFMFree().

PSAFM * psAFMCalloc ( int count )
 

Allocates and initializes count psAFM structures.

Returns:
a pointer to the newly allocated structures on success or NULL on failure.
See also:
psAFMAlloc(), psAFMFree().

PSAFMCharMetric * psAFMCharMetricAlloc ( void )
 

Allocates and initializes a psAFMCharMetric structure.

Returns:
a pointer to the newly allocated structure on success or NULL on failure.
See also:
psAFMCharMetricCalloc(), psAFMCharMetricFree().

PSAFMCharMetric * psAFMCharMetricCalloc ( int count )
 

Allocates and initializes count psAFMCharMetric structures.

Returns:
a pointer to the newly allocated structures on success or NULL on failure.
See also:
psAFMCharMetricAlloc(), psAFMCharMetricFree().

void psAFMCharMetricFree ( PSAFMCharMetric * cm )
 

Frees up psAFMCharMetrics structure.

Returns:
nothing.
See also:
psAFMCharMetricAlloc(), psAFMCharMetricCalloc().

PSAFMDirection * psAFMDirectionAlloc ( void )
 

Allocates and initializes a psAFMDirection structure.

Returns:
a pointer to the newly allocated structure on success or NULL on failure.
See also:
psAFMDirectionCalloc(), psAFMDirectionFree().

PSAFMDirection * psAFMDirectionCalloc ( int count )
 

Allocates and initializes count psAFMDirection structures.

Parameters:
count   number of structures to allocate.

Returns:
a pointer to the newly allocated structures on success or NULL on failure.
See also:
psAFMDirectionAlloc(), psAFMDirectionFree().

void psAFMDirectionFree ( PSAFMDirection * d )
 

Frees up a psAFMDirection structure.

Returns:
nothing.
See also:
psAFMDirectionAlloc(), psAFMDirectionCalloc().

void psAFMFree ( PSAFM * fontMetric )
 

Frees up a psAFM structure.

Returns:
nothing.
See also:
psAFMAlloc(), psAFMCalloc().

int psAFMGetPSItalic ( PSAFM * fm )
 

Determines if the font referenced by the font metric fm is an italic font.

Parameters:
fm   a pointer to the font metric.

Returns:
non-zero if the font is italic or 0 if not.

int psAFMGetPSWeight ( PSAFM * fm )
 

Get weight from font metric fm.

Attempts to map AFM weight strings as best as possible.

Parameters:
fm   pointer to font metric.

Returns:
a PS_FONT_WEIGHT_XXX from the specified font metric.

int psAFMGetPSWidth ( PSAFM * fm )
 

Get width from font metric fm.

Currently always returns PS_FONT_WIDTH_NORMAL as the width doesn't seem to be a part of an AFM.

Parameters:
fm   pointer to font metric.

Returns:
a PS_FONT_WIDTH_XXX from the specified font metric.

double psAFMGetTextWidth ( PSAFM * fm,
char * text )
 

Calculates the width of text for the font metric \fm.

Parameters:
fm   pointer to the font metric.
text   pointer to null-terminated string.

Returns:
the width of the specified text in 1000/ths of a point.

PSAFM * psAFMLoad ( char * fileName )
 

Loads/parses an AFM file into a psAFM structure.

Parameters:
fileName   name of AFM file to load.

Returns:
a pointer to the psAFM structure on success or NULL on failure.
See also:
psAFMParse().

PSAFMCharMetric * psAFMLookupCharMetricByCode ( PSAFM * fm,
int code )
 

Looks up an AFM character metric by code.

Parameters:
fm   pointer to the font metric.
code   character code to lookup.

Returns:
a pointer to the desired character metric on success or NULL on failure.

PSAFMCharMetric * psAFMLookupCharMetricByName ( PSAFM * fm,
char * name )
 

Looks up an AFM character metric by name.

Returns:
a pointer to the desired character metric on success or NULL on failure.

PSAFM * psAFMParse ( PSStream * str )
 

Parses the AFM file referenced by str.

Parameters:
str   stream to read AFM from.

Returns:
a pointer to a new psAFM structure on success or NULL on failure.
See also:
psAFMLoad().


Generated at Mon Dec 11 22:46:31 2000 for Postscript Utility Library by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000