w32tex
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)  

sfd.c File Reference
#include "fontforge.h"
#include <utype.h>
#include <sys/stat.h>
#include "sfd1.h"
Include dependency graph for sfd.c:

Go to the source code of this file.

Classes

struct  enc85
 

Macros

#define SFD_PTFLAG_TYPE_MASK   0x3
 
#define SFD_PTFLAG_IS_SELECTED   0x4
 
#define SFD_PTFLAG_NEXTCP_IS_DEFAULT   0x8
 
#define SFD_PTFLAG_PREVCP_IS_DEFAULT   0x10
 
#define SFD_PTFLAG_ROUND_IN_X   0x20
 
#define SFD_PTFLAG_ROUND_IN_Y   0x40
 
#define SFD_PTFLAG_INTERPOLATE   0x80
 
#define SFD_PTFLAG_INTERPOLATE_NEVER   0x100
 
#define SFD_PTFLAG_PREV_EXTREMA_MARKED_ACCEPTABLE   0x200
 
#define SFD_PTFLAG_FORCE_OPEN_PATH   0x400
 
#define FONT_PROPS   "font.props"
 
#define STRIKE_PROPS   "strike.props"
 
#define EXT_CHAR   '.'
 
#define GLYPH_EXT   ".glyph"
 
#define BITMAP_EXT   ".bitmap"
 
#define STRIKE_EXT   ".strike"
 
#define SUBFONT_EXT   ".subfont"
 
#define INSTANCE_EXT   ".instance"
 

Functions

static RefCharSFDGetRef (FILE *sfd, int was_enc)
 
static AnchorPointSFDReadAnchorPoints (FILE *sfd, SplineChar *sc, AnchorPoint **alist, AnchorPoint *lastap)
 
static StemInfoSFDReadHints (FILE *sfd)
 
static DStemInfoSFDReadDHints (SplineFont *sf, FILE *sfd, int old)
 
uint8_IVParse (SplineFont *sf, char *text, int *len, void(*IVError)(void *, char *, int), void *iv)
 
static int PeekMatch (FILE *stream, const char *target)
 
static int nlgetc (FILE *sfd)
 
static char * SFDReadUTF7Str (FILE *sfd)
 
static voidSFDUnPickle (FILE *sfd, int python_data_has_lists)
 
char * getquotedeol (FILE *sfd)
 
static int geteol (FILE *sfd, char *tokbuf)
 
static int getprotectedname (FILE *sfd, char *tokbuf)
 
int getname (FILE *sfd, char *tokbuf)
 
static uint32 gettag (FILE *sfd)
 
static int getint (FILE *sfd, int *val)
 
static int getlonglong (FILE *sfd, long long *val)
 
static int gethex (FILE *sfd, uint32 *val)
 
static int gethexints (FILE *sfd, uint32 *val, int cnt)
 
static int getsint (FILE *sfd, int16 *val)
 
static int getusint (FILE *sfd, uint16 *val)
 
static int getreal (FILE *sfd, float *val)
 
static int Dec85 (struct enc85 *dec)
 
static void SFDGetType1 (FILE *sfd)
 
static void SFDGetTtfInstrs (FILE *sfd, SplineChar *sc)
 
static void tterr (void *UNUSED(rubbish), char *message, int UNUSED(pos))
 
static void SFDGetTtInstrs (FILE *sfd, SplineChar *sc)
 
static struct ttf_tableSFDGetTtfTable (FILE *sfd, SplineFont *sf, struct ttf_table *lasttab[2])
 
static struct ttf_tableSFDGetShortTable (FILE *sfd, SplineFont *sf, struct ttf_table *lasttab[2])
 
static struct ttf_tableSFDGetTtTable (FILE *sfd, SplineFont *sf, struct ttf_table *lasttab[2])
 
static int SFDCloseCheck (SplinePointList *spl, int order2)
 
static void SFDGetHintMask (FILE *sfd, HintMask *hintmask)
 
static void SFDGetSpiros (FILE *sfd, SplineSet *cur)
 
static SplineSetSFDGetSplineSet (FILE *sfd, int order2)
 
static void SFDGetMinimumDistances (FILE *sfd, SplineChar *sc)
 
static HintInstanceSFDReadHintInstances (FILE *sfd, StemInfo *stem)
 
static DeviceTableSFDReadDeviceTable (FILE *sfd, DeviceTable *adjust)
 
static ValDevTabSFDReadValDevTab (FILE *sfd)
 
static PST1LigaCreateFromOldStyleMultiple (PST1 *liga)
 
static void SFDSetEncMap (SplineFont *sf, int orig_pos, int enc)
 
static void SCDefaultInterpolation (SplineChar *sc)
 
static void SFDParseMathValueRecord (FILE *sfd, int16 *value, DeviceTable **devtab)
 
static struct glyphvariantsSFDParseGlyphComposition (FILE *sfd, struct glyphvariants *gv, char *tok)
 
static void SFDParseVertexKern (FILE *sfd, struct mathkernvertex *vertex)
 
static struct gradientSFDParseGradient (FILE *sfd, char *tok)
 
static struct patternSFDParsePattern (FILE *sfd, char *tok)
 
static SplineCharSFDGetChar (FILE *sfd, SplineFont *sf, int had_sf_layer_cnt)
 
static void SFDFixupRef (SplineChar *sc, RefChar *ref, int layer)
 
static SplineCharSCDuplicate (SplineChar *sc)
 
void SFDFixupRefs (SplineFont *sf)
 
static void SFDGetPrivate (FILE *sfd, SplineFont *sf)
 
static void SFDGetSubrs (FILE *sfd)
 
static struct ttflangnameSFDGetLangName (FILE *sfd, struct ttflangname *old)
 
static void SFDGetGasp (FILE *sfd, SplineFont *sf)
 
static void SFDGetDesignSize (FILE *sfd, SplineFont *sf)
 
static void SFDGetOtfFeatName (FILE *sfd, SplineFont *sf)
 
static EncodingSFDGetEncoding (FILE *sfd, char *tok)
 
static enum uni_interp SFDGetUniInterp (FILE *sfd, char *tok, SplineFont *sf)
 
static void SFDGetNameList (FILE *sfd, char *tok, SplineFont *sf)
 
static OTLookupSFD_ParseNestedLookup (FILE *sfd, SplineFont *sf, int old)
 
static void SFDParseChainContext (FILE *sfd, SplineFont *sf, FPST *fpst, char *tok, int old)
 
static void SFDParseStateMachine (FILE *sfd, SplineFont *sf, ASM *sm, char *tok, int old)
 
static struct macnameSFDParseMacNames (FILE *sfd, char *tok)
 
MacFeatSFDParseMacFeatures (FILE *sfd, char *tok)
 
static char * SFDParseMMSubroutine (FILE *sfd)
 
static void MMInferStuff (MMSet *mm)
 
static void SFDSizeMap (EncMap *map, int glyphcnt, int enccnt)
 
static SplineFontSFD_GetFont (FILE *sfd, SplineFont *cidmaster, char *tok, int fromdir, char *dirname, float sfdversion)
 
static void SFD_DoAltUnis (SplineFont *sf)
 
static void SFDParseLookup (FILE *sfd, OTLookup *otl)
 
static void SFDParseMathItem (FILE *sfd, SplineFont *sf, char *tok)
 
static struct baselangextentParseBaseLang (FILE *sfd)
 
static struct basescriptSFDParseBaseScript (FILE *sfd, struct Base *base)
 
static struct BaseSFDParseBase (FILE *sfd)
 
static OTLookup ** SFDLookupList (FILE *sfd, SplineFont *sf)
 
static void SFDParseJustify (FILE *sfd, SplineFont *sf, char *tok)
 
void SFD_GetFontMetaDataData_Init (SFD_GetFontMetaDataData *d)
 
Bool__ SFD_GetFontMetaData (FILE *sfd, char *tok, SplineFont *sf, SFD_GetFontMetaDataData *d)
 
void SFTimesFromFile (SplineFont *sf, FILE *file)
 
static double SFDStartsCorrectly (FILE *sfd, char *tok)
 
static SplineFontSFD_Read (char *filename, FILE *sfd, int fromdir)
 
SplineFontSFDRead (char *filename)
 

Variables

static const char * joins [] = { "miter", "round", "bevel", "inher", ((void *)0) }
 
static const char * caps [] = { "butt", "round", "square", "inher", ((void *)0) }
 
static const char * spreads [] = { "pad", "reflect", "repeat", ((void *)0) }
 
static const char * charset_names []
 
static const char * unicode_interp_names []
 
signed char inbase64 [256]
 
static const char * end_tt_instrs = "EndTTInstrs"
 
static int orig_pos
 

Macro Definition Documentation

◆ BITMAP_EXT

#define BITMAP_EXT   ".bitmap"

Definition at line 77 of file sfd.c.

◆ EXT_CHAR

#define EXT_CHAR   '.'

Definition at line 75 of file sfd.c.

◆ FONT_PROPS

#define FONT_PROPS   "font.props"

Definition at line 73 of file sfd.c.

◆ GLYPH_EXT

#define GLYPH_EXT   ".glyph"

Definition at line 76 of file sfd.c.

◆ INSTANCE_EXT

#define INSTANCE_EXT   ".instance"

Definition at line 80 of file sfd.c.

◆ SFD_PTFLAG_FORCE_OPEN_PATH

#define SFD_PTFLAG_FORCE_OPEN_PATH   0x400

Definition at line 51 of file sfd.c.

◆ SFD_PTFLAG_INTERPOLATE

#define SFD_PTFLAG_INTERPOLATE   0x80

Definition at line 48 of file sfd.c.

◆ SFD_PTFLAG_INTERPOLATE_NEVER

#define SFD_PTFLAG_INTERPOLATE_NEVER   0x100

Definition at line 49 of file sfd.c.

◆ SFD_PTFLAG_IS_SELECTED

#define SFD_PTFLAG_IS_SELECTED   0x4

Definition at line 43 of file sfd.c.

◆ SFD_PTFLAG_NEXTCP_IS_DEFAULT

#define SFD_PTFLAG_NEXTCP_IS_DEFAULT   0x8

Definition at line 44 of file sfd.c.

◆ SFD_PTFLAG_PREV_EXTREMA_MARKED_ACCEPTABLE

#define SFD_PTFLAG_PREV_EXTREMA_MARKED_ACCEPTABLE   0x200

Definition at line 50 of file sfd.c.

◆ SFD_PTFLAG_PREVCP_IS_DEFAULT

#define SFD_PTFLAG_PREVCP_IS_DEFAULT   0x10

Definition at line 45 of file sfd.c.

◆ SFD_PTFLAG_ROUND_IN_X

#define SFD_PTFLAG_ROUND_IN_X   0x20

Definition at line 46 of file sfd.c.

◆ SFD_PTFLAG_ROUND_IN_Y

#define SFD_PTFLAG_ROUND_IN_Y   0x40

Definition at line 47 of file sfd.c.

◆ SFD_PTFLAG_TYPE_MASK

#define SFD_PTFLAG_TYPE_MASK   0x3

Definition at line 42 of file sfd.c.

◆ STRIKE_EXT

#define STRIKE_EXT   ".strike"

Definition at line 78 of file sfd.c.

◆ STRIKE_PROPS

#define STRIKE_PROPS   "strike.props"

Definition at line 74 of file sfd.c.

◆ SUBFONT_EXT

#define SUBFONT_EXT   ".subfont"

Definition at line 79 of file sfd.c.

Function Documentation

◆ _IVParse()

uint8* _IVParse ( SplineFont sf,
char *  text,
int len,
void(*)(void *, char *, int IVError,
void iv 
)

◆ Dec85()

static int Dec85 ( struct enc85 dec)
static

Definition at line 494 of file sfd.c.

References ch2, ch3, ch4, dec(), getc, isspace, and val.

Referenced by SFDGetSubrs(), SFDGetTtfInstrs(), SFDGetTtfTable(), and SFDGetType1().

◆ geteol()

static int geteol ( FILE sfd,
char *  tokbuf 
)
static

Definition at line 322 of file sfd.c.

References ch, end, EOF, isspace, nlgetc(), and pt.

Referenced by SFD_GetFont(), SFD_GetFontMetaData(), SFDGetChar(), SFDGetEncoding(), SFDGetNameList(), and SFDParseJustify().

◆ gethex()

static int gethex ( FILE sfd,
uint32 val 
)
static

Definition at line 409 of file sfd.c.

References ch, end, EOF, isdigit, isspace, nlgetc(), NULL, pt, strtoul(), and ungetc.

Referenced by gethexints(), SFD_GetFont(), SFD_GetFontMetaData(), SFDGetChar(), and SFDParseGradient().

◆ gethexints()

static int gethexints ( FILE sfd,
uint32 val,
int  cnt 
)
static

Definition at line 439 of file sfd.c.

References ch, cnt, gethex(), i, nlgetc(), and ungetc.

Referenced by SFD_GetFontMetaData(), and SFDGetChar().

◆ getint()

◆ getlonglong()

static int getlonglong ( FILE sfd,
long long *  val 
)
static

Definition at line 390 of file sfd.c.

References ch, end, EOF, isdigit, isspace, nlgetc(), NULL, pt, strtoll(), and ungetc.

Referenced by SFD_GetFontMetaData().

◆ getname()

◆ getprotectedname()

static int getprotectedname ( FILE sfd,
char *  tokbuf 
)
static

Definition at line 334 of file sfd.c.

References ch, end, EOF, isspace, nlgetc(), pt, and ungetc.

Referenced by getname(), and SFD_GetFontMetaData().

◆ getquotedeol()

char* getquotedeol ( FILE sfd)

Definition at line 283 of file sfd.c.

References ch, end, EOF, free, getc, isspace, latin1_2_utf8_copy(), malloc, nlgetc(), pt, realloc, str, and utf8_valid().

Referenced by SFD_GetFontMetaData().

◆ getreal()

◆ getsint()

◆ gettag()

◆ getusint()

static int getusint ( FILE sfd,
uint16 val 
)
static

Definition at line 460 of file sfd.c.

References getint(), and ret.

Referenced by SFDGetChar(), SFDParseChainContext(), and SFDParseStateMachine().

◆ LigaCreateFromOldStyleMultiple()

static PST1* LigaCreateFromOldStyleMultiple ( PST1 liga)
static

Definition at line 1345 of file sfd.c.

References chunkalloc, copy(), last, generic_pst::lig, NULL, generic_pst1::pst, pt, strrchr, and generic_pst::u.

Referenced by SFDGetChar().

◆ MMInferStuff()

◆ nlgetc()

◆ ParseBaseLang()

static struct baselangextent* ParseBaseLang ( FILE sfd)
static

◆ PeekMatch()

static int PeekMatch ( FILE stream,
const char *  target 
)
static

Definition at line 108 of file sfd.c.

References EOF, fseek, getc, pos1(), SEEK_CUR, and target.

Referenced by SFDGetChar(), and SFDGetSplineSet().

◆ SCDefaultInterpolation()

static void SCDefaultInterpolation ( SplineChar sc)
static

Definition at line 1418 of file sfd.c.

References cur, ly_fore, NULL, sc, sp, and SPInterpolate().

Referenced by SFDGetChar().

◆ SCDuplicate()

static SplineChar* SCDuplicate ( SplineChar sc)
static

Definition at line 2151 of file sfd.c.

References basename, ly_fore, NULL, sc, and strcmp().

Referenced by SFDFixupRefs().

◆ SFD_DoAltUnis()

static void SFD_DoAltUnis ( SplineFont sf)
static

Definition at line 2866 of file sfd.c.

References alt, EncFromUni(), i, NULL, sc, and SFDSetEncMap().

Referenced by SFD_GetFont().

◆ SFD_GetFont()

static SplineFont * SFD_GetFont ( FILE sfd,
SplineFont cidmaster,
char *  tok,
int  fromdir,
char *  dirname,
float  sfdversion 
)
static

Definition at line 4060 of file sfd.c.

References act_curs, act_mark, act_mklg, act_mkmk, AltUniFigure(), mmset::apple, mmset::axes, mmset::axis_count, mmset::axismaps, axismap::axisnames, mmset::axismap::blends, calloc(), mmset::cdv, ch, charcnt, CHR, chunkalloc, cnt, named_instance::coords, copy(), custom, d, mmset::defweights, mmset::axismap::designs, dirname(), enc, EncMap1to1(), EncMapFree(), EncMapFromEncoding(), EncMapNew(), EOF, eof(), exit(), f, ff_progress_change_stages, ff_progress_change_total, ff_progress_next, ff_progress_next_stage, remap::firstenc, free, geteol(), gethex(), getint(), getname(), getreal(), gettag(), gpos_cursive, gpos_mark2base, gpos_mark2ligature, gpos_mark2mark, i, IError, imax(), index, infont, remap::infont, mmset::instance_count, mmset::instances, isdigit, isspace, j, k, cutout::l, remap::lastenc, ly_back, ly_fore, malloc, map, splinefont::map, splinefont::mm, MMInferStuff(), MMMatchGlyphs(), n, name, mmset::named_instance_count, mmset::named_instances, fc-lang::names, named_instance::names, mmset::ndv, table_ordering::next, anchorclass::next, nlgetc(), mmset::normal, NULL, ord, orig_pos, p, points, mmset::axismap::points, mmset::positions, remap(), s, SFD_DoAltUnis(), SFD_GetFontMetaData(), SFD_GetFontMetaDataData_Init(), SFDFixupRefs(), SFDGetChar(), SFDGetEncoding(), SFDGetNameList(), SFDGetPrivate(), SFDGetSplineSet(), SFDGetSubrs(), SFDGetUniInterp(), SFDParseMacNames(), SFDParseMathItem(), SFDParseMMSubroutine(), SFDReadUTF7Str(), SFDSetEncMap(), SFDSizeMap(), SFDUnPickle(), SFFindLookupSubtableAndFreeName(), SFTimesFromFile(), SplineFontEmpty(), SplineFontFree(), strchr, strcmp(), strmatch(), strncmp(), strnmatch(), temp, tok(), ui_unset, ungetc, and void.

Referenced by SFD_Read().

◆ SFD_GetFontMetaData()

Bool__ SFD_GetFontMetaData ( FILE sfd,
char *  tok,
SplineFont sf,
SFD_GetFontMetaDataData d 
)
Returns
true if the function matched the current token. If true is returned the caller should avoid further processing of 'tok' a return of false means that the caller might try to handle the token with another function or drop it.

Definition at line 3245 of file sfd.c.

References _, kernclass::adjusts, BaseScriptFree(), calloc(), ch, chunkalloc, ff_glyphclasses::classname, copy(), d, EOF, exit(), kernclass::first_cnt, kernclass::firsts, kernclass::firsts_flags, kernclass::firsts_names, fread, free, geteol(), gethex(), gethexints(), getint(), getlonglong(), getprotectedname(), getquotedeol(), getreal(), getsint(), ff_glyphclasses::glyphs, gpos_single, i, IError, isdigit, isspace, lookup_subtable::kc, latin1_2_utf8_copy(), ff_rawoffsets::left, LogError, otlookup::lookup_flags, otlookup::lookup_name, otlookup::lookup_type, ly_back, malloc, memset(), nlgetc(), NULL, ff_rawoffsets::offset, kernclass::offsets, kernclass::offsets_flags, realloc, ff_rawoffsets::right, kernclass::second_cnt, kernclass::seconds, kernclass::seconds_flags, kernclass::seconds_names, SFD_GetFontMetaDataData_Init(), SFDGetDesignSize(), SFDGetGasp(), SFDGetLangName(), SFDGetOtfFeatName(), SFDGetShortTable(), SFDGetTtfTable(), SFDGetTtTable(), SFDParseBase(), SFDParseBaseScript(), SFDParseChainContext(), SFDParseJustify(), SFDParseLookup(), SFDParseMacFeatures(), SFDParseStateMachine(), SFDReadDeviceTable(), SFDReadUTF7Str(), SFFindLookupSubtableAndFreeName(), otlookup::store_in_afm, strchr, strcmp(), strmatch(), kernclass::subtable, lookup_subtable::subtable_name, temp, tok(), ungetc, and void.

Referenced by SFD_GetFont().

◆ SFD_GetFontMetaDataData_Init()

void SFD_GetFontMetaDataData_Init ( SFD_GetFontMetaDataData d)

Definition at line 3233 of file sfd.c.

References d, and memset().

Referenced by SFD_GetFont(), and SFD_GetFontMetaData().

◆ SFD_ParseNestedLookup()

static OTLookup* SFD_ParseNestedLookup ( FILE sfd,
SplineFont sf,
int  old 
)
static

◆ SFD_Read()

static SplineFont* SFD_Read ( char *  filename,
FILE sfd,
int  fromdir 
)
static

◆ SFDCloseCheck()

◆ SFDFixupRef()

static void SFDFixupRef ( SplineChar sc,
RefChar ref,
int  layer 
)
static

◆ SFDFixupRefs()

◆ SFDGetChar()

static SplineChar* SFDGetChar ( FILE sfd,
SplineFont sf,
int  had_sf_layer_cnt 
)
static

Definition at line 1555 of file sfd.c.

References _, vr::adjust, calloc(), caps, generic_pst::carets, ch, CHR, chunkalloc, generic_pst::cnt, copy(), DASH_MAX, DEFAULT_LANG, enc, exit(), altuni::fid, flags, geteol(), gethex(), gethexints(), getint(), getname(), getreal(), getsint(), gettag(), getusint(), vr::h_adv_off, i, IError, index, isdigit, isspace, joins, last, generic_pst::lcaret, generic_pst::lig, LigaCreateFromOldStyleMultiple(), LogError, ly_back, ly_fore, malloc, memcpy, memset(), refchar::next, altuni::next, nlgetc(), NULL, fc-lang::off, orig_pos, generic_pst::pair, generic_pst::paired, PeekMatch(), generic_pst::pos, pst_alternate, pst_lcaret, pst_ligature, pst_multiple, pst_pair, pst_position, pst_substitution, realloc, pdf-org::ref(), sc, SCDefaultInterpolation(), SCGuessHintInstancesList(), script, SCScriptFromUnicode(), SFDGetHintMask(), SFDGetMinimumDistances(), SFDGetRef(), SFDGetSplineSet(), SFDGetTtfInstrs(), SFDGetTtInstrs(), SFDGetType1(), SFDParseGlyphComposition(), SFDParseGradient(), SFDParseMathValueRecord(), SFDParsePattern(), SFDParseVertexKern(), SFDReadAnchorPoints(), SFDReadDeviceTable(), SFDReadDHints(), SFDReadHints(), SFDReadUTF7Str(), SFDReadValDevTab(), SFDSetEncMap(), SFDUnPickle(), SFFindBiggestScriptLangIndex(), SFFindLookupSubtableAndFreeName(), SFSplineCharCreate(), SLI_NESTED, SLI_UNKNOWN, SplineCharFree(), StemListAnyConflicts(), strchr, strcmp(), strmatch(), sub, generic_pst::subtable, temp, TEX_UNDEF, tok(), trans, generic_pst::type, type, generic_pst::u, ungetc, altuni::unienc, vr::v_adv_off, generic_pst::vr, altuni::vs, vr::xoff, and vr::yoff.

Referenced by SFD_GetFont().

◆ SFDGetDesignSize()

static void SFDGetDesignSize ( FILE sfd,
SplineFont sf 
)
static

Definition at line 2373 of file sfd.c.

References ch, chunkalloc, cur, getsint(), isdigit, nlgetc(), SFDReadUTF7Str(), and ungetc.

Referenced by SFD_GetFontMetaData().

◆ SFDGetEncoding()

static Encoding* SFDGetEncoding ( FILE sfd,
char *  tok 
)
static

Definition at line 2423 of file sfd.c.

References charset_names, custom, FindOrMakeEncoding(), geteol(), getint(), NULL, and tok().

Referenced by SFD_GetFont().

◆ SFDGetGasp()

static void SFDGetGasp ( FILE sfd,
SplineFont sf 
)
static

Definition at line 2361 of file sfd.c.

References getsint(), i, and malloc.

Referenced by SFD_GetFontMetaData().

◆ SFDGetHintMask()

static void SFDGetHintMask ( FILE sfd,
HintMask hintmask 
)
static

Definition at line 729 of file sfd.c.

References ch, HntMax, isdigit, memset(), nlgetc(), and ungetc.

Referenced by SFDGetChar(), and SFDGetSplineSet().

◆ SFDGetLangName()

static struct ttflangname* SFDGetLangName ( FILE sfd,
struct ttflangname old 
)
static

Definition at line 2347 of file sfd.c.

References chunkalloc, cur, getint(), i, NULL, prev, SFDReadUTF7Str(), and ttf_namemax.

Referenced by SFD_GetFontMetaData().

◆ SFDGetMinimumDistances()

◆ SFDGetNameList()

static void SFDGetNameList ( FILE sfd,
char *  tok,
SplineFont sf 
)
static

Definition at line 2464 of file sfd.c.

References _, geteol(), LogError, NameListByName(), nl, NULL, and tok().

Referenced by SFD_GetFont().

◆ SFDGetOtfFeatName()

static void SFDGetOtfFeatName ( FILE sfd,
SplineFont sf 
)
static

Definition at line 2401 of file sfd.c.

References ch, chunkalloc, cur, fc-lang::fn, getsint(), gettag(), isdigit, nlgetc(), SFDReadUTF7Str(), and ungetc.

Referenced by SFD_GetFontMetaData().

◆ SFDGetPrivate()

static void SFDGetPrivate ( FILE sfd,
SplineFont sf 
)
static

Definition at line 2307 of file sfd.c.

References calloc(), cnt, copy(), end, getint(), getname(), i, len, malloc, name, nlgetc(), and pt.

Referenced by SFD_GetFont().

◆ SFDGetRef()

◆ SFDGetShortTable()

static struct ttf_table* SFDGetShortTable ( FILE sfd,
SplineFont sf,
struct ttf_table lasttab[2] 
)
static

◆ SFDGetSpiros()

static void SFDGetSpiros ( FILE sfd,
SplineSet cur 
)
static

Definition at line 751 of file sfd.c.

References ch, cp, cur, memset(), nlgetc(), NULL, realloc, SPIRO_END, and ungetc.

Referenced by SFDGetSplineSet().

◆ SFDGetSplineSet()

◆ SFDGetSubrs()

static void SFDGetSubrs ( FILE sfd)
static

Definition at line 2329 of file sfd.c.

References cnt, dec(), Dec85(), getint(), i, len, memset(), and enc85::sfd.

Referenced by SFD_GetFont().

◆ SFDGetTtfInstrs()

static void SFDGetTtfInstrs ( FILE sfd,
SplineChar sc 
)
static

Definition at line 532 of file sfd.c.

References dec(), Dec85(), getint(), i, len, malloc, memset(), sc, and enc85::sfd.

Referenced by SFDGetChar().

◆ SFDGetTtfTable()

static struct ttf_table* SFDGetTtfTable ( FILE sfd,
SplineFont sf,
struct ttf_table lasttab[2] 
)
static

Definition at line 581 of file sfd.c.

References CHR, chunkalloc, dec(), Dec85(), getint(), gettag(), i, len, malloc, memset(), ttf_table::next, NULL, and tab.

Referenced by SFD_GetFontMetaData().

◆ SFDGetTtInstrs()

static void SFDGetTtInstrs ( FILE sfd,
SplineChar sc 
)
static

Definition at line 552 of file sfd.c.

References _IVParse(), buf, ch, end, end_tt_instrs, EOF, free, nlgetc(), NULL, pt, realloc, sc, enc85::sfd, strlen(), strncmp(), and tterr().

Referenced by SFDGetChar().

◆ SFDGetTtTable()

static struct ttf_table* SFDGetTtTable ( FILE sfd,
SplineFont sf,
struct ttf_table lasttab[2] 
)
static

◆ SFDGetType1()

static void SFDGetType1 ( FILE sfd)
static

Definition at line 519 of file sfd.c.

References dec(), Dec85(), getint(), len, memset(), and enc85::sfd.

Referenced by SFDGetChar().

◆ SFDGetUniInterp()

static enum uni_interp SFDGetUniInterp ( FILE sfd,
char *  tok,
SplineFont sf 
)
static

Definition at line 2423 of file sfd.c.

Referenced by SFD_GetFont().

◆ SFDLookupList()

static OTLookup** SFDLookupList ( FILE sfd,
SplineFont sf 
)
static

Definition at line 3124 of file sfd.c.

References buf, ch, EOF, free, malloc, memcpy, name, nlgetc(), NULL, realloc, ret, SFDReadUTF7Str(), SFFindLookup(), space, and ungetc.

Referenced by SFDParseJustify().

◆ SFDParseBase()

static struct Base* SFDParseBase ( FILE sfd)
static

Definition at line 3111 of file sfd.c.

References base, chunkalloc, getint(), gettag(), i, and malloc.

Referenced by SFD_GetFontMetaData().

◆ SFDParseBaseScript()

static struct basescript* SFDParseBaseScript ( FILE sfd,
struct Base base 
)
static

◆ SFDParseChainContext()

◆ SFDParseGlyphComposition()

◆ SFDParseGradient()

◆ SFDParseJustify()

◆ SFDParseLookup()

◆ SFDParseMacFeatures()

MacFeat* SFDParseMacFeatures ( FILE sfd,
char *  tok 
)

◆ SFDParseMacNames()

static struct macname* SFDParseMacNames ( FILE sfd,
char *  tok 
)
static

Definition at line 2733 of file sfd.c.

References ch, chunkalloc, cur, enc, EOF, getint(), getname(), lang, last, len, malloc, name, nlgetc(), NULL, pt, strcmp(), and tok().

Referenced by SFD_GetFont(), and SFDParseMacFeatures().

◆ SFDParseMathItem()

static void SFDParseMathItem ( FILE sfd,
SplineFont sf,
char *  tok 
)
static

◆ SFDParseMathValueRecord()

static void SFDParseMathValueRecord ( FILE sfd,
int16 value,
DeviceTable **  devtab 
)
static

Definition at line 1439 of file sfd.c.

References getsint(), NULL, and SFDReadDeviceTable().

Referenced by SFDGetChar(), and SFDParseVertexKern().

◆ SFDParseMMSubroutine()

static char* SFDParseMMSubroutine ( FILE sfd)
static

Definition at line 2807 of file sfd.c.

References calloc(), fgets, first, len, NULL, realloc, strcmp(), strcpy(), strlen(), and strncmp().

Referenced by SFD_GetFont().

◆ SFDParsePattern()

static struct pattern* SFDParsePattern ( FILE sfd,
char *  tok 
)
static

Definition at line 1527 of file sfd.c.

References ch, chunkalloc, copy(), getname(), getreal(), isspace, nlgetc(), pat, tok(), and ungetc.

Referenced by SFDGetChar().

◆ SFDParseStateMachine()

◆ SFDParseVertexKern()

static void SFDParseVertexKern ( FILE sfd,
struct mathkernvertex vertex 
)
static

◆ SFDRead()

SplineFont* SFDRead ( char *  filename)

Definition at line 4667 of file sfd.c.

References filename, NULL, and SFD_Read().

Referenced by ff_sfd_to_ttf().

◆ SFDReadAnchorPoints()

◆ SFDReadDeviceTable()

static DeviceTable* SFDReadDeviceTable ( FILE sfd,
DeviceTable adjust 
)
static

◆ SFDReadDHints()

static DStemInfo * SFDReadDHints ( SplineFont sf,
FILE sfd,
int  old 
)
static

◆ SFDReadHintInstances()

static HintInstance* SFDReadHintInstances ( FILE sfd,
StemInfo stem 
)
static

Definition at line 1067 of file sfd.c.

References begin, ch, chunkalloc, cur, end, getreal(), last, nlgetc(), NULL, and ungetc.

Referenced by SFDReadDHints(), and SFDReadHints().

◆ SFDReadHints()

static StemInfo * SFDReadHints ( FILE sfd)
static

Definition at line 1097 of file sfd.c.

References chunkalloc, cur, getreal(), last, NULL, SFDReadHintInstances(), start, and width.

Referenced by SFDGetChar().

◆ SFDReadUTF7Str()

◆ SFDReadValDevTab()

static ValDevTab* SFDReadValDevTab ( FILE sfd)
static

◆ SFDSetEncMap()

static void SFDSetEncMap ( SplineFont sf,
int  orig_pos,
int  enc 
)
static

Definition at line 1392 of file sfd.c.

References enc, map, memset(), NULL, orig_pos, and realloc.

Referenced by SFD_DoAltUnis(), SFD_GetFont(), and SFDGetChar().

◆ SFDSizeMap()

static void SFDSizeMap ( EncMap map,
int  glyphcnt,
int  enccnt 
)
static

Definition at line 2850 of file sfd.c.

References map, memset(), and realloc.

Referenced by SFD_GetFont().

◆ SFDStartsCorrectly()

static double SFDStartsCorrectly ( FILE sfd,
char *  tok 
)
static

Definition at line 4605 of file sfd.c.

References ch, getname(), getreal(), LogError, nlgetc(), strcmp(), tok(), and ungetc.

Referenced by SFD_Read().

◆ SFDUnPickle()

static void* SFDUnPickle ( FILE sfd,
int  python_data_has_lists 
)
static

Definition at line 242 of file sfd.c.

References buf, ch, cnt, copy(), end, EOF, max, nlgetc(), NULL, pt, PyFF_UnPickleMeToObjects(), and realloc.

Referenced by SFD_GetFont(), and SFDGetChar().

◆ SFTimesFromFile()

void SFTimesFromFile ( SplineFont sf,
FILE file 
)

Definition at line 4597 of file sfd.c.

References b, fileno, and fstat.

Referenced by SFD_GetFont().

◆ tterr()

static void tterr ( void UNUSEDrubbish,
char *  message,
int   UNUSEDpos 
)
static

Definition at line 548 of file sfd.c.

References _, LogError, and message.

Referenced by SFDGetTtInstrs(), and SFDGetTtTable().

Variable Documentation

◆ caps

const char* caps[] = { "butt", "round", "square", "inher", ((void *)0) }
static

Definition at line 39 of file sfd.c.

Referenced by cairo_directfb_surface_create(), fmtfp(), fmtint(), and SFDGetChar().

◆ charset_names

const char* charset_names[]
static
Initial value:
= {
"custom",
"iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5",
"iso8859-6", "iso8859-7", "iso8859-8", "iso8859-9", "iso8859-10",
"iso8859-11", "iso8859-13", "iso8859-14", "iso8859-15",
"koi8-r",
"jis201",
"win", "mac", "symbol", "zapfding", "adobestandard",
"jis208", "jis212", "ksc5601", "gb2312", "big5", "big5hkscs", "johab",
"unicode", "unicode4", "sjis", "wansung", "gb2312pk", ((void *)0) }

Definition at line 58 of file sfd.c.

Referenced by SFDGetEncoding().

◆ end_tt_instrs

const char* end_tt_instrs = "EndTTInstrs"
static

Definition at line 101 of file sfd.c.

Referenced by SFDGetTtInstrs(), and SFDGetTtTable().

◆ inbase64

signed char inbase64[256]
Initial value:
= {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
}

Definition at line 82 of file sfd.c.

Referenced by SFDReadUTF7Str().

◆ joins

const char* joins[] = { "miter", "round", "bevel", "inher", ((void *)0) }
static

Definition at line 38 of file sfd.c.

Referenced by SFDGetChar().

◆ orig_pos

int orig_pos
static

Definition at line 1553 of file sfd.c.

Referenced by SFD_GetFont(), SFDGetChar(), and SFDSetEncMap().

◆ spreads

const char* spreads[] = { "pad", "reflect", "repeat", ((void *)0) }
static

Definition at line 40 of file sfd.c.

Referenced by SFDParseGradient().

◆ unicode_interp_names

const char* unicode_interp_names[]
static
Initial value:
= { "none", "adobe", "greek",
"japanese", "tradchinese", "simpchinese", "korean", "ams", ((void *)0) }

Definition at line 69 of file sfd.c.