#include "cjkpitch.h"
#include "genericvector.h"
#include "topitch.h"
#include "tovars.h"
#include <algorithm>
#include <vector>
Go to the source code of this file.
| void compute_fixed_pitch_cjk |
( |
ICOORD |
page_tr, |
|
|
TO_BLOCK_LIST * |
port_blocks |
|
) |
| |
Definition at line 1041 of file cjkpitch.cpp.
1043 FPAnalyzer analyzer(page_tr, port_blocks);
1044 if (analyzer.num_rows() == 0)
return;
1046 analyzer.Pass1Analyze();
1047 analyzer.EstimatePitch(
true);
1051 analyzer.Pass1Analyze();
1052 analyzer.EstimatePitch(
true);
1055 if (!analyzer.maybe_fixed_pitch()) {
1057 tprintf(
"Page doesn't seem to contain fixed pitch rows\n");
1062 unsigned iteration = 0;
1064 analyzer.MergeFragments();
1065 analyzer.FinalizeLargeChars();
1066 analyzer.EstimatePitch(
false);
1068 }
while (analyzer.Pass2Analyze() && iteration < analyzer.max_iteration());
1071 tprintf(
"compute_fixed_pitch_cjk finished after %u iteration (limit=%u)\n",
1072 iteration, analyzer.max_iteration());
1075 analyzer.OutputEstimations();
bool textord_debug_pitch_test
DLLSYM void tprintf(const char *format,...)