Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Minosoft
* Copyright (C) 2020-2025 Moritz Zwerger
* Copyright (C) 2020-2026 Moritz Zwerger
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
Expand Down Expand Up @@ -126,9 +126,10 @@ class UnihexFontType(
while (this.available() > 0) {
val codePoint = readHexInt()
if (codePoint == -1) continue
val data = this.readUnihexData(buffer)
chars[codePoint] = data
totalWidth += data.size / (UnifontRasterizer.HEIGHT / Byte.SIZE_BITS)
val data = readUnihexData(buffer)
if (chars.putIfAbsent(codePoint, data) == null) {
totalWidth += data.size / (UnifontRasterizer.HEIGHT / Byte.SIZE_BITS)
}
}

return totalWidth
Expand Down
Loading