Skip to content

Commit

Permalink
[tx] dump flex hint in one line
Browse files Browse the repository at this point in the history
resolves #915
  • Loading branch information
cjchapman committed Aug 21, 2019
1 parent 54e4c3c commit 2fd2461
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 1 addition & 6 deletions c/public/lib/source/absfont/absfont_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ static void glyphFlex(abfGlyphCallbacks *cb, float depth,
float x4, float y4,
float x5, float y5,
float x6, float y6) {
char buf[128];
char buf[256];
const size_t bufLen = sizeof(buf);
buf[0] = 0;

Expand All @@ -573,8 +573,6 @@ static void glyphFlex(abfGlyphCallbacks *cb, float depth,
writeReal(buf, bufLen, y2);
writeReal(buf, bufLen, x3);
writeReal(buf, bufLen, y3);
dumpInstr(cb, "%s", buf);
buf[0] = 0;
writeReal(buf, bufLen, x4);
writeReal(buf, bufLen, y4);
writeReal(buf, bufLen, x5);
Expand All @@ -584,9 +582,6 @@ static void glyphFlex(abfGlyphCallbacks *cb, float depth,
writeReal(buf, bufLen, depth);
STRCAT_S(buf, bufLen, " flex");
dumpInstr(cb, "%s", buf);

// dumpInstr(cb, " %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f flex",
// x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, depth);
}

/* Dump glyph general operator. */
Expand Down
6 changes: 2 additions & 4 deletions tests/tx_data/expected_output/flex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ glyph[1] {exclam,-,
305 356 hstem
180 270 vstem
100 0 move
139 3 178 5 225 5
272 5 311 3 350 0 50 flex
139 3 178 5 225 5 272 5 311 3 350 0 50 flex
350 55 line
275 55 line
272 94 270 133 270 180 curve
270 227 272 266 275 305 curve
350 305 line
350 356 line
311 353 272 351 225 351
178 351 139 353 100 356 50 flex
311 353 272 351 225 351 178 351 139 353 100 356 50 flex
100 305 line
175 305 line
178 266 180 227 180 180 curve
Expand Down

0 comments on commit 2fd2461

Please sign in to comment.