#21 change dictionarytoken to use explicit key type, finish os/2 table for truetype, first file creation using embedded truetype font

This commit is contained in:
Eliot Jones
2018-12-08 14:38:27 +00:00
parent c2879ed4b4
commit 3a4b7b79d1
25 changed files with 383 additions and 207 deletions

View File

@@ -11,7 +11,7 @@
{
private readonly Ascii85Filter filter = new Ascii85Filter();
private readonly DictionaryToken dictionary = new DictionaryToken(new Dictionary<IToken, IToken>());
private readonly DictionaryToken dictionary = new DictionaryToken(new Dictionary<NameToken, IToken>());
[Fact]
public void DecodesWikipediaExample()

View File

@@ -9,7 +9,7 @@
public class AsciiHexDecodeFilterTests
{
private readonly DictionaryToken dictionary = new DictionaryToken(new Dictionary<IToken, IToken>());
private readonly DictionaryToken dictionary = new DictionaryToken(new Dictionary<NameToken, IToken>());
[Fact]
public void DecodesEncodedTextProperly()

View File

@@ -21,7 +21,7 @@
[Fact]
public void NegativeIndex_Throws()
{
Action action = () => resolver.GetFilterParameters(new DictionaryToken(new Dictionary<IToken, IToken>()), -1);
Action action = () => resolver.GetFilterParameters(new DictionaryToken(new Dictionary<NameToken, IToken>()), -1);
Assert.Throws<ArgumentOutOfRangeException>(action);
}
@@ -29,7 +29,7 @@
[Fact]
public void EmptyDictionary_ReturnsEmptyDictionary()
{
var result = resolver.GetFilterParameters(new DictionaryToken(new Dictionary<IToken, IToken>()), 0);
var result = resolver.GetFilterParameters(new DictionaryToken(new Dictionary<NameToken, IToken>()), 0);
Assert.Empty(result.Data);
}

View File

@@ -26,7 +26,7 @@
1, 10, 19
};
var decoded = filter.Decode(data, new DictionaryToken(new Dictionary<IToken, IToken>()), 1);
var decoded = filter.Decode(data, new DictionaryToken(new Dictionary<NameToken, IToken>()), 1);
var expectedResult = new byte[]
{
@@ -55,7 +55,7 @@
90, 6, 7
};
var decoded = filter.Decode(data, new DictionaryToken(new Dictionary<IToken, IToken>()), 0);
var decoded = filter.Decode(data, new DictionaryToken(new Dictionary<NameToken, IToken>()), 0);
var expectedResult = new byte[]
{