Skip to content

Commit

Permalink
Merge pull request #37 from scala-steward/update/scalafmt-core-3.7.12
Browse files Browse the repository at this point in the history
Update scalafmt-core to 3.7.12
  • Loading branch information
JD557 authored Aug 7, 2023
2 parents eb0a103 + 2b7073e commit bf0e960
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.7.12
fb28cb61e3b756de7125c1af8e43770cb7cd006f
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.7.11
version = 3.7.12

runner.dialect = "scala3"
align.preset = more
Expand Down
4 changes: 2 additions & 2 deletions examples/snapshot/example-minart-backend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object MinartBackend:
def coloredChar(char: Char, color: MinartColor): SurfaceView

case class BitmapFont(file: String, width: Int, height: Int, fontFirstChar: Char = '\u0000') extends Font:
private val spriteSheet = SpriteSheet(Image.loadBmpImage(Resource(file)).get, width, height)
private val spriteSheet = SpriteSheet(Image.loadBmpImage(Resource(file)).get, width, height)
def charWidth(char: Char): Int = width
def coloredChar(char: Char, color: MinartColor): SurfaceView =
spriteSheet.getSprite(char.toInt - fontFirstChar.toInt).map {
Expand All @@ -38,7 +38,7 @@ object MinartBackend:
else
val scale = fontSize / baseFont.height.toDouble
new Font:
def charWidth(char: Char): Int = (baseFont.width * scale).toInt
def charWidth(char: Char): Int = (baseFont.width * scale).toInt
def coloredChar(char: Char, color: MinartColor): SurfaceView = baseFont.coloredChar(char, color).scale(scale)

// Gloop font by Polyducks: https://twitter.com/PolyDucks
Expand Down

0 comments on commit bf0e960

Please sign in to comment.