all: format comments with go fmt ./... using Go 1.19

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-08-06 12:26:03 +02:00
parent 3e9d4d966c
commit 61b2e37691
20 changed files with 83 additions and 89 deletions
+8 -8
View File
@@ -263,14 +263,14 @@ func paragraph(shaper Shaper, face font.Face, ppem fixed.Int26_6, maxWidth int,
// whenever it returns false.
//
// The parameters require some explanation:
// out - the shaping.Output that is being line-broken.
// runeToGlyph - a mapping where accessing the slice at the index of a rune
// int out will yield the index of the first glyph corresponding to that rune.
// lineStartRune - the index of the first rune in the line.
// b - the line break candidate under consideration.
// curLineWidth - the amount of space total in the current line.
// curLineUsed - the amount of space in the current line that is already used.
// nextLineWidth - the amount of space available on the next line.
// - out - the shaping.Output that is being line-broken.
// - runeToGlyph - a mapping where accessing the slice at the index of a rune
// into out will yield the index of the first glyph corresponding to that rune.
// - lineStartRune - the index of the first rune in the line.
// - b - the line break candidate under consideration.
// - curLineWidth - the amount of space total in the current line.
// - curLineUsed - the amount of space in the current line that is already used.
// - nextLineWidth - the amount of space available on the next line.
//
// This function returns both a valid shaping.Output broken at b and a boolean
// indicating whether the returned output should be used.
+5 -5
View File
@@ -524,7 +524,7 @@ var (
}
)
//splitShapedAt splits a single shaped output into multiple. It splits
// splitShapedAt splits a single shaped output into multiple. It splits
// on each provided glyph index in indices, with the index being the end of
// a slice range (so it's exclusive). You can think of the index as the
// first glyph of the next output.
@@ -925,25 +925,25 @@ At risus viverra adipiscing at.`
}
// simpleGlyph returns a simple square glyph with the provided cluster
//value.
// value.
func simpleGlyph(cluster int) shaping.Glyph {
return complexGlyph(cluster, 1, 1)
}
// ligatureGlyph returns a simple square glyph with the provided cluster
//value and number of runes.
// value and number of runes.
func ligatureGlyph(cluster, runes int) shaping.Glyph {
return complexGlyph(cluster, runes, 1)
}
// expansionGlyph returns a simple square glyph with the provided cluster
//value and number of glyphs.
// value and number of glyphs.
func expansionGlyph(cluster, glyphs int) shaping.Glyph {
return complexGlyph(cluster, 1, glyphs)
}
// complexGlyph returns a simple square glyph with the provided cluster
//value, number of associated runes, and number of glyphs in the cluster.
// value, number of associated runes, and number of glyphs in the cluster.
func complexGlyph(cluster, runes, glyphs int) shaping.Glyph {
return shaping.Glyph{
Width: fixed.I(10),