Lines Matching refs:bad_row
142 void fix_row_pitch(TO_ROW *bad_row, // row to fix in fix_row_pitch() argument
163 maxwidth = (inT32) ceil (bad_row->xheight * textord_words_maxspace); in fix_row_pitch()
164 if (bad_row->pitch_decision != PITCH_DEF_FIXED in fix_row_pitch()
165 && bad_row->pitch_decision != PITCH_DEF_PROP) { in fix_row_pitch()
177 if ((bad_row->all_caps in fix_row_pitch()
180 (bad_row->xheight + bad_row->ascrise) * (1 + in fix_row_pitch()
183 (bad_row->xheight + bad_row->ascrise) * (1 - in fix_row_pitch()
185 || (!bad_row->all_caps in fix_row_pitch()
187 bad_row->xheight * (1 + textord_pitch_rowsimilarity) in fix_row_pitch()
189 bad_row->xheight * (1 - textord_pitch_rowsimilarity))) { in fix_row_pitch()
242 bad_row->fixed_pitch = block_stats.ile (0.5); in fix_row_pitch()
243 bad_row->pitch_decision = PITCH_CORR_FIXED; in fix_row_pitch()
246 bad_row->fixed_pitch = like_stats.ile (0.5); in fix_row_pitch()
247 bad_row->pitch_decision = PITCH_CORR_FIXED; in fix_row_pitch()
250 bad_row->pitch_decision = PITCH_CORR_PROP; in fix_row_pitch()
263 tprintf("x=%g:asc=%g\n", bad_row->xheight, bad_row->ascrise); in fix_row_pitch()
265 if (bad_row->pitch_decision == PITCH_CORR_FIXED) { in fix_row_pitch()
266 if (bad_row->fixed_pitch < textord_min_xheight) { in fix_row_pitch()
268 bad_row->fixed_pitch = block_stats.ile (0.5); in fix_row_pitch()
270 bad_row->fixed_pitch = like_stats.ile (0.5); in fix_row_pitch()
275 bad_row->fixed_pitch = bad_row->xheight; in fix_row_pitch()
278 if (bad_row->fixed_pitch < textord_min_xheight) in fix_row_pitch()
279 bad_row->fixed_pitch = (float) textord_min_xheight; in fix_row_pitch()
280 bad_row->kern_size = bad_row->fixed_pitch / 4; in fix_row_pitch()
281 bad_row->min_space = (inT32) (bad_row->fixed_pitch * 0.6); in fix_row_pitch()
282 bad_row->max_nonspace = (inT32) (bad_row->fixed_pitch * 0.4); in fix_row_pitch()
283 bad_row->space_threshold = in fix_row_pitch()
284 (bad_row->min_space + bad_row->max_nonspace) / 2; in fix_row_pitch()
285 bad_row->space_size = bad_row->fixed_pitch; in fix_row_pitch()
286 if (bad_row->char_cells.empty ()) in fix_row_pitch()
287 tune_row_pitch (bad_row, &bad_row->projection, in fix_row_pitch()
288 bad_row->projection_left, bad_row->projection_right, in fix_row_pitch()
289 (bad_row->fixed_pitch + in fix_row_pitch()
290 bad_row->max_nonspace * 3) / 4, bad_row->fixed_pitch, in fix_row_pitch()
291 sp_sd, mid_cuts, &bad_row->char_cells, FALSE); in fix_row_pitch()
293 else if (bad_row->pitch_decision == PITCH_CORR_PROP in fix_row_pitch()
294 || bad_row->pitch_decision == PITCH_DEF_PROP) { in fix_row_pitch()
295 bad_row->fixed_pitch = 0.0f; in fix_row_pitch()
296 bad_row->char_cells.clear (); in fix_row_pitch()