Skip to content

Commit

Permalink
Cleanup and updated copyright info.
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraBertaOldham committed Apr 12, 2020
1 parent 01b9e8c commit 9364b81
Show file tree
Hide file tree
Showing 27 changed files with 542 additions and 516 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

## 1.1.1
* Updated package links and copyright info.

## 1.1.0
This version made small breaking changes. Future versions now follow semantic versioning.
* Fixed a bug when writing text files without kerning pairs.
* Fixed a bug when writing binary file pages.
* Removed ID property from Character and Amount from KerningPair to avoid confusion when writing files. These are breaking changes.
* Writing text files now writes to the TextWriter directly instead of a StringBuilder. This is a breaking change.
* Other bug fixes and general improvements.

## 1.0.1
* Fixed a bug with null strings.

## 1.0.0
* Initial release.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018 Todd Berta-Oldham
Copyright 2018-2020 Aurora Berta-Oldham

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bitmapFont.Save("ExampleFont2.fnt", FormatHint.Binary);
See the [documentation for BMFont](http://www.angelcode.com/products/bmfont/documentation.html) for information on rendering text and the properties of the file format.

## Download
SharpFNT can be downloaded on [NuGet](https://www.nuget.org/packages/SharpFNT/). The most recent version is 1.1.0 which makes minor breaking changes. Future versions will follow semantic versioning.
SharpFNT can be downloaded on [NuGet](https://www.nuget.org/packages/SharpFNT/) or from the releases section.

## License
Licensed under [MIT](LICENSE).
18 changes: 9 additions & 9 deletions SharpFNT.Tests/BitmapFontCommonTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// ****************************************************************************
// BitmapFontCommonTests.cs
// Copyright 2018 Todd Berta-Oldham
// This code is licensed under MIT.
// ****************************************************************************
//**************************************************************************************************
// BitmapFontCommonTests.cs *
// Copyright (c) 2018-2020 Aurora Berta-Oldham *
// This code is made available under the MIT License. *
//**************************************************************************************************

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
Expand All @@ -17,9 +17,9 @@ public class BitmapFontCommonTests
[ExpectedException(typeof(InvalidDataException))]
public void ReadBinaryWrongBlockSize()
{
using (MemoryStream memoryStream = new MemoryStream())
using (var memoryStream = new MemoryStream())
{
using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream, Encoding.UTF8, true))
using (var binaryWriter = new BinaryWriter(memoryStream, Encoding.UTF8, true))
{
binaryWriter.Write(8);
binaryWriter.Write(2);
Expand All @@ -28,9 +28,9 @@ public void ReadBinaryWrongBlockSize()

memoryStream.Seek(0, SeekOrigin.Begin);

using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8, true))
using (var binaryReader = new BinaryReader(memoryStream, Encoding.UTF8, true))
{
BitmapFontCommon.ReadBinary(binaryReader, out int _);
BitmapFontCommon.ReadBinary(binaryReader, out _);
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions SharpFNT.Tests/BitmapFontInfoTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// ****************************************************************************
// BitmapFontInfoTests.cs
// Copyright 2018 Todd Berta-Oldham
// This code is licensed under MIT.
// ****************************************************************************
//**************************************************************************************************
// BitmapFontInfoTests.cs *
// Copyright (c) 2018-2020 Aurora Berta-Oldham *
// This code is made available under the MIT License. *
//**************************************************************************************************

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
Expand All @@ -18,9 +18,9 @@ public class BitmapFontInfoTests
[ExpectedException(typeof(InvalidDataException))]
public void ReadBinaryWrongBlockSize()
{
using (MemoryStream memoryStream = new MemoryStream())
using (var memoryStream = new MemoryStream())
{
using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream, Encoding.UTF8, true))
using (var binaryWriter = new BinaryWriter(memoryStream, Encoding.UTF8, true))
{
binaryWriter.Write(8);
binaryWriter.Write(2);
Expand All @@ -29,7 +29,7 @@ public void ReadBinaryWrongBlockSize()

memoryStream.Seek(0, SeekOrigin.Begin);

using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8, true))
using (var binaryReader = new BinaryReader(memoryStream, Encoding.UTF8, true))
{
BitmapFontInfo.ReadBinary(binaryReader);
}
Expand All @@ -40,14 +40,14 @@ public void ReadBinaryWrongBlockSize()
[ExpectedException(typeof(FormatException))]
public void WriteBinaryInvalidCharset()
{
BitmapFontInfo bitmapFontInfo = new BitmapFontInfo()
var bitmapFontInfo = new BitmapFontInfo
{
Charset = "This is not a valid charset."
};

using (MemoryStream memoryStream = new MemoryStream())
using (var memoryStream = new MemoryStream())
{
using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream, Encoding.UTF8, true))
using (var binaryWriter = new BinaryWriter(memoryStream, Encoding.UTF8, true))
{
bitmapFontInfo.WriteBinary(binaryWriter);
}
Expand Down
Loading

0 comments on commit 9364b81

Please sign in to comment.