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)  

primitives.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <float.h>
Include dependency graph for primitives.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define POS_MAX   FLT_MAX
 
#define POS_MIN   FLT_MIN
 
#define f16dot16_precision   16
 
#define f16dot16_k   (1 << (f16dot16_precision - 1))
 
#define f16dot16_infinity   ((f16dot16)0x7fffffff)
 
#define f16dot16_negativeIntinity   ((f16dot16)0x80000000)
 

Typedefs

typedef int16_t f2dot14
 
typedef int32_t f16dot16
 
typedef uint16_t glyphid_t
 
typedef uint16_t glyphclass_t
 
typedef uint16_t glyphsize_t
 
typedef uint16_t tableid_t
 
typedef uint16_t colorid_t
 
typedef uint16_t shapeid_t
 
typedef uint16_t cffsid_t
 
typedef uint32_t arity_t
 
typedef uint32_t unicode_t
 
typedef double pos_t
 
typedef double scale_t
 
typedef double length_t
 

Functions

double otfcc_from_f2dot14 (const f2dot14 x)
 
int16_t otfcc_to_f2dot14 (const double x)
 
double otfcc_from_fixed (const f16dot16 x)
 
f16dot16 otfcc_to_fixed (const double x)
 
f16dot16 otfcc_f1616_add (f16dot16 a, f16dot16 b)
 
f16dot16 otfcc_f1616_minus (f16dot16 a, f16dot16 b)
 
f16dot16 otfcc_f1616_multiply (f16dot16 a, f16dot16 b)
 
f16dot16 otfcc_f1616_divide (f16dot16 a, f16dot16 b)
 
f16dot16 otfcc_f1616_muldiv (f16dot16 a, f16dot16 b, f16dot16 c)
 

Macro Definition Documentation

◆ f16dot16_infinity

#define f16dot16_infinity   ((f16dot16)0x7fffffff)

Definition at line 38 of file primitives.h.

◆ f16dot16_k

#define f16dot16_k   (1 << (f16dot16_precision - 1))

Definition at line 37 of file primitives.h.

◆ f16dot16_negativeIntinity

#define f16dot16_negativeIntinity   ((f16dot16)0x80000000)

Definition at line 39 of file primitives.h.

◆ f16dot16_precision

#define f16dot16_precision   16

Definition at line 36 of file primitives.h.

◆ POS_MAX

#define POS_MAX   FLT_MAX

Definition at line 26 of file primitives.h.

◆ POS_MIN

#define POS_MIN   FLT_MIN

Definition at line 27 of file primitives.h.

Typedef Documentation

◆ arity_t

typedef uint32_t arity_t

Definition at line 21 of file primitives.h.

◆ cffsid_t

typedef uint16_t cffsid_t

Definition at line 20 of file primitives.h.

◆ colorid_t

Definition at line 18 of file primitives.h.

◆ f16dot16

typedef int32_t f16dot16

Definition at line 9 of file primitives.h.

◆ f2dot14

static double f2dot14

Definition at line 8 of file primitives.h.

◆ glyphclass_t

Definition at line 15 of file primitives.h.

◆ glyphid_t

Definition at line 14 of file primitives.h.

◆ glyphsize_t

Definition at line 16 of file primitives.h.

◆ length_t

typedef double length_t

Definition at line 29 of file primitives.h.

◆ pos_t

typedef double pos_t

Definition at line 24 of file primitives.h.

◆ scale_t

typedef double scale_t

Definition at line 25 of file primitives.h.

◆ shapeid_t

Definition at line 19 of file primitives.h.

◆ tableid_t

Definition at line 17 of file primitives.h.

◆ unicode_t

Definition at line 22 of file primitives.h.

Function Documentation

◆ otfcc_f1616_add()

f16dot16 otfcc_f1616_add ( f16dot16  a,
f16dot16  b 
)

Definition at line 30 of file primitives.c.

References a, and b.

◆ otfcc_f1616_divide()

f16dot16 otfcc_f1616_divide ( f16dot16  a,
f16dot16  b 
)

Definition at line 64 of file primitives.c.

References a, b, divide(), and f16dot16_precision.

◆ otfcc_f1616_minus()

f16dot16 otfcc_f1616_minus ( f16dot16  a,
f16dot16  b 
)

Definition at line 33 of file primitives.c.

References a, and b.

◆ otfcc_f1616_muldiv()

f16dot16 otfcc_f1616_muldiv ( f16dot16  a,
f16dot16  b,
f16dot16  c 
)

Definition at line 60 of file primitives.c.

References a, b, c, divide(), f16dot16_k, and int64_t.

Referenced by fillTheGaps().

◆ otfcc_f1616_multiply()

f16dot16 otfcc_f1616_multiply ( f16dot16  a,
f16dot16  b 
)

Definition at line 37 of file primitives.c.

References a, b, clamp(), f16dot16_k, f16dot16_precision, and int64_t.

◆ otfcc_from_f2dot14()

double otfcc_from_f2dot14 ( const f2dot14  x)

Definition at line 6 of file primitives.c.

References cordic::x.

Referenced by createRegionFromTuples(), and otfcc_read_composite_glyph().

◆ otfcc_from_fixed()

double otfcc_from_fixed ( const f16dot16  x)

◆ otfcc_to_f2dot14()

int16_t otfcc_to_f2dot14 ( const double  x)

Definition at line 9 of file primitives.c.

References round, and cordic::x.

Referenced by glyf_build_composite(), hashVQS(), and nameGlyphByHash().

◆ otfcc_to_fixed()