Skip to content

Commit

Permalink
training: Fix typos in comments and strings
Browse files Browse the repository at this point in the history
All of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Nov 4, 2015
1 parent 64f9190 commit 29f36d9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions training/GlyphLessFont.c
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion training/boxchar.cpp
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion training/combine_tessdata.cpp
Expand Up @@ -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)) {
Expand Down
10 changes: 5 additions & 5 deletions training/commontraining.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion training/mergenf.cpp
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion training/pango_font_info.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion training/stringrenderer.h
Expand Up @@ -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);
Expand Down

0 comments on commit 29f36d9

Please sign in to comment.