-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Conversation
Avoid duplicate font baking and SpriteFont loading when mixing native with non-native draw calls.
using Microsoft.Xna.Framework.Graphics; | ||
using MonoGame.Extended.BitmapFonts; | ||
using System; | ||
using BitmapFont = MonoGame.Extended.BitmapFonts.BitmapFont; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
using MonoGame.Extended.BitmapFonts; | ||
using System; | ||
using System.Collections.Concurrent; | ||
using BitmapFont = MonoGame.Extended.BitmapFonts.BitmapFont; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
/// <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.
This comment was marked as resolved.
Sorry, something went wrong.
using System.IO; | ||
using System.IO.Compression; | ||
using System.Text.RegularExpressions; | ||
using BitmapFont = MonoGame.Extended.BitmapFonts.BitmapFont; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Quality Gate failedFailed conditions |
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