4 * Copyright (C) 2014 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
15 #define _POSIX_SOURCE /* to access `strtok_r' with glibc */
21 #define DUMPVAL(str, arg) \
22 fprintf(stream, "%*s = %ld\n", \
25 #define DUMPSTR(str, arg) \
26 fprintf(stream, "%*s = %s%s", \
29 #define DUMPSTRX(arg) \
30 fprintf(stream, "%s%*s %s%s", \
31 prev_eol, width, "", \
35 /* if `format' is set, we present the data in a more friendly format */
38 TA_font_dump_parameters(FONT
* font
,
49 const char* eol
= "\n";
50 const char* prev_eol
= "";
55 fprintf(stream
, "TTF_autohint parameters\n"
56 "=======================\n"
69 DUMPVAL("adjust-subglyphs",
70 font
->adjust_subglyphs
);
71 DUMPSTR("default-script",
72 script_names
[font
->default_script
]);
73 DUMPVAL("dw-cleartype-strong-stem-width",
74 font
->dw_cleartype_strong_stem_width
);
75 DUMPSTR("fallback-script",
76 script_names
[ta_style_classes
[font
->fallback_style
]->script
]);
77 DUMPVAL("fallback-stem-width",
78 font
->fallback_stem_width
);
79 DUMPVAL("gdi-cleartype-strong-stem-width",
80 font
->gdi_cleartype_strong_stem_width
);
81 DUMPVAL("gray-strong-stem-width",
82 font
->gray_strong_stem_width
);
83 DUMPVAL("hinting-limit",
85 DUMPVAL("hinting-range-max",
86 font
->hinting_range_max
);
87 DUMPVAL("hinting-range-min",
88 font
->hinting_range_min
);
89 DUMPVAL("hint-composites",
90 font
->hint_composites
);
91 DUMPVAL("ignore-restrictions",
92 font
->ignore_restrictions
);
93 DUMPVAL("increase-x-height",
94 font
->increase_x_height
);
97 DUMPVAL("windows-compatibility",
98 font
->windows_compatibility
);
100 s
= number_set_show(font
->x_height_snapping_exceptions
,
101 TA_PROP_INCREASE_X_HEIGHT_MIN
, 0x7FFF);
103 return FT_Err_Out_Of_Memory
;
105 DUMPSTR("x-height-snapping-exceptions", s
);
108 s
= TA_deltas_show(font
, deltas
);
110 return FT_Err_Out_Of_Memory
;
112 /* show delta exceptions data line by line */
119 token
= strtok_r(s
, "\n", &saveptr
);
120 DUMPSTR("delta exceptions", token
);
124 token
= strtok_r(NULL
, "\n", &saveptr
);
131 fprintf(stream
, "\n");
135 fprintf(stderr
, "\n");
140 /* end of tadump.c */