mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
text/v2: refactoring
This commit is contained in:
parent
9fa60e1656
commit
e7fa9d50de
@ -117,7 +117,8 @@ func glyphVariationCount(face Face) int {
|
|||||||
|
|
||||||
func adjustGranularity(x fixed.Int26_6, face Face) fixed.Int26_6 {
|
func adjustGranularity(x fixed.Int26_6, face Face) fixed.Int26_6 {
|
||||||
c := glyphVariationCount(face)
|
c := glyphVariationCount(face)
|
||||||
return x / ((1 << 6) / fixed.Int26_6(c)) * ((1 << 6) / fixed.Int26_6(c))
|
factor := (1 << 6) / fixed.Int26_6(c)
|
||||||
|
return x / factor * factor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Glyph represents one glyph to render.
|
// Glyph represents one glyph to render.
|
||||||
|
Loading…
Reference in New Issue
Block a user