forked from joejulian/gio
all: format comments with go fmt ./... using Go 1.19
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user