mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
training: Fix typos in comments and strings
All of them were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
64f9190575
commit
29f36d9264
@ -263,14 +263,14 @@ cmap_table cmap = {
|
||||
0x0000, /* encodingID = 0 */
|
||||
0x20000000, /* Offset of data */
|
||||
0x0600, /* STart of Apple table (format 6) */
|
||||
0x0C00, /* lenght of table (12) */
|
||||
0x0C00, /* length of table (12) */
|
||||
0x0000, /* Language must be 0 for non-Apple or
|
||||
non-specific language */
|
||||
0x0000, /* firstCode = 0 */
|
||||
0x0100, /* number of codes is 1 */
|
||||
0x0000, /* GID is 0 */
|
||||
0x0600, /* Start of MS Table (format 4) */
|
||||
0x0C00, /* lenght of table (12) */
|
||||
0x0C00, /* length of table (12) */
|
||||
0x0000, /* Language must be 0 for non-Apple or
|
||||
non-specific language */
|
||||
0x0000, /* firstCode = 0 */
|
||||
|
@ -175,7 +175,7 @@ void BoxChar::InsertSpaces(bool rtl_rules, bool vertical_rules,
|
||||
right = prev->x;
|
||||
}
|
||||
}
|
||||
// Left becomes the max right of all next boxes foward to the first
|
||||
// Left becomes the max right of all next boxes forward to the first
|
||||
// space or newline.
|
||||
for (int j = i + 2; j < boxes->size() && (*boxes)[j]->box_ != NULL &&
|
||||
(*boxes)[j]->ch_ != "\t";
|
||||
|
@ -78,7 +78,7 @@ int main(int argc, char **argv) {
|
||||
printf("Error combining tessdata files into %s\n",
|
||||
output_file.string());
|
||||
} else {
|
||||
printf("Output %s created sucessfully.\n", output_file.string());
|
||||
printf("Output %s created successfully.\n", output_file.string());
|
||||
}
|
||||
} else if (argc >= 4 && (strcmp(argv[1], "-e") == 0 ||
|
||||
strcmp(argv[1], "-u") == 0)) {
|
||||
|
@ -318,7 +318,7 @@ const char *GetNextFilename(int argc, const char* const * argv) {
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* This routine searches thru a list of labeled lists to find
|
||||
* This routine searches through a list of labeled lists to find
|
||||
* a list with the specified label. If a matching labeled list
|
||||
* cannot be found, NULL is returned.
|
||||
* @param List list to search
|
||||
@ -461,10 +461,10 @@ void FreeTrainingSamples(LIST CharList) {
|
||||
LIST FeatureList;
|
||||
|
||||
|
||||
iterate(CharList) { /* iterate thru all of the fonts */
|
||||
iterate(CharList) { /* iterate through all of the fonts */
|
||||
char_sample = (LABELEDLIST) first_node(CharList);
|
||||
FeatureList = char_sample->List;
|
||||
iterate(FeatureList) { /* iterate thru all of the classes */
|
||||
iterate(FeatureList) { /* iterate through all of the classes */
|
||||
FeatureSet = (FEATURE_SET) first_node(FeatureList);
|
||||
FreeFeatureSet(FeatureSet);
|
||||
}
|
||||
@ -743,7 +743,7 @@ void FreeLabeledClassList (
|
||||
{
|
||||
MERGE_CLASS MergeClass;
|
||||
|
||||
iterate (ClassList) /* iterate thru all of the fonts */
|
||||
iterate (ClassList) /* iterate through all of the fonts */
|
||||
{
|
||||
MergeClass = (MERGE_CLASS) first_node (ClassList);
|
||||
free (MergeClass->Label);
|
||||
@ -841,7 +841,7 @@ void FreeNormProtoList (
|
||||
{
|
||||
LABELEDLIST char_sample;
|
||||
|
||||
iterate (CharList) /* iterate thru all of the fonts */
|
||||
iterate (CharList) /* iterate through all of the fonts */
|
||||
{
|
||||
char_sample = (LABELEDLIST) first_node (CharList);
|
||||
FreeLabeledList (char_sample);
|
||||
|
@ -149,7 +149,7 @@ void ComputeMergedProto (PROTO p1,
|
||||
} /* ComputeMergedProto */
|
||||
|
||||
/**
|
||||
* This routine searches thru all of the prototypes in
|
||||
* This routine searches through all of the prototypes in
|
||||
* Class and returns the id of the proto which would provide
|
||||
* the best approximation of Prototype. If no close
|
||||
* approximation can be found, NO_PROTO is returned.
|
||||
|
@ -217,7 +217,7 @@ bool PangoFontInfo::ParseFontDescription(const PangoFontDescription *desc) {
|
||||
== PANGO_VARIANT_SMALL_CAPS);
|
||||
|
||||
is_bold_ = (pango_font_description_get_weight(desc) >= PANGO_WEIGHT_BOLD);
|
||||
// We dont have a way to detect whether a font is of type Fraktur. The fonts
|
||||
// We don't have a way to detect whether a font is of type Fraktur. The fonts
|
||||
// we currently use all have "Fraktur" in their family name, so we do a
|
||||
// fragile but functional check for that here.
|
||||
is_fraktur_ = (strcasestr(family, "Fraktur") != NULL);
|
||||
|
@ -50,7 +50,7 @@ class StringRenderer {
|
||||
StringRenderer(const string& font_desc, int page_width, int page_height);
|
||||
~StringRenderer();
|
||||
|
||||
// Renders the text with the chosen font and returns the byte offset upto
|
||||
// Renders the text with the chosen font and returns the byte offset up to
|
||||
// which the text could be rendered so as to fit the specified page
|
||||
// dimensions.
|
||||
int RenderToImage(const char* text, int text_length, Pix** pix);
|
||||
|
Loading…
Reference in New Issue
Block a user