3 // Copyright (C) 2012-2022 by Werner Lemberg.
5 // This file is part of the ttfautohint library, and may only be used,
6 // modified, and distributed under the terms given in `COPYING'. By
7 // continuing to use, modify, or distribute this file you indicate that you
8 // have read `COPYING' and understand and accept it fully.
10 // The file `COPYING' mentioned in the previous paragraph is distributed
11 // with the ttfautohint library.
24 #include <QDesktopWidget>
25 #include <QFileDialog>
26 #include <QFileSystemModel>
27 #include <QFileSystemWatcher>
28 #include <QGridLayout>
30 #include <QMainWindow>
32 #include <QMessageBox>
33 #include <QProgressDialog>
34 #include <QPushButton>
38 #include "ddlineedit.h"
39 #include "ttlineedit.h"
42 #include <ttfautohint.h>
43 #include <numberset.h>
56 class Drag_Drop_Line_Edit
;
57 class Tooltip_Line_Edit
;
72 const char*, const char*, bool,
73 const char*, bool, bool, bool);
77 void closeEvent(QCloseEvent
*);
83 void browse_control();
84 void browse_reference();
89 void check_no_limit();
90 void check_no_x_increase();
91 void check_default_stem_width();
92 void absolute_input();
93 void absolute_output();
94 void absolute_control();
95 void absolute_reference();
96 void set_ref_idx_box_max();
97 void check_number_set();
98 void check_family_suffix();
99 void clear_status_bar();
107 int hinting_range_min
;
108 int hinting_range_max
;
110 int gray_stem_width_mode
;
111 int gdi_cleartype_stem_width_mode
;
112 int dw_cleartype_stem_width_mode
;
113 int increase_x_height
;
114 QString x_height_snapping_exceptions_string
;
115 number_range
* x_height_snapping_exceptions
;
116 int fallback_stem_width
;
117 int ignore_restrictions
;
118 int windows_compatibility
;
119 int adjust_subglyphs
;
123 int default_script_idx
;
124 int fallback_script_idx
;
125 int fallback_scaling
;
126 QString family_suffix
;
132 const int fallback_do_scale
;
133 const int fallback_do_hint
;
138 void create_layout(bool);
139 void create_horizontal_layout();
140 void create_vertical_layout();
148 QFileSystemWatcher
* file_watcher
;
150 QFileInfo fileinfo_input_file
;
151 QFileInfo fileinfo_control_file
;
152 QFileInfo fileinfo_reference_file
;
153 QDateTime datetime_input_file
;
154 QDateTime datetime_control_file
;
155 QDateTime datetime_reference_file
;
158 void create_connections();
159 void create_actions();
161 void create_status_bar();
163 void read_settings();
164 void write_settings();
166 int check_filenames(const QString
&,
170 int open_files(const QString
&, FILE**,
171 const QString
&, FILE**,
172 const QString
&, FILE**,
173 const QString
&, FILE**);
174 int handle_error(TA_Error
, const unsigned char*, QString
);
176 void stop_watching();
182 Drag_Drop_Line_Edit
* input_line
;
183 QPushButton
* input_button
;
185 QLabel
* output_label
;
186 Drag_Drop_Line_Edit
* output_line
;
187 QPushButton
* output_button
;
189 QLabel
* control_label
;
190 Drag_Drop_Line_Edit
* control_line
;
191 QPushButton
* control_button
;
193 QLabel
* reference_label
;
194 Drag_Drop_Line_Edit
* reference_line
;
195 QPushButton
* reference_button
;
197 QLabel
* ref_idx_label
;
198 QSpinBox
* ref_idx_box
;
214 QLabel
* default_label
;
215 QComboBox
* default_box
;
216 QLabel
* fallback_label
;
217 QComboBox
* fallback_box
;
218 QComboBox
* fallback_hint_or_scale_box
;
221 QString limit_label_text_with_key
;
222 QString limit_label_text
;
224 QCheckBox
* no_limit_box
;
225 QString no_limit_box_text_with_key
;
226 QString no_limit_box_text
;
228 QLabel
* x_increase_label
;
229 QString x_increase_label_text_with_key
;
230 QString x_increase_label_text
;
231 QSpinBox
* x_increase_box
;
232 QCheckBox
* no_x_increase_box
;
233 QString no_x_increase_box_text_with_key
;
234 QString no_x_increase_box_text
;
236 QLabel
* snapping_label
;
237 Tooltip_Line_Edit
* snapping_line
;
238 QLabel
* family_suffix_label
;
239 Tooltip_Line_Edit
* family_suffix_line
;
241 QLabel
* stem_width_label
;
242 QString stem_width_label_text_with_key
;
243 QString stem_width_label_text
;
244 QSpinBox
* stem_width_box
;
245 QCheckBox
* default_stem_width_box
;
246 QString default_stem_width_box_text_with_key
;
247 QString default_stem_width_box_text
;
249 QCheckBox
* wincomp_box
;
250 QCheckBox
* adjust_box
;
252 QCheckBox
* symbol_box
;
253 QCheckBox
* dehint_box
;
258 QCheckBox
* watch_box
;
259 QPushButton
* run_button
;
263 QAction
* about_Qt_act
;