mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +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 {
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user