Skip to content

Commit 2c931f9

Browse files
committed
Fix font style bug
1 parent 204551e commit 2c931f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/GateEngine/Resources/Text/Font.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public final class Font: OldResource {
106106
pointSize: UInt,
107107
style: Font.Style
108108
) -> CharacterData {
109-
let key = Key(style: style, pointSize: pointSize)
109+
let key = Key(style: effectiveStyle(for: style), pointSize: pointSize)
110110
return backend.characterData(forKey: key, character: character)
111111
}
112112

@@ -117,7 +117,7 @@ public final class Font: OldResource {
117117
origin: Position2,
118118
xAdvance: inout Float
119119
) -> AlignedCharacter {
120-
let key = Key(style: style, pointSize: pointSize)
120+
let key = Key(style: effectiveStyle(for: style), pointSize: pointSize)
121121
return backend.alignedCharacter(
122122
forKey: key,
123123
character: character,

0 commit comments

Comments
 (0)