Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

flake: fix various typos Fixes some doc typos

Kunda Kic988a1d6b3ca
diff --git a/libs/flake/KoDocumentResourceManager.h b/libs/flake/KoDocumentResourceManager.h
index 02615291a4..90b44caf1c 100644
--- a/libs/flake/KoDocumentResourceManager.h
+++ b/libs/flake/KoDocumentResourceManager.h
@@ -59,7 +59,7 @@ enum DocumentResource {
OdfDocument, ///< OBSOLETE The document this canvas shows
GrabSensitivity, ///< The grab sensitivity used for grabbing handles of any kind
MarkerCollection, ///< The collection holding all markers
- DocumentResolution, ///< Pixels-per-inch resoluton of the document
+ DocumentResolution, ///< Pixels-per-inch resolution of the document
DocumentRectInPixels, ///< Bounds of the document in pixels
KarbonStart = 1000, ///< Base number for Karbon specific values.
diff --git a/libs/flake/KoPathShape.h b/libs/flake/KoPathShape.h
index 9ebee1cea4..e6852e74f8 100644
--- a/libs/flake/KoPathShape.h
+++ b/libs/flake/KoPathShape.h
@@ -197,7 +197,7 @@ public:
/**
* @brief Returns the path points within the given rectangle.
* @param rect the rectangle the requested points are in
- * @param useControlPoints wether to add control points to result or not
+ * @param useControlPoints whether to add control points to result or not
* @return list of points within the rectangle
*/
QList<KoPathPoint*> pointsAt(const QRectF &rect, const bool useControlPoints = false) const;
diff --git a/libs/flake/KoShape.h b/libs/flake/KoShape.h
index 4cec4fd774..12cde03c6a 100644
--- a/libs/flake/KoShape.h
+++ b/libs/flake/KoShape.h
@@ -433,7 +433,7 @@ public:
virtual void setBackground(QSharedPointer<KoShapeBackground> background);
/**
- * return the brush used to paint te background of this shape with.
+ * Return the brush used to paint the background of this shape with.
* A QBrush can have a plain color, be fully transparent or have a complex fill.
* setting such a brush will allow the shape to fill itself using that brush and
* will be able to tell if its transparent or not.
diff --git a/libs/flake/KoShapeSavingContext.h b/libs/flake/KoShapeSavingContext.h
index 074db0ff16..bded6ad1e9 100644
--- a/libs/flake/KoShapeSavingContext.h
+++ b/libs/flake/KoShapeSavingContext.h
@@ -89,7 +89,7 @@ public:
/**
* @brief Check if an option is set
*
- * @return ture if the option is set, false otherwise
+ * @return true if the option is set, false otherwise
*/
bool isSet(ShapeSavingOption option) const;
diff --git a/libs/flake/resources/KoCssStylePreset.h b/libs/flake/resources/KoCssStylePreset.h
index 2b10fea625..05ce3d94ec 100644
--- a/libs/flake/resources/KoCssStylePreset.h
+++ b/libs/flake/resources/KoCssStylePreset.h
@@ -79,8 +79,8 @@ public:
*/
KoShape* generateSampleShape() const;
- /// Determines the prefered sample alignment based on the text properties. It's set up so that
- /// the alignment anchor of the text is shown.
+ /// Determines the preferred sample alignment based on the text properties.
+ /// It's set up so that the alignment anchor of the text is shown.
Qt::Alignment alignSample() const;
/**
diff --git a/libs/flake/svg/SvgParser.h b/libs/flake/svg/SvgParser.h
index deafc2754c..bffe7afa39 100644
--- a/libs/flake/svg/SvgParser.h
+++ b/libs/flake/svg/SvgParser.h
@@ -58,7 +58,7 @@ public:
void setResolution(const QRectF boundsInPixels, qreal pixelsPerInch);
void setDefaultKraTextVersion(int version);
- // Set whether to always consider shapes without fill or stroke explicitely set as inherited.
+ // Set whether to always consider shapes without fill or stroke explicitly set as inherited.
// By default, this is off, and the parser retrieves the fill from the graphicsContext.
void setFillStrokeInheritByDefault(const bool enable);
diff --git a/libs/flake/tests/TestSvgText.cpp b/libs/flake/tests/TestSvgText.cpp
index b97b96803b..1c87d3f196 100644
--- a/libs/flake/tests/TestSvgText.cpp
+++ b/libs/flake/tests/TestSvgText.cpp
@@ -1379,7 +1379,7 @@ void TestSvgText::testTextFontSize()
/**
* @brief TestSvgText::testAddingTestFont
*
- * This test tests whether we can add a font to the font registery
+ * This test tests whether we can add a font to the font registry
* and retrieve it afterwards. Without this, we won't be able to
* write reliable machine tests given how much of text rendering is
* font specific.
@@ -2100,7 +2100,7 @@ void TestSvgText::testFontSizeRender()
/**
* @brief TestSvgText::testFontOpenTypeVariationsConfiguration
*
- * test whether we can succefully confgiure the axes for an opentype
+ * test whether we can successfully configure the axes for an opentype
* variation font. This test is an adaptation of web-platform-test
* style-ranges-over-weight-direction.html
*/
@@ -2124,7 +2124,7 @@ void TestSvgText::testFontOpenTypeVariationsConfiguration()
/**
* Testing color font rendering.
*
- * This right now only tests COLRv0 fonts, beecause we don't support COLRv1 and SVG-in-opentype yet,
+ * This right now only tests COLRv0 fonts, because we don't support COLRv1 and SVG-in-opentype yet,
* and I have no idea what to expect from SBX.
*
* TODO: Still searching for a CBDT font.
@@ -2159,7 +2159,7 @@ void TestSvgText::testFontColorRender()
/**
* @brief TestSvgText::testCssFontVariants
*
- * This tests css 3 font-variants, which are equivelant to opentype features,
+ * This tests css 3 font-variants, which are equivalent to opentype features,
* and should not be confused with opentype variations
* (or with unicode variation selectors for that matter).
*/
@@ -2381,7 +2381,7 @@ void TestSvgText::testCssTextTransform()
QString("Greek tonos tailor test number 3 is failing.").toLatin1());
// Adapted from web platform test text-transform-tailoring-004.html
- // "[Exploratory] the brower tailors text-transform: capitalize such that a stressed vowel that is the first syllable of a Greek sentence keeps its tonos
+ // "[Exploratory] the browser tailors text-transform: capitalize such that a stressed vowel that is the first syllable of a Greek sentence keeps its tonos
// diacritic."
/* This needs someone who can actually read greek, because I am unsure what 'tonos' means, like, is it all diacritics or just a few unicode values?
@@ -2412,7 +2412,7 @@ void TestSvgText::testCssTextTransform()
/*
* This is a basic test of inline-size with different teext-anchors,
* directions and writing modes. These interact in very fundamental
- * ways, so it doesn't make sense to test them seperately.
+ * ways, so it doesn't make sense to test them separately.
*/
void TestSvgText::testTextInlineSize()
{
@@ -2458,7 +2458,7 @@ void TestSvgText::testTextInlineSize()
void TestSvgText::testTextWrap()
{
QMap<QString, QRect> testFiles;
- // Tests differrent line-height configurations.
+ // Tests different line-height configurations.
testFiles.insert("textWrap-test-css-line-height", QRect(0, 0, 120, 180));
// Tests overflow wrap behaviour options.
testFiles.insert("textWrap-test-css-overflow-wrap", QRect(0, 0, 120, 220));
diff --git a/libs/flake/tests/data/fonts/CSSTest/README b/libs/flake/tests/data/fonts/CSSTest/README
index 53f1a7b548..fb10e2b0ee 100644
--- a/libs/flake/tests/data/fonts/CSSTest/README
+++ b/libs/flake/tests/data/fonts/CSSTest/README
@@ -9,8 +9,8 @@ The original fonts were used to create the family 'CSSTest Basic'. This
family has four faces and can be used for testing bold / italics.
A subsetted version of this font with only glyphs for basic ASCII
characters is 'CSSTest ASCII'. This was used to make the other
-variations. Most of the modications are to the name table and character
-maps, for the most part glyphs were not modified.
+variations. Most of the modifications are to the name table and
+character maps, for the most part glyphs were not modified.
The fonts are available for download both individually and as a
ZIP package below.
diff --git a/libs/flake/tests/data/fonts/README b/libs/flake/tests/data/fonts/README
index 473cd9df2c..c689fbbbfc 100644
--- a/libs/flake/tests/data/fonts/README
+++ b/libs/flake/tests/data/fonts/README
@@ -6,7 +6,7 @@ https://github.com/web-platform-tests/wpt
Some fonts have an explicit license file, but not all. This should list the files without such file and which license they have.
- variabletest_matching.ttf -- has the "SIL Open Font License, Version 1.1" embedded into the TTF, copyright chromium authors 2016
-- DejaVuSans.ttf -- embeded license is http://dejavu.sourceforge.net/wiki/index.php/License, Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved, Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved, DejaVu changes are in public domain.
+- DejaVuSans.ttf -- embedded license is http://dejavu.sourceforge.net/wiki/index.php/License, Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved, Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved, DejaVu changes are in public domain.
- Krita_Test_Unicode_Variation_A.ttf and Krita_Test_Unicode_Variation_B.ttf -- These fonts were made specifically for these unittests. Has the "SIL Open Font License, Version 1.1" embedded into the TTF, Copyright 2022 Wolthera van Hövell tot Westerflier.
- FreeSans.ttf -- Embedded http://www.gnu.org/copyleft/gpl.html "GNU General Public License as published by the Free Software Foundation, either version 3 of the License", Copyright 2002, 2003, 2005, 2008, 2009, 2010, 2012 GNU Freefont contributors.
- krita-pixel-test.otb -- This fonts was made specifically for these unittests. Released under "SIL Open Font License, Version 1.1" embedded into the TTF, Copyright 2022 Wolthera van Hövell tot Westerflier.
diff --git a/libs/flake/text/KoCssTextUtils.h b/libs/flake/text/KoCssTextUtils.h
index fb666e5315..63f6754b30 100644
--- a/libs/flake/text/KoCssTextUtils.h
+++ b/libs/flake/text/KoCssTextUtils.h
@@ -75,7 +75,7 @@ public:
/**
* @brief transformTextFullSizeKana
* This function will take 'small' Kana (Japanese phonetic script) and
- * transform it to their 'full-size' equivelants, following the list in the
+ * transform it to their 'full-size' equivalents, following the list in the
* CSS-Text-3 spec.
*
* @param text the text to transform.
@@ -160,7 +160,7 @@ public:
*
* @param text the text to break.
* @param langCode the language code of the text, BCP style.
- * @return a QStringList of the graphemes as seperate strings.
+ * @return a QStringList of the graphemes as separate strings.
*/
static QStringList textToUnicodeGraphemeClusters(const QString &text, const QString &langCode);
diff --git a/libs/flake/text/KoFFWWSConverter.cpp b/libs/flake/text/KoFFWWSConverter.cpp
index 4766fb683f..3e37bd68a4 100644
--- a/libs/flake/text/KoFFWWSConverter.cpp
+++ b/libs/flake/text/KoFFWWSConverter.cpp
@@ -120,7 +120,7 @@ struct FontFamilyNode {
/**
* @brief sizeInfo
* This is only really used to ensure that sizes get sorted into different WWS families, as otherwise they're unselectable.
- * We could take them into account when searching, but the CSS-WG hasn't explicitely requested or provided any guidance therein.
+ * We could take them into account when searching, but the CSS-WG hasn't explicitly requested or provided any guidance therein.
*/
FontFamilySizeInfo sizeInfo;
@@ -742,7 +742,7 @@ void KoFFWWSConverter::sortIntoWWSFamilies()
if (font->type != KoSvgText::OpenTypeFontType && font->type != KoSvgText::Type1FontType) {
// Hack for really old fonts.
// It's questionable whether this is wise, given that it is not the family name,
- // but it seems CSS is explicitely vague about what the family name is, because
+ // but it seems CSS is explicitly vague about what the family name is, because
// of the varying ways a font can be assigned a family name.
// Like, it is technically correct, because it allows us to select fonts with CSS
// that would otherwise be unselectable, but this does mean that other applications
diff --git a/libs/flake/text/KoFontChangeTracker.h b/libs/flake/text/KoFontChangeTracker.h
index 24dfd99c5f..e02e40fe7f 100644
--- a/libs/flake/text/KoFontChangeTracker.h
+++ b/libs/flake/text/KoFontChangeTracker.h
@@ -11,7 +11,7 @@
/**
* @brief The KoFontChangeTracker class
* This class keeps track of the paths FontConfig is looking at,
- * and resets the font registery if they change.
+ * and resets the font registry if they change.
*/
class KoFontChangeTracker : public QObject
{
diff --git a/libs/flake/text/KoFontRegistry.cpp b/libs/flake/text/KoFontRegistry.cpp
index 901114515e..4d4092c2a1 100644
--- a/libs/flake/text/KoFontRegistry.cpp
+++ b/libs/flake/text/KoFontRegistry.cpp
@@ -364,7 +364,7 @@ std::vector<FT_FaceSP> KoFontRegistry::facesForCSSValues(QVector<int> &lengths,
p = [&]() {
const FcChar32 hash = FcPatternHash(p.data());
QString patternHash = info.families.join("+")+QString::number(hash);
- // FCPatternHash breaks down when there's mutliple family names that start
+ // FCPatternHash breaks down when there's multiple family names that start
// with the same letter and are the same length (Butcherman and Babylonica, Eater and Elsie, all 4 on google fonts).
const auto oldPattern = d->patterns().find(patternHash);
if (oldPattern != d->patterns().end()) {
@@ -410,7 +410,7 @@ std::vector<FT_FaceSP> KoFontRegistry::facesForCSSValues(QVector<int> &lengths,
// First, we're going to split up the text into graphemes. This is both
// because the css spec requires it, but also because of why the css
- // spec requires it: graphemes' parts should not end up in seperate
+ // spec requires it: graphemes' parts should not end up in separate
// runs, which they will if they get assigned different fonts,
// potentially breaking ligatures and emoji sequences.
QStringList graphemes = KoCssTextUtils::textToUnicodeGraphemeClusters(text, language);
@@ -1055,7 +1055,7 @@ KoSvgText::FontMetrics KoFontRegistry::generateFontMetrics(FT_FaceSP face, bool
}
if (!isHorizontal) {
- // SVG 2.0 explicitely requires vertical ascent/descent to be tied to the ideographic em box.
+ // SVG 2.0 explicitly requires vertical ascent/descent to be tied to the ideographic em box.
ascender = metrics.ideographicOverBaseline;
descender = metrics.ideographicUnderBaseline;
diff --git a/libs/flake/text/KoFontRegistry.h b/libs/flake/text/KoFontRegistry.h
index d27e134ab1..d253b15194 100644
--- a/libs/flake/text/KoFontRegistry.h
+++ b/libs/flake/text/KoFontRegistry.h
@@ -43,7 +43,7 @@ public:
* it will try to select fallback fonts as well.
*
* @returns a vector of loaded FT_Faces, the "lengths" vector
- * will be filled with the lengths of consequetive characters
+ * will be filled with the lengths of consecutive characters
* a face can be set on.
*/
std::vector<FT_FaceSP> facesForCSSValues(QVector<int> &lengths,
@@ -127,18 +127,18 @@ private:
/**
* @brief addFontFilePathToRegistery
- * This adds a font file to the registery. Right now only used by unittests.
+ * This adds a font file to the registry. Right now only used by unittests.
*
* @param path the path of the font file.
- * @return Whether adding the font file was succesful.
+ * @return Whether adding the font file was successful.
*/
bool addFontFilePathToRegistery(const QString &path);
/**
* @brief addFontFileDirectoryToRegistery
- * This adds a directory of font files to the registery. Right now only used by unittests.
+ * This adds a directory of font files to the registry. Right now only used by unittests.
* @param path the path of the directory.
- * @return whether it was succesful.
+ * @return whether it was successful.
*/
bool addFontFileDirectoryToRegistery(const QString &path);
diff --git a/libs/flake/text/KoOpenTypeFeatureInfoFactory.h b/libs/flake/text/KoOpenTypeFeatureInfoFactory.h
index 4975713c34..9f000d5587 100644
--- a/libs/flake/text/KoOpenTypeFeatureInfoFactory.h
+++ b/libs/flake/text/KoOpenTypeFeatureInfoFactory.h
@@ -60,7 +60,7 @@ struct KoOpenTypeFeatureInfo
QStringList namedParameters;/// Named parameters. Only used by CVXX features and retrieved from the font.
- QVector<OpenTypeTable> tables; ///< Which table type(s) are recommended for this feature in the official registery.
+ QVector<OpenTypeTable> tables; ///< Which table type(s) are recommended for this feature in the official registry.
bool glyphPalette{false}; ///< Whether the feature should be visible in the glyph palette.
diff --git a/libs/flake/text/KoSvgText.h b/libs/flake/text/KoSvgText.h
index ffc2789ba8..550b9f5e39 100644
--- a/libs/flake/text/KoSvgText.h
+++ b/libs/flake/text/KoSvgText.h
@@ -58,7 +58,7 @@ enum UnicodeBidi {
BidiEmbed, ///< Opens an additional Bidi-reordering level.
BidiOverride, ///< Opens an additional Bidi-reordering level, implicit part
///< of the algorithm is ignored.
- BidiIsolate, ///< Content is ordered as if in a seperate paragraph.
+ BidiIsolate, ///< Content is ordered as if in a separate paragraph.
BidiIsolateOverride, ///< Ordered like a directional override inside an
///< isolated paragraph.
BidiPlainText ///< Behaves like isolate, except using heuristics defined in
@@ -205,7 +205,7 @@ enum HangingPunctuation {
HangNone = 0x0, ///< Hang nothing.
HangFirst = 0x1, ///< Hang opening brackets and quotes.
HangLast = 0x2, ///< Hang closing brackets and quotes.
- HangEnd = 0x4, ///< Hang stops and commas. Force/Allow is a seperate boolean.
+ HangEnd = 0x4, ///< Hang stops and commas. Force/Allow is a separate boolean.
HangForce = 0x8 ///< Whether to force hanging stops or commas.
};
@@ -338,7 +338,7 @@ struct FontMetrics : public boost::equality_comparable<FontMetrics> {
qint32 ascender; ///< distance from origin to top.
qint32 descender; ///< distance for origin to bottom.
- qint32 lineGap; ///< additional linegap between consequetive lines.
+ qint32 lineGap; ///< additional linegap between consecutive lines.
qint32 alphabeticBaseline; ///< location of alphabetic baseline from origin.
qint32 mathematicalBaseline; ///< location of mathematical baseline from origin.
@@ -410,8 +410,8 @@ struct CssLengthPercentage : public boost::equality_comparable<CssLengthPercenta
Em, /// multiply by Font-size
Ex, /// multiply by font-x-height.
Cap,/// multiply by font cap height
- Ch, /// multiply by width of "0", represents avarage proportional script advance.
- Ic, /// multiply by width of "U+6C34", represents avarage full width script advance.
+ Ch, /// multiply by width of "0", represents average proportional script advance.
+ Ic, /// multiply by width of "U+6C34", represents average full width script advance.
Lh, /// multiply by lineheight.
};
@@ -638,7 +638,7 @@ struct TextTransformInfo : public boost::equality_comparable<TextTransformInfo>
bool fullWidth = false; ///< Convert proportional or half-width text to
///< full-width text. 'at-risk'
bool fullSizeKana = false; ///< Convert Japanese Katakana and Hiragana to
- ///< their 'fullsize' equivelants. 'at-risk'
+ ///< their 'fullsize' equivalents. 'at-risk'
bool operator==(const TextTransformInfo &rhs) const
{
return (capitals == rhs.capitals) && (fullWidth == rhs.fullWidth) && (fullSizeKana == rhs.fullSizeKana);
@@ -780,7 +780,7 @@ struct FontFamilyAxis : public boost::equality_comparable<FontFamilyAxis> {
qreal value = 0;
qreal defaultValue = 0;
bool variableAxis = false;
- bool axisHidden = false; /// Some variable fonts have axes that are not really supossed to be shown to the user.
+ bool axisHidden = false; /// Some variable fonts have axes that are not really supposed to be shown to the user.
QString debugInfo() const {
QString label;
diff --git a/libs/flake/text/KoSvgTextShape.cpp b/libs/flake/text/KoSvgTextShape.cpp
index a1f3c197c5..83485c69e5 100644
--- a/libs/flake/text/KoSvgTextShape.cpp
+++ b/libs/flake/text/KoSvgTextShape.cpp
@@ -92,7 +92,7 @@ struct KoSvgTextNodeIndex::Private {
// for the use in KoSvgTextShape::Private::createTextNodeIndex() only
KoSvgTextNodeIndex::KoSvgTextNodeIndex()
- : d() // Private is **not** initialized, to be intialized by the factory method
+ : d() // Private is **not** initialized, to be initialized by the factory method
{
}
@@ -933,7 +933,7 @@ QList<KoSvgTextProperties> KoSvgTextShape::propertiesForRange(const int startPos
auto it = d->findTextContentElementForIndex(d->textData, currentIndex, sought);
if (KisForestDetail::siblingCurrent(it) == d->textData.childBegin()) {
// If there's a selection and the search algorithm only returns the root, return empty.
- // The root text properties should be retrieved explicitely (either by using -1 as pos, or by calling textProperties()).
+ // The root text properties should be retrieved explicitly (either by using -1 as pos, or by calling textProperties()).
props = {KoSvgTextProperties()};
return props;
} else if (it != d->textData.depthFirstTailEnd()) {
diff --git a/libs/flake/text/KoSvgTextShape.h b/libs/flake/text/KoSvgTextShape.h
index 05b8be362a..78c0566174 100644
--- a/libs/flake/text/KoSvgTextShape.h
+++ b/libs/flake/text/KoSvgTextShape.h
@@ -246,7 +246,7 @@ public:
/**
* @brief posForPointLineSensitive
- * When clicking on an empty space in a wrapped text, it is preferrable to have the
+ * When clicking on an empty space in a wrapped text, it is preferable to have the
* caret be at the end of the line visually associated with that empty space than
* the positions above or below that might be closer.
*
@@ -290,13 +290,13 @@ public:
* Insert a text somewhere in the KoTextShape.
* @param pos the cursor position.
* @param text the text to insert.
- * @return whether it was succesful in inserting text.
+ * @return whether it was successful in inserting text.
*/
bool insertText(int pos, QString text);
/**
* @brief removeText
- * Where insert text explicitely uses a cursorposition,
+ * Where insert text explicitly uses a cursorposition,
* remove text uses a string index. It will modify these values
* so that...
* - Whole code points are deleted at any time, avoiding
@@ -366,7 +366,7 @@ public:
* Insert rich text at the given cursor pos. This will first split contents at the given pos before inserting the new rich text.
* @param pos -- cursor pos to insert at.
* @param richText -- KoSvgTextShape with rich text data. TODO: make this const once KisForest constness issues have been fixed.
- * @return whether insertion happened succesfully.
+ * @return whether insertion happened successfully.
*/
bool insertRichText(int pos, const KoSvgTextShape *richText);
diff --git a/libs/flake/text/KoSvgTextShapeLayoutFunc_inShape.cpp b/libs/flake/text/KoSvgTextShapeLayoutFunc_inShape.cpp
index 416abbd8e8..22cfbffd40 100644
--- a/libs/flake/text/KoSvgTextShapeLayoutFunc_inShape.cpp
+++ b/libs/flake/text/KoSvgTextShapeLayoutFunc_inShape.cpp
@@ -459,7 +459,7 @@ QVector<LineBox> flowTextInShapes(const KoSvgTextProperties &properties,
QVector<int> wordIndices; ///< 'word' in this case meaning characters
///< inbetween softbreaks.
- QRectF wordBox; ///< Approximated box of the currrent word;
+ QRectF wordBox; ///< Approximated box of the current word;
QPointF wordAdvance;
LineBox currentLine;
@@ -552,8 +552,8 @@ QVector<LineBox> flowTextInShapes(const KoSvgTextProperties &properties,
indentLine = false;
}
// Not adding indent to the (first) word box means it'll overflow if there's no room,
- // but being too strict might end with the whole text dissapearing. Given Krita's text layout is
- // in an interactive context, ugly result might be more communicative than all text dissapearing.
+ // but being too strict might end with the whole text disappearing. Given Krita's text layout is
+ // in an interactive context, ugly result might be more communicative than all text disappearing.
bool ind = textIndentInfo.hanging? !indentLine: indentLine;
QPointF indent = ind? textIndent: QPointF();
bool foundFirst = false;
@@ -579,7 +579,7 @@ QVector<LineBox> flowTextInShapes(const KoSvgTextProperties &properties,
/*
* In theory we could have overflow wrap for shapes, but it'd require either generalizing
* the line-filling portion above and this new line seeking portion, or somehow reverting
- * the itterator over the results to be on the last fitted glyph (which'd still require
+ * the iterator over the results to be on the last fitted glyph (which'd still require
* generalizing the line-filling portion about), and I am unsure how to do that.
* Either way, this place here is where you'd check for overflow wrap.
*/
diff --git a/libs/flake/text/KoSvgTextShape_p.h b/libs/flake/text/KoSvgTextShape_p.h
index 63c575dd79..6bc51df200 100644
--- a/libs/flake/text/KoSvgTextShape_p.h
+++ b/libs/flake/text/KoSvgTextShape_p.h
@@ -32,7 +32,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-constexpr qreal SHAPE_PRECISION = 1e-6; ///< Value that indcates the precision for testing coordinates for text-in-shape layout.
+constexpr qreal SHAPE_PRECISION = 1e-6; ///< Value that indicates the precision for testing coordinates for text-in-shape layout.
class KoPathShape;
struct raqm_glyph_t;
@@ -46,7 +46,7 @@ enum class BreakType {
enum class LineEdgeBehaviour {
NoChange, ///< Do nothing special.
Collapse, ///< Collapse if first or last in line.
- ForceHang, ///< Force hanging at the start or end of a line, never measured for justfication.
+ ForceHang, ///< Force hanging at the start or end of a line, never measured for justification.
ConditionallyHang ///< Only hang if no space otherwise, only measured for justification if not hanging.
};
@@ -619,7 +619,7 @@ public:
* @param tree -- tree to search in.
* @param currentIndex -- currentIndex, will always be set to the start index of the found element.
* @param sought -- index sought.
- * @param skipZeroWidth -- whether to explicitely skip zero-width chunks. Remove text may set this to true, while inserting text into empty chunks requires this to be false.
+ * @param skipZeroWidth -- whether to explicitly skip zero-width chunks. Remove text may set this to true, while inserting text into empty chunks requires this to be false.
* @return iterator -- found iterator. Will default to tree end if nothing is found.
*/
static KisForest<KoSvgTextContentElement>::depth_first_tail_iterator findTextContentElementForIndex(KisForest<KoSvgTextContentElement> &tree,
@@ -855,7 +855,7 @@ public:
/**
* @brief applyWhiteSpace
* CSS Whitespace processes whitespaces so that duplicate white spaces and
- * unecessary hard breaks get removed from the text. Within the text layout
+ * unnecessary hard breaks get removed from the text. Within the text layout
* we avoid removing the white spaces. However, when converting between text
* types it can be useful to remove these spaces.
* This function actually applies the white space rule to the active text.
diff --git a/libs/flake/text/KoSvgTextShape_p_glyphs.cpp b/libs/flake/text/KoSvgTextShape_p_glyphs.cpp
index 2b6b743e05..15884de8d8 100644
--- a/libs/flake/text/KoSvgTextShape_p_glyphs.cpp
+++ b/libs/flake/text/KoSvgTextShape_p_glyphs.cpp
@@ -377,7 +377,7 @@ std::pair<QTransform, qreal> KoSvgTextShape::Private::loadGlyphOnly(const QTrans
if (charResult.visualIndex > -1) {
// this is for glyph clusters, unicode combining marks are always
- // added. we could have these as seperate paths, but there's no real
+ // added. we could have these as separate paths, but there's no real
// purpose, and the svg standard prefers 'ligatures' to be treated
// as a single glyph. It simplifies things for us in any case.
outlineGlyph->path.addPath(glyph.translated(charResult.advance));
diff --git a/libs/flake/text/KoSvgTextShape_p_layout.cpp b/libs/flake/text/KoSvgTextShape_p_layout.cpp
index 2cf7f1a438..64b86d4c52 100644
--- a/libs/flake/text/KoSvgTextShape_p_layout.cpp
+++ b/libs/flake/text/KoSvgTextShape_p_layout.cpp
@@ -210,8 +210,8 @@ void KoSvgTextShape::Private::relayout()
int globalIndex = 0;
QVector<CharacterResult> result(text.size());
// HACK ALERT!
- // Apparantly feeding a bidi algorithm a hardbreak makes it go 'ok, not doing any
- // bidi', which makes sense, Bidi is supossed to be done 'after' line breaking.
+ // Apparently feeding a bidi algorithm a hardbreak makes it go 'ok, not doing any
+ // bidi', which makes sense, Bidi is supposed to be done 'after' line breaking.
// Without replacing hardbreaks with spaces, hardbreaks in rtl will break the bidi.
for (int i = 0; i < text.size(); i++) {
if (lineBreaks[i] == LINEBREAK_MUSTBREAK) {
@@ -248,7 +248,7 @@ void KoSvgTextShape::Private::relayout()
}
this->resolveTransforms(textData.childBegin(), text, result, globalIndex, isHorizontal, wrapped, false, resolvedTransforms, collapseChars, KoSvgTextProperties::defaultProperties(), true);
- // pass everything to a css-compatible text-layout algortihm.
+ // pass everything to a css-compatible text-layout algorithm.
raqm_t_sp layout(raqm_create());
if (raqm_set_text_utf16(layout.data(), text.utf16(), static_cast<size_t>(text.size()))) {
@@ -508,7 +508,7 @@ void KoSvgTextShape::Private::relayout()
}
// 2. Set flags and assign initial positions
- // We also retreive a glyph path here.
+ // We also retrieve a glyph path here.
size_t count = 0;
const raqm_glyph_t *glyphs = raqm_get_glyphs(layout.data(), &count);
if (!glyphs) {
@@ -878,7 +878,7 @@ void KoSvgTextShape::Private::resolveTransforms(KisForest<KoSvgTextContentElemen
bool bidi = bidiControls.contains(text.at(k));
bool softHyphen = text.at(k) == QChar::SoftHyphen;
- // Apparantly when there's bidi controls in the text, they participate in line-wrapping,
+ // Apparently when there's bidi controls in the text, they participate in line-wrapping,
// so we don't check for it when wrapping.
if (collapsedChars[k] || (bidi && !wrapped) || softHyphen) {
result[k].addressable = false;
@@ -1025,7 +1025,7 @@ void KoSvgTextShape::Private::applyTextLength(KisForest<KoSvgTextContentElement>
}
resolvedDescendentNodes += 1;
- // apply the shift to all consequetive chars as long as they don't start
+ // apply the shift to all consecutive chars as long as they don't start
// a new chunk.
int lastVisualValue = visualToLogical.keys().last();
visualToLogical.clear();
@@ -1819,7 +1819,7 @@ void KoSvgTextShape::Private::applyTextPath(KisForest<KoSvgTextContentElement>::
QPointF &startPos,
const KoSvgTextProperties resolvedProps)
{
- // Unlike all the other applying functions, this one only iterrates over the
+ // Unlike all the other applying functions, this one only iterates over the
// top-level. SVG is not designed to have nested textPaths. Source:
// https://github.com/w3c/svgwg/issues/580
bool inPath = false;