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.
20 #define DUMPVAL(str, arg) \
21 fprintf(stream, "%*s = %ld\n", \
24 #define DUMPSTR(str, arg) \
25 fprintf(stream, "%*s = %s%s", \
28 #define DUMPSTRX(arg) \
29 fprintf(stream, "%s%*s %s%s", \
30 prev_eol, width, "", \
34 /* if `format' is set, we present the data in a more friendly format */
37 TA_font_dump_parameters(FONT
* font
,
48 const char* eol
= "\n";
49 const char* prev_eol
= "";
54 fprintf(stream
, "TTF_autohint parameters\n"
55 "=======================\n"
68 DUMPVAL("adjust-subglyphs",
69 font
->adjust_subglyphs
);
70 DUMPSTR("default-script",
71 script_names
[font
->default_script
]);
72 DUMPVAL("dw-cleartype-strong-stem-width",
73 font
->dw_cleartype_strong_stem_width
);
74 DUMPSTR("fallback-script",
75 script_names
[ta_style_classes
[font
->fallback_style
]->script
]);
76 DUMPVAL("fallback-stem-width",
77 font
->fallback_stem_width
);
78 DUMPVAL("gdi-cleartype-strong-stem-width",
79 font
->gdi_cleartype_strong_stem_width
);
80 DUMPVAL("gray-strong-stem-width",
81 font
->gray_strong_stem_width
);
82 DUMPVAL("hinting-limit",
84 DUMPVAL("hinting-range-max",
85 font
->hinting_range_max
);
86 DUMPVAL("hinting-range-min",
87 font
->hinting_range_min
);
88 DUMPVAL("hint-composites",
89 font
->hint_composites
);
90 DUMPVAL("ignore-restrictions",
91 font
->ignore_restrictions
);
92 DUMPVAL("increase-x-height",
93 font
->increase_x_height
);
96 DUMPVAL("windows-compatibility",
97 font
->windows_compatibility
);
99 s
= number_set_show(font
->x_height_snapping_exceptions
,
100 TA_PROP_INCREASE_X_HEIGHT_MIN
, 0x7FFF);
102 return FT_Err_Out_Of_Memory
;
104 DUMPSTR("x-height-snapping-exceptions", s
);
107 s
= TA_deltas_show(font
, deltas
);
109 return FT_Err_Out_Of_Memory
;
111 /* show delta exceptions data line by line */
118 token
= strtok_r(s
, "\n", &saveptr
);
119 DUMPSTR("delta exceptions", token
);
123 token
= strtok_r(NULL
, "\n", &saveptr
);
130 fprintf(stream
, "\n");
134 fprintf(stderr
, "\n");
139 /* end of tadump.c */