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
Go to the documentation of this file.
1 #ifndef CARYLL_INCLUDE_OTFCC_PRIMITIVES_H
2 #define CARYLL_INCLUDE_OTFCC_PRIMITIVES_H
3 
4 #include <stdint.h>
5 #include <stdbool.h>
6 #include <float.h>
7 
8 typedef int16_t f2dot14; // 2.14 Fixed number, representing a value between [-1, 1].
9 typedef int32_t f16dot16; // 16.16 Fixed number, usually used by intermediate coordiantes of a font.
10  // To deal with implicit deltas in GVAR we must be very careful about it.
11  // Arithmetic operators saturate towards positive or negative infinity.
12  // Infinity values short circuit expressions.
13 
14 typedef uint16_t glyphid_t; // Glyph index
15 typedef uint16_t glyphclass_t; // Glyph class
16 typedef uint16_t glyphsize_t; // GASP glyph size
17 typedef uint16_t tableid_t; // Table/Font structure index
18 typedef uint16_t colorid_t; // Color index
19 typedef uint16_t shapeid_t; // Shape index
20 typedef uint16_t cffsid_t; // CFF/CFF2 String index
21 typedef uint32_t arity_t; // CFF Arity/Stack depth
22 typedef uint32_t unicode_t; // Unicode
23 
24 typedef double pos_t; // Position
25 typedef double scale_t; // transform scaling
26 #define POS_MAX FLT_MAX
27 #define POS_MIN FLT_MIN
28 
29 typedef double length_t; // Length
30 
31 double otfcc_from_f2dot14(const f2dot14 x);
32 int16_t otfcc_to_f2dot14(const double x);
33 double otfcc_from_fixed(const f16dot16 x);
34 f16dot16 otfcc_to_fixed(const double x);
35 
36 #define f16dot16_precision 16
37 #define f16dot16_k (1 << (f16dot16_precision - 1))
38 #define f16dot16_infinity ((f16dot16)0x7fffffff)
39 #define f16dot16_negativeIntinity ((f16dot16)0x80000000)
40 
46 
47 #endif
#define b
Definition: jpegint.h:372
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
signed short int16_t
Definition: stdint.h:76
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
float x
Definition: cordic.py:15
uint32_t arity_t
Definition: primitives.h:21
double pos_t
Definition: primitives.h:24
uint16_t tableid_t
Definition: primitives.h:17
double length_t
Definition: primitives.h:29
uint16_t shapeid_t
Definition: primitives.h:19
f16dot16 otfcc_f1616_muldiv(f16dot16 a, f16dot16 b, f16dot16 c)
Definition: primitives.c:60
uint32_t unicode_t
Definition: primitives.h:22
uint16_t glyphid_t
Definition: primitives.h:14
f16dot16 otfcc_f1616_add(f16dot16 a, f16dot16 b)
Definition: primitives.c:30
int32_t f16dot16
Definition: primitives.h:9
uint16_t glyphclass_t
Definition: primitives.h:15
f16dot16 otfcc_f1616_divide(f16dot16 a, f16dot16 b)
Definition: primitives.c:64
double otfcc_from_f2dot14(const f2dot14 x)
Definition: primitives.c:6
double otfcc_from_fixed(const f16dot16 x)
Definition: primitives.c:14
uint16_t glyphsize_t
Definition: primitives.h:16
f16dot16 otfcc_f1616_minus(f16dot16 a, f16dot16 b)
Definition: primitives.c:33
double scale_t
Definition: primitives.h:25
uint16_t cffsid_t
Definition: primitives.h:20
f16dot16 otfcc_f1616_multiply(f16dot16 a, f16dot16 b)
Definition: primitives.c:37
int16_t otfcc_to_f2dot14(const double x)
Definition: primitives.c:9
int16_t f2dot14
Definition: primitives.h:8
uint16_t colorid_t
Definition: primitives.h:18
f16dot16 otfcc_to_fixed(const double x)
Definition: primitives.c:17