3 // Copyright (C) 2012-2017 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_strong_stem_width
;
111 int gdi_cleartype_strong_stem_width
;
112 int dw_cleartype_strong_stem_width
;
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
;
210 QLabel
* default_label
;
211 QComboBox
* default_box
;
212 QLabel
* fallback_label
;
213 QComboBox
* fallback_box
;
214 QComboBox
* fallback_hint_or_scale_box
;
217 QString limit_label_text_with_key
;
218 QString limit_label_text
;
220 QCheckBox
* no_limit_box
;
221 QString no_limit_box_text_with_key
;
222 QString no_limit_box_text
;
224 QLabel
* x_increase_label
;
225 QString x_increase_label_text_with_key
;
226 QString x_increase_label_text
;
227 QSpinBox
* x_increase_box
;
228 QCheckBox
* no_x_increase_box
;
229 QString no_x_increase_box_text_with_key
;
230 QString no_x_increase_box_text
;
232 QLabel
* snapping_label
;
233 Tooltip_Line_Edit
* snapping_line
;
234 QLabel
* family_suffix_label
;
235 Tooltip_Line_Edit
* family_suffix_line
;
237 QLabel
* stem_width_label
;
238 QString stem_width_label_text_with_key
;
239 QString stem_width_label_text
;
240 QSpinBox
* stem_width_box
;
241 QCheckBox
* default_stem_width_box
;
242 QString default_stem_width_box_text_with_key
;
243 QString default_stem_width_box_text
;
245 QCheckBox
* wincomp_box
;
246 QCheckBox
* adjust_box
;
248 QCheckBox
* symbol_box
;
249 QCheckBox
* dehint_box
;
254 QCheckBox
* watch_box
;
255 QPushButton
* run_button
;
259 QAction
* about_Qt_act
;