libgdx / libgdx/libgdx

Problems with bitmap fonts with pixel identical glyphs

Open
#3,412 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement fonts
Dominant language
Java
Stars
25.4k
Forks
6.5k
Avg merge
1d 16h
Merged PRs (30d)
5

Description

I stumbled upon the following minor issue regarding fonts in libGDX 1.6.5:

I created a bitmap font file with Hiero where 0 and O happen to be pixel identical. It seems to be a feature of the fnt format to not include these glyphs twice in that case. The loader of BitmapFont does not recognize this optimization and therefore 0 characters are not rendered.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the BitmapFont loader and the Hiero-generated .fnt format described in the report. Reproduce a font where 0 and O are pixel-identical, then verify that both characters render correctly when the loader handles the format's glyph optimization.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.