projects
/
ttf-to-distfield.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use texCoords instead of tex_coords to match standard JavaScript fields.
[ttf-to-distfield.git]
/
ttf-to-distfield.cpp
diff --git
a/ttf-to-distfield.cpp
b/ttf-to-distfield.cpp
index
c75053c
..
906c4c9
100644
(file)
--- a/
ttf-to-distfield.cpp
+++ b/
ttf-to-distfield.cpp
@@
-1,3
+1,10
@@
+/** ttf-to-distfield - Render a distance field from a TrueType font
+ by Joe Wreschnig
+
+ This code is released into the public domain via the CC0 Public
+ Domain Dedication.
+*/
+
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
@@
-348,7
+355,7
@@
int main(int argc, char **argv) {
glyph.advance_x, glyph.advance_y);
fprintf(f, " \"offset\": [%g, %g],\n",
glyph.left, glyph.top);
glyph.advance_x, glyph.advance_y);
fprintf(f, " \"offset\": [%g, %g],\n",
glyph.left, glyph.top);
- fprintf(f, " \"tex
_c
oords\": [%g, %g, %g, %g]\n",
+ fprintf(f, " \"tex
C
oords\": [%g, %g, %g, %g]\n",
glyph.u0, glyph.v0, glyph.u1, glyph.v1);
fprintf(f, " }");
total.blit(glyph.pixels, glyph.x, glyph.y);
glyph.u0, glyph.v0, glyph.u1, glyph.v1);
fprintf(f, " }");
total.blit(glyph.pixels, glyph.x, glyph.y);