4 * Copyright (C) 2014-2019 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) \
25 width, (str), (FT_Long)(arg)); \
27 #define DUMPSTR(str, arg) \
32 width, (str), (arg), eol); \
34 #define DUMPSTRX(arg) \
39 prev_eol, width, "", (arg), eol); \
44 /* if `format' is set, we present the data in a more friendly format */
47 TA_font_dump_parameters(FONT
* font
,
58 const char* eol
= "\n";
59 const char* prev_eol
= "";
66 s
= sdscat(s
, "TTF_autohint parameters\n"
67 "=======================\n");
73 DUMPSTR("ttfautohint version",
86 DUMPVAL("adjust-subglyphs",
87 font
->adjust_subglyphs
);
88 DUMPSTR("default-script",
89 script_names
[font
->default_script
]);
90 DUMPSTR("dw-cleartype-stem-width-mode",
91 (font
->dw_cleartype_stem_width_mode
== TA_STEM_WIDTH_MODE_NATURAL
)
93 : (font
->dw_cleartype_stem_width_mode
== TA_STEM_WIDTH_MODE_QUANTIZED
)
96 DUMPVAL("fallback-scaling",
97 font
->fallback_scaling
);
98 DUMPSTR("fallback-script",
99 script_names
[ta_style_classes
[font
->fallback_style
]->script
]);
100 DUMPVAL("fallback-stem-width",
101 font
->fallback_stem_width
);
102 DUMPSTR("gdi-cleartype-stem-width-mode",
103 (font
->gdi_cleartype_stem_width_mode
== TA_STEM_WIDTH_MODE_NATURAL
)
105 : (font
->gdi_cleartype_stem_width_mode
== TA_STEM_WIDTH_MODE_QUANTIZED
)
108 DUMPSTR("gray-stem-width-mode",
109 (font
->gray_stem_width_mode
== TA_STEM_WIDTH_MODE_NATURAL
)
111 : (font
->gray_stem_width_mode
== TA_STEM_WIDTH_MODE_QUANTIZED
)
114 DUMPVAL("hinting-limit",
115 font
->hinting_limit
);
116 DUMPVAL("hinting-range-max",
117 font
->hinting_range_max
);
118 DUMPVAL("hinting-range-min",
119 font
->hinting_range_min
);
120 DUMPVAL("hint-composites",
121 font
->hint_composites
);
122 DUMPVAL("ignore-restrictions",
123 font
->ignore_restrictions
);
124 DUMPVAL("increase-x-height",
125 font
->increase_x_height
);
126 if (font
->reference_name
)
128 font
->reference_name
);
129 else if (font
->reference_buf
)
135 DUMPVAL("reference-index",
136 font
->reference_index
);
141 DUMPVAL("windows-compatibility",
142 font
->windows_compatibility
);
144 ns
= number_set_show(font
->x_height_snapping_exceptions
,
145 TA_PROP_INCREASE_X_HEIGHT_MIN
, 0x7FFF);
153 DUMPSTR("x-height-snapping-exceptions", ns
);
155 ds
= TA_control_show(font
);
169 token
= strtok_r(ds
, "\n", &saveptr
);
171 DUMPSTR("control-instructions", token
);
174 DUMPSTR("control-instructions", "\\");
176 /* show control instructions line by line */
183 token
= strtok_r(NULL
, "\n", &saveptr
);
191 DUMPSTR("control-instructions", "");
205 res
= (char*)malloc(len
);
214 /* end of tadump.c */