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)  

splinefont.c File Reference
#include "fontforgevw.h"
Include dependency graph for splinefont.c:

Go to the source code of this file.

Classes

struct  dimcnt
 
struct  SPLFirstVisitorFoundSoughtXYDataS
 

Macros

#define RANGE   0x40ffffff
 

Typedefs

typedef struct SPLFirstVisitorFoundSoughtXYDataS SPLFirstVisitorFoundSoughtXYData
 

Enumerations

enum  flatness { mt_flat , mt_round , mt_pointy , mt_unknown }
 

Functions

const char * _GetModifiers (const char *fontname, const char *familyname, const char *weight)
 
const char * SFGetModifiers (const SplineFont *sf)
 
static double SPLMaxHeight (SplineSet *spl, enum flatness *isflat)
 
static double SCMaxHeight (SplineChar *sc, int layer, enum flatness *isflat)
 
static double SPLMinHeight (SplineSet *spl, enum flatness *isflat)
 
static double SCMinHeight (SplineChar *sc, int layer, enum flatness *isflat)
 
static int dclist_insert (struct dimcnt *arr, int cnt, double val)
 
static double SFStandardHeight (SplineFont *sf, int layer, int do_max, unichar_t *list)
 
double SFCapHeight (SplineFont *sf, int layer, int return_error)
 
double SFXHeight (SplineFont *sf, int layer, int return_error)
 
void SPLFirstVisitSplines (SplinePoint *splfirst, SPLFirstVisitSplinesVisitor f, void *udata)
 
static void SPLFirstVisitorFoundSoughtXY (SplinePoint *splfirst, Spline *spline, void *udata)
 
SplinePointSplinePointListContainsPointAtX (SplinePointList *container, float x)
 

Variables

const char * knownweights []
 
const char * realweights []
 
static const char * modifierlist []
 
static const char * modifierlistfull []
 
static const char ** mods [] = { knownweights, modifierlist, ((void *)0) }
 
static const char ** fullmods [] = { realweights, modifierlistfull, ((void *)0) }
 
static unichar_t capheight_str []
 
static unichar_t xheight_str []
 

Macro Definition Documentation

◆ RANGE

#define RANGE   0x40ffffff

Definition at line 256 of file splinefont.c.

Typedef Documentation

◆ SPLFirstVisitorFoundSoughtXYData

Enumeration Type Documentation

◆ flatness

enum flatness
Enumerator
mt_flat 
mt_round 
mt_pointy 
mt_unknown 

Definition at line 106 of file splinefont.c.

Function Documentation

◆ _GetModifiers()

const char* _GetModifiers ( const char *  fontname,
const char *  familyname,
const char *  weight 
)

Definition at line 45 of file splinefont.c.

References familyname, fontname, fullmods, i, j, mods, NULL, pt, space, strchr, strcmp(), strncpy(), and strstr().

Referenced by GuessStyle(), and SFGetModifiers().

◆ dclist_insert()

static int dclist_insert ( struct dimcnt arr,
int  cnt,
double  val 
)
static

Definition at line 260 of file splinefont.c.

References gen-emoji-table::arr, cnt, i, pos, and val.

Referenced by SFStandardHeight().

◆ SCMaxHeight()

static double SCMaxHeight ( SplineChar sc,
int  layer,
enum flatness isflat 
)
static

Definition at line 162 of file splinefont.c.

References bigreal, f, max, mt_flat, mt_unknown, NULL, r, sc, SPLMaxHeight(), and test.

Referenced by SFStandardHeight().

◆ SCMinHeight()

static double SCMinHeight ( SplineChar sc,
int  layer,
enum flatness isflat 
)
static

Definition at line 236 of file splinefont.c.

References bigreal, f, min, mt_flat, mt_unknown, NULL, r, sc, SPLMinHeight(), and test.

Referenced by SFStandardHeight().

◆ SFCapHeight()

double SFCapHeight ( SplineFont sf,
int  layer,
int  return_error 
)

Definition at line 374 of file splinefont.c.

References bigreal, capheight_str, check-static-inits::result, and SFStandardHeight().

Referenced by setos2().

◆ SFGetModifiers()

const char* SFGetModifiers ( const SplineFont sf)

Definition at line 102 of file splinefont.c.

References _GetModifiers().

Referenced by DefaultTTFEnglishNames(), and MacStyleCode().

◆ SFStandardHeight()

static double SFStandardHeight ( SplineFont sf,
int  layer,
int  do_max,
unichar_t list 
)
static

◆ SFXHeight()

double SFXHeight ( SplineFont sf,
int  layer,
int  return_error 
)

Definition at line 382 of file splinefont.c.

References bigreal, check-static-inits::result, SFStandardHeight(), and xheight_str.

Referenced by setos2().

◆ SPLFirstVisitorFoundSoughtXY()

static void SPLFirstVisitorFoundSoughtXY ( SplinePoint splfirst,
Spline spline,
void udata 
)
static

◆ SPLFirstVisitSplines()

void SPLFirstVisitSplines ( SplinePoint splfirst,
SPLFirstVisitSplinesVisitor  f,
void udata 
)

Visitor Function: print debug information about each spline Given a SplinePointList* that you want to visit each spline in the iteration is not as simple as it could be, so you can call this function passing spl->first as 'splfirst' and a visitor function which will see each spline in the splfirst colleciton.

For debug, you can pass SPLFirstVisitorDebug which will print information for each item in the splfirst collection.

You can pass any arbitrary data in as udata and SPLFirstVisit() will pass that udata to your visitor function without change. If you want a return value from your visitor, pass a pointer to a struct as udata. eg:

typedef struct SPLFirstVisitorFoundSoughtDataS { SplinePoint* sought; int found; } SPLFirstVisitorFoundSoughtData;

// ...

SPLFirstVisitorFoundSoughtData d; d.sought = sought; d.found = 0; SPLFirstVisit( spl->first, SPLFirstVisitorFoundSought, &d ); if( d.found ) return 1;

Definition at line 390 of file splinefont.c.

References f, first, splinepoint::next, next, NULL, and spline::to.

Referenced by SplinePointListContainsPointAtX().

◆ SplinePointListContainsPointAtX()

SplinePoint* SplinePointListContainsPointAtX ( SplinePointList container,
float  x 
)

Applies a visitor to the container and returns false if no point in the SPL has an x coordinate of 'x'.

Definition at line 488 of file splinefont.c.

References d, splinepointlist::first, splinepointlist::next, NULL, SPLFirstVisitorFoundSoughtXY(), SPLFirstVisitSplines(), and cordic::x.

Referenced by SFDGetSplineSet().

◆ SPLMaxHeight()

static double SPLMaxHeight ( SplineSet spl,
enum flatness isflat 
)
static

◆ SPLMinHeight()

static double SPLMinHeight ( SplineSet spl,
enum flatness isflat 
)
static

Variable Documentation

◆ capheight_str

unichar_t capheight_str[]
static
Initial value:
= { 'A', 0x40ffffff , 'Z',
0x391, 0x40ffffff , 0x3a9,
0x402, 0x404, 0x405, 0x406, 0x408, 0x40ffffff , 0x40b, 0x40f, 0x40ffffff , 0x418, 0x41a, 0x42f,
0 }

Definition at line 365 of file splinefont.c.

Referenced by SFCapHeight().

◆ fullmods

const char** fullmods[] = { realweights, modifierlistfull, ((void *)0) }
static

Definition at line 43 of file splinefont.c.

Referenced by _GetModifiers().

◆ knownweights

const char* knownweights[]
Initial value:
= { "Demi", "Bold", "Regu", "Medi", "Book", "Thin",
"Ligh", "Heav", "Blac", "Ultr", "Nord", "Norm", "Gras", "Stan", "Halb",
"Fett", "Mage", "Mitt", "Buch", ((void *)0) }

Definition at line 31 of file splinefont.c.

◆ modifierlist

const char* modifierlist[]
static
Initial value:
= { "Ital", "Obli", "Kursive", "Cursive", "Slanted",
"Expa", "Cond", ((void *)0) }

Definition at line 38 of file splinefont.c.

◆ modifierlistfull

const char* modifierlistfull[]
static
Initial value:
= { "Italic", "Oblique", "Kursive", "Cursive", "Slanted",
"Expanded", "Condensed", ((void *)0) }

Definition at line 40 of file splinefont.c.

◆ mods

◆ realweights

const char* realweights[]
Initial value:
= { "Demi", "Bold", "Regular", "Medium", "Book", "Thin",
"Light", "Heavy", "Black", "Ultra", "Nord", "Normal", "Gras", "Standard", "Halbfett",
"Fett", "Mager", "Mittel", "Buchschrift", ((void *)0) }

Definition at line 34 of file splinefont.c.

◆ xheight_str

unichar_t xheight_str[]
static
Initial value:
= { 'a', 'c', 'e', 'g', 'm', 'n', 'o', 'p', 'q', 'r', 's', 'u', 'v', 'w', 'x', 'y', 'z', 0x131,
0x3b3, 0x3b9, 0x3ba, 0x3bc, 0x3bd, 0x3c0, 0x3c3, 0x3c4, 0x3c5, 0x3c7, 0x3c8, 0x3c9,
0x432, 0x433, 0x438, 0x43a, 0x40ffffff , 0x43f, 0x442, 0x443, 0x445, 0x44c,0x44f, 0x459, 0x45a,
0 }

Definition at line 369 of file splinefont.c.

Referenced by SFXHeight().