From 29f36d926414984ff8e3b4349af6db54b3ff9ad0 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 4 Nov 2015 09:54:00 +0100 Subject: [PATCH] training: Fix typos in comments and strings All of them were found by codespell. Signed-off-by: Stefan Weil --- training/GlyphLessFont.c | 4 ++-- training/boxchar.cpp | 2 +- training/combine_tessdata.cpp | 2 +- training/commontraining.cpp | 10 +++++----- training/mergenf.cpp | 2 +- training/pango_font_info.cpp | 2 +- training/stringrenderer.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/training/GlyphLessFont.c b/training/GlyphLessFont.c index 5321f7def9..6aba1f795c 100644 --- a/training/GlyphLessFont.c +++ b/training/GlyphLessFont.c @@ -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 */ diff --git a/training/boxchar.cpp b/training/boxchar.cpp index 276d8af6d2..b99c12a600 100644 --- a/training/boxchar.cpp +++ b/training/boxchar.cpp @@ -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"; diff --git a/training/combine_tessdata.cpp b/training/combine_tessdata.cpp index dffd6f40d3..894d56d707 100644 --- a/training/combine_tessdata.cpp +++ b/training/combine_tessdata.cpp @@ -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)) { diff --git a/training/commontraining.cpp b/training/commontraining.cpp index 5d951bb94e..1c4cc832bc 100644 --- a/training/commontraining.cpp +++ b/training/commontraining.cpp @@ -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); diff --git a/training/mergenf.cpp b/training/mergenf.cpp index 402533cbba..1f7c9a413c 100644 --- a/training/mergenf.cpp +++ b/training/mergenf.cpp @@ -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. diff --git a/training/pango_font_info.cpp b/training/pango_font_info.cpp index 30581ed8cd..b5425913eb 100644 --- a/training/pango_font_info.cpp +++ b/training/pango_font_info.cpp @@ -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); diff --git a/training/stringrenderer.h b/training/stringrenderer.h index 1b64b3b47b..7c50db2623 100644 --- a/training/stringrenderer.h +++ b/training/stringrenderer.h @@ -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);