mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-17 16:09:29 +00:00
8b3c2f0e1b
* Remove logging statement, not needed * Add bmfont texture as dependency * Remove existing instance check, this will always be null * Fix BitmapFontContentReader * Remove TODO comment This was added 8 years ago, and I don't see any determinant to the states being global. * Renamed `Refresh` to `Update` * Added documentation comments * file scoped namespace * Remove unnecessary using * Add file header * Remove obsolete methods and update documentation * file scoped namespace * Remove TODO comment The fields being static is fine. * Renamed `Refersh` to `Update` * Add documentation * file scoped namespace * Add documentation * Remove deprecated methods
18 lines
766 B
C#
18 lines
766 B
C#
using System.IO;
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
|
using MonoGame.Extended.Content.BitmapFonts;
|
|
|
|
namespace MonoGame.Extended.Content.Pipeline.BitmapFonts
|
|
{
|
|
[ContentImporter(".fnt", DefaultProcessor = "BitmapFontProcessor", DisplayName = "BMFont Importer - MonoGame.Extended")]
|
|
public class BitmapFontImporter : ContentImporter<ContentImporterResult<BitmapFontFileContent>>
|
|
{
|
|
public override ContentImporterResult<BitmapFontFileContent> Import(string filename, ContentImporterContext context)
|
|
{
|
|
using FileStream stream = File.OpenRead(filename);
|
|
var bmfFile = BitmapFontFileReader.Read(stream);
|
|
return new ContentImporterResult<BitmapFontFileContent>(filename, bmfFile);
|
|
}
|
|
}
|
|
}
|