-
-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update file header * Created initial project to move BitmapFont too * XMl, Text, and Binar reading now supported for BMFont * Refactor BittmapFont * Update content pipeline from BitmapFont refactor * Update changelog
- Loading branch information
1 parent
1f0235c
commit 6627756
Showing
39 changed files
with
1,693 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontChar.cs
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontCommon.cs
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontFile.cs
This file was deleted.
Oops, something went wrong.
18 changes: 9 additions & 9 deletions
18
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontImporter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
using System.IO; | ||
using System.Xml.Serialization; | ||
using Microsoft.Xna.Framework.Content.Pipeline; | ||
using MonoGame.Extended.BitmapFonts; | ||
using MonoGame.Extended.BitmapFonts.BmfTypes; | ||
|
||
namespace MonoGame.Extended.Content.Pipeline.BitmapFonts | ||
{ | ||
[ContentImporter(".fnt", DefaultProcessor = "BitmapFontProcessor", | ||
DisplayName = "BMFont Importer - MonoGame.Extended")] | ||
public class BitmapFontImporter : ContentImporter<BitmapFontFile> | ||
public class BitmapFontImporter : ContentImporter<ContentImporterResult<BmfFile>> | ||
{ | ||
public override BitmapFontFile Import(string filename, ContentImporterContext context) | ||
public override ContentImporterResult<BmfFile> Import(string filename, ContentImporterContext context) | ||
{ | ||
context.Logger.LogMessage("Importing XML file: {0}", filename); | ||
context.Logger.LogMessage("Importing FNT file: {0}", filename); | ||
|
||
using (var streamReader = new StreamReader(filename)) | ||
{ | ||
var deserializer = new XmlSerializer(typeof(BitmapFontFile)); | ||
return (BitmapFontFile)deserializer.Deserialize(streamReader); | ||
} | ||
using FileStream stream = File.OpenRead(filename); | ||
BmfFile file = BmfFile.FromStream(stream); | ||
return new ContentImporterResult<BmfFile>(filename, file); | ||
} | ||
} | ||
} | ||
} |
47 changes: 0 additions & 47 deletions
47
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontInfo.cs
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontKerning.cs
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontPage.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
source/MonoGame.Extended.Content.Pipeline/BitmapFonts/BitmapFontProcessorResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
using System.Collections.Generic; | ||
using MonoGame.Extended.BitmapFonts.BmfTypes; | ||
|
||
namespace MonoGame.Extended.Content.Pipeline.BitmapFonts | ||
{ | ||
public class BitmapFontProcessorResult | ||
{ | ||
public List<string> TextureAssets { get; private set; } | ||
public BitmapFontFile FontFile { get; private set; } | ||
public BmfFile FontFile { get; private set; } | ||
|
||
public BitmapFontProcessorResult(BitmapFontFile fontFile) | ||
public BitmapFontProcessorResult(BmfFile fontFile) | ||
{ | ||
FontFile = fontFile; | ||
TextureAssets = new List<string>(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.