Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading BitmapFonts at runtime #913

Merged
merged 19 commits into from
Apr 3, 2024

Conversation

agaertner
Copy link
Member

@agaertner agaertner commented Sep 4, 2023

Using SpriteFontPlus.Monogame we can load and bake TrueTypeFonts at runtime and convert them to a Monogame.Extended.BitmapFont using the exposed texture.

Discussion ref: https://discord.com/channels/531175899588984842/536970543736291346/1147888419364687892

Is this a breaking change?

No

using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.BitmapFonts;
using System;
using BitmapFont = MonoGame.Extended.BitmapFonts.BitmapFont;

This comment was marked as resolved.

using MonoGame.Extended.BitmapFonts;
using System;
using System.Collections.Concurrent;
using BitmapFont = MonoGame.Extended.BitmapFonts.BitmapFont;

This comment was marked as resolved.

/// <summary>
/// Extends <see cref="MonoGame.Extended.BitmapFonts.BitmapFont"/> to allow disposing of its glyph lookup texture.
/// </summary>
public class BitmapFont : MonoGame.Extended.BitmapFonts.BitmapFont, IDisposable {

This comment was marked as resolved.

using System.IO;
using System.IO.Compression;
using System.Text.RegularExpressions;
using BitmapFont = MonoGame.Extended.BitmapFonts.BitmapFont;

This comment was marked as resolved.

@sonarcloud
Copy link

sonarcloud bot commented Oct 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

sonarcloud bot commented Apr 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
6.0% Duplication on New Code (required ≤ 6%)

See analysis details on SonarCloud

@dlamkins dlamkins merged commit 8ee73af into blish-hud:dev Apr 3, 2024
4 of 5 checks passed
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.

2 participants