4 * Copyright (C) 2014-2016 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");
81 DUMPVAL("adjust-subglyphs",
82 font
->adjust_subglyphs
);
83 DUMPSTR("default-script",
84 script_names
[font
->default_script
]);
85 DUMPVAL("dw-cleartype-strong-stem-width",
86 font
->dw_cleartype_strong_stem_width
);
87 DUMPVAL("fallback-scaling",
88 font
->fallback_scaling
);
89 DUMPSTR("fallback-script",
90 script_names
[ta_style_classes
[font
->fallback_style
]->script
]);
91 DUMPVAL("fallback-stem-width",
92 font
->fallback_stem_width
);
93 DUMPVAL("gdi-cleartype-strong-stem-width",
94 font
->gdi_cleartype_strong_stem_width
);
95 DUMPVAL("gray-strong-stem-width",
96 font
->gray_strong_stem_width
);
97 DUMPVAL("hinting-limit",
99 DUMPVAL("hinting-range-max",
100 font
->hinting_range_max
);
101 DUMPVAL("hinting-range-min",
102 font
->hinting_range_min
);
103 DUMPVAL("hint-composites",
104 font
->hint_composites
);
105 DUMPVAL("ignore-restrictions",
106 font
->ignore_restrictions
);
107 DUMPVAL("increase-x-height",
108 font
->increase_x_height
);
113 DUMPVAL("windows-compatibility",
114 font
->windows_compatibility
);
116 ns
= number_set_show(font
->x_height_snapping_exceptions
,
117 TA_PROP_INCREASE_X_HEIGHT_MIN
, 0x7FFF);
125 DUMPSTR("x-height-snapping-exceptions", ns
);
127 ds
= TA_control_show(font
);
141 token
= strtok_r(ds
, "\n", &saveptr
);
143 DUMPSTR("control-instructions", token
);
146 DUMPSTR("control-instructions", "\\");
148 /* show control instructions line by line */
155 token
= strtok_r(NULL
, "\n", &saveptr
);
163 DUMPSTR("control-instructions", "");
177 res
= (char*)malloc(len
);
186 /* end of tadump.c */