Skip to content

Commit

Permalink
Merge pull request #6 from memmaker/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Jan 8, 2023
2 parents 8069594 + a6dc2b7 commit cf4ffc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion font/font.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewFromReader(reader io.Reader, tileWidth, tileHeight int) (*Font, error) {
// ToSubImage extracts the image of a given char from the base image of the font.
func (f *Font) ToSubImage(char int) *ebiten.Image {
x := (int(char) % f.TileSizeX) * f.TileWidth
y := (int(char) / f.TileSizeY) * f.TileHeight
y := (int(char) / f.TileSizeX) * f.TileHeight

r := image.Rect(x, y, x+f.TileWidth, y+f.TileHeight)

Expand Down

0 comments on commit cf4ffc7

Please sign in to comment.