Skip to content

Conversation

@AristurtleDev
Copy link
Collaborator

Description

As shown in #1073, it's possible for a scenario to occur where someone edits a Bitmap Font (BMFont) file using a third party library that then saves it back with the UTF-8 Byte Order Mark (BOM) preamble. When this happens, the signature check of the file fails causing an exception to to be thrown.

To resolve this, a check for the preamble is made, and if found, skips it.

Related Issues/Tickets

Changes Made

  • Added unit test to ensure BOM check is performed.
  • Checks for UTF-8 Byte Order Mark (BOM) Preamble at the start of stream when reading a BMFont file.

Checklist

Please read and check the following items. Pull requests will not be reviewed if all items are not checked.

  • I have verified that there are no existing pull requests that would overlap with this pull request.
  • I have verified that I am following the guidelines as outlined in this project's contribution policy
  • I have verified that this pull request adheres to this project's code of conduct.
  • I have written a descriptive title for this pull request.
  • I have provided appropriate test coverage were applicable.

@AristurtleDev AristurtleDev self-assigned this Nov 29, 2025
@AristurtleDev AristurtleDev merged commit 0851ee3 into develop Nov 29, 2025
1 check passed
@AristurtleDev AristurtleDev deleted the fix/issue-1073-bmfont-utf8-bom branch November 29, 2025 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MonoGame.Extended won't load XML format .fnt files if they begin with the byte order mark

2 participants