summaryrefslogtreecommitdiff
path: root/05/tests/parse_stb_truetype.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-09 15:50:02 -0500
committerpommicket <pommicket@gmail.com>2022-02-09 15:50:02 -0500
commitd74dc53b0b07e5e29cf5db744342a73826779325 (patch)
tree6bde7f57e42b6a6848da08b5c85b118b6eb8f7f3 /05/tests/parse_stb_truetype.h
parentc548b12bbb500397b9f18e15af5589d89f25cfe2 (diff)
more parsing tests, fixed more bugs
- we now handle incomplete structs properly - small fix in for loop printing
Diffstat (limited to '05/tests/parse_stb_truetype.h')
-rw-r--r--05/tests/parse_stb_truetype.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/05/tests/parse_stb_truetype.h b/05/tests/parse_stb_truetype.h
index e582b43..ce520fa 100644
--- a/05/tests/parse_stb_truetype.h
+++ b/05/tests/parse_stb_truetype.h
@@ -1634,7 +1634,7 @@ static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, s
stbtt_uint16 flags, gidx;
int comp_num_verts = 0, i;
stbtt_vertex *comp_verts = 0, *tmp = 0;
- float mtx[6] = {1,0,0,1,0,0}, m, n;
+ float mtx[6] = {0,0,0,0,0,0}, m, n;
flags = ttSHORT(comp); comp+=2;
gidx = ttSHORT(comp); comp+=2;
@@ -4282,7 +4282,7 @@ static int equal(float *a, float *b)
static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex *verts)
{
int i;
- float orig[2], ray[2] = { 1, 0 };
+ float orig[2], ray[2] = { 0, 0 };
float y_frac;
int winding = 0;
@@ -4497,7 +4497,7 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
float ax = x1-x0, ay = y1-y0;
float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;
float mx = x0 - sx, my = y0 - sy;
- float res[3] = {0.f,0.f,0.f};
+ float res[3] = {0,0,0};
float px,py,t,it,dist2;
float a_inv = precompute[i];
if (a_inv == 0.0) {