Files
Christopher Whitley 8b3c2f0e1b Various fixes for the version 4 initial release (#915)
* 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
2024-07-09 15:22:33 -04:00

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);
}
}
}