Agregar archivos de proyecto.

This commit is contained in:
2026-05-27 17:09:59 +02:00
parent 73b30b7de7
commit 03813aff5a
9144 changed files with 4026729 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("TSpdf.IO.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("TSpdf")]
[assembly: AssemblyProduct("TSpdf")]
[assembly: AssemblyCopyright("Copyright (c) 1987-2023 TSpdf")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("a53a5dd3-787b-4563-8778-1d76bdad57ba")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
#if !NETSTANDARD2_0
[assembly: NUnit.Framework.Timeout(300000)]
#endif

View File

@@ -0,0 +1,60 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup Label="Globals">
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<SignAssembly>True</SignAssembly>
<DelaySign>False</DelaySign>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net461;net48</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
<OutputType>library</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<OutputType>Library</OutputType>
<DefineConstants>NETSTANDARD2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>TSpdf.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ApplicationIcon />
<OutputTypeEx>library</OutputTypeEx>
<StartupObject />
<AssemblyName>TSpdf.io.tests</AssemblyName>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.0" />
</ItemGroup>
<PropertyGroup>
<NoWarn>1701;1702;1591;1570;1572;1573;1574;1580;1584;1658</NoWarn>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\TSpdf\TSpdf.io\TSpdf.io.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.NET.Test.Sdk">
<Version>15.0.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation">
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>

Binary file not shown.

View File

@@ -0,0 +1,55 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO {
[NUnit.Framework.Category("UnitTest")]
public class AdobeGlyphListTest : ExtendedTSpdfTest {
[NUnit.Framework.Test]
public virtual void TestGlyphListCount() {
NUnit.Framework.Assert.AreEqual(4200, AdobeGlyphList.GetNameToUnicodeLength());
NUnit.Framework.Assert.AreEqual(3680, AdobeGlyphList.GetUnicodeToNameLength());
}
}
}

View File

@@ -0,0 +1,62 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using TSpdf.IO.Util;
using TSpdf.Test;
namespace TSpdf.IO {
[NUnit.Framework.Category("UnitTest")]
public class UtilitiesTest : ExtendedTSpdfTest {
[NUnit.Framework.Test]
public virtual void TestShortener() {
byte[] src = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
byte[] dest = new byte[] { 1, 2, 3, 4, 5 };
byte[] test = ArrayUtil.ShortenArray(src, 5);
NUnit.Framework.Assert.AreEqual(dest, test);
}
[NUnit.Framework.Test]
public virtual void InvalidResource() {
NUnit.Framework.Assert.IsNull(ResourceUtil.GetResourceStream("some-random-resource.zzz"));
}
}
}

View File

@@ -0,0 +1,36 @@
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
using TSpdf.Test;
namespace TSpdf.IO.Codec.Brotli.Dec
{
/// <summary>
/// Tests for
/// <see cref="BitReader"/>
/// .
/// </summary>
public class BitReaderTest : ExtendedTSpdfTest
{
[NUnit.Framework.Test]
public virtual void TestReadAfterEos()
{
TSpdf.IO.Codec.Brotli.Dec.BitReader reader = new TSpdf.IO.Codec.Brotli.Dec.BitReader();
TSpdf.IO.Codec.Brotli.Dec.BitReader.Init(reader, new System.IO.MemoryStream(new byte[1]));
TSpdf.IO.Codec.Brotli.Dec.BitReader.ReadBits(reader, 9);
try
{
TSpdf.IO.Codec.Brotli.Dec.BitReader.CheckHealth(reader, false);
}
catch (TSpdf.IO.Codec.Brotli.Dec.BrotliRuntimeException)
{
// This exception is expected.
return;
}
NUnit.Framework.Assert.Fail("BrotliRuntimeException should have been thrown by BitReader.checkHealth");
}
}
}

View File

@@ -0,0 +1,162 @@
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
using TSpdf.Test;
namespace TSpdf.IO.Codec.Brotli.Dec
{
/// <summary>
/// Tests for
/// <see cref="Decode"/>
/// .
/// </summary>
public class DecodeTest : ExtendedTSpdfTest
{
private byte[] Decompress(byte[] data, bool byByte)
{
byte[] buffer = new byte[65536];
System.IO.MemoryStream input = new System.IO.MemoryStream(data);
System.IO.MemoryStream output = new System.IO.MemoryStream();
TSpdf.IO.Codec.Brotli.Dec.BrotliInputStream brotliInput = new TSpdf.IO.Codec.Brotli.Dec.BrotliInputStream(input);
if (byByte)
{
byte[] oneByte = new byte[1];
while (true)
{
int next = brotliInput.ReadByte();
if (next == -1)
{
break;
}
oneByte[0] = unchecked((byte)next);
output.Write(oneByte, 0, 1);
}
}
else
{
while (true)
{
int len = brotliInput.Read(buffer, 0, buffer.Length);
if (len <= 0)
{
break;
}
output.Write(buffer, 0, len);
}
}
brotliInput.Dispose();
return output.ToArray();
}
private byte[] DecompressWithDictionary(byte[] data, byte[] dictionary)
{
byte[] buffer = new byte[65536];
System.IO.MemoryStream input = new System.IO.MemoryStream(data);
System.IO.MemoryStream output = new System.IO.MemoryStream();
TSpdf.IO.Codec.Brotli.Dec.BrotliInputStream brotliInput = new TSpdf.IO.Codec.Brotli.Dec.BrotliInputStream(input, TSpdf.IO.Codec.Brotli.Dec.BrotliInputStream.DefaultInternalBufferSize, dictionary);
while (true)
{
int len = brotliInput.Read(buffer, 0, buffer.Length);
if (len <= 0)
{
break;
}
output.Write(buffer, 0, len);
}
brotliInput.Dispose();
return output.ToArray();
}
private void CheckDecodeResourceWithDictionary(string expected, string compressed, string dictionary)
{
byte[] expectedBytes = TSpdf.IO.Codec.Brotli.Dec.Transform.ReadUniBytes(expected);
byte[] compressedBytes = TSpdf.IO.Codec.Brotli.Dec.Transform.ReadUniBytes(compressed);
byte[] dictionaryBytes = TSpdf.IO.Codec.Brotli.Dec.Transform.ReadUniBytes(dictionary);
byte[] actual = DecompressWithDictionary(compressedBytes, dictionaryBytes);
NUnit.Framework.Assert.AreEqual(expectedBytes, actual);
}
private void CheckDecodeResource(string expected, string compressed)
{
byte[] expectedBytes = TSpdf.IO.Codec.Brotli.Dec.Transform.ReadUniBytes(expected);
byte[] compressedBytes = TSpdf.IO.Codec.Brotli.Dec.Transform.ReadUniBytes(compressed);
byte[] actual = Decompress(compressedBytes, false);
NUnit.Framework.Assert.AreEqual(expectedBytes, actual);
byte[] actualByByte = Decompress(compressedBytes, true);
NUnit.Framework.Assert.AreEqual(expectedBytes, actualByByte);
}
[NUnit.Framework.Test]
public virtual void TestEmpty()
{
CheckDecodeResource(string.Empty, "\u0006");
}
[NUnit.Framework.Test]
public virtual void TestX()
{
CheckDecodeResource("X", "\u000B\u0000\u0080X\u0003");
}
[NUnit.Framework.Test]
public virtual void TestX10Y10()
{
CheckDecodeResource("XXXXXXXXXXYYYYYYYYYY", "\u001B\u0013\u0000\u0000\u00A4\u00B0\u00B2\u00EA\u0081G\u0002\u008A");
}
[NUnit.Framework.Test]
public virtual void TestX64()
{
CheckDecodeResource("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "\u001B\u003F\u0000\u0000$\u00B0\u00E2\u0099\u0080\u0012");
}
[NUnit.Framework.Test]
public virtual void TestUkkonooa()
{
CheckDecodeResource("ukko nooa, ukko nooa oli kunnon mies, kun han meni saunaan, " + "pisti laukun naulaan, ukko nooa, ukko nooa oli kunnon mies.", "\u001Bv\u0000\u0000\u0014J\u00AC\u009Bz\u00BD\u00E1\u0097\u009D\u007F\u008E\u00C2\u0082" + "6\u000E\u009C\u00E0\u0090\u0003\u00F7\u008B\u009E8\u00E6\u00B6\u0000\u00AB\u00C3\u00CA"
+ "\u00A0\u00C2\u00DAf6\u00DC\u00CD\u0080\u008D.!\u00D7n\u00E3\u00EAL\u00B8\u00F0\u00D2" + "\u00B8\u00C7\u00C2pM:\u00F0i~\u00A1\u00B8Es\u00AB\u00C4W\u001E");
}
[NUnit.Framework.Test]
public virtual void TestMonkey()
{
CheckDecodeResource("znxcvnmz,xvnm.,zxcnv.,xcn.z,vn.zvn.zxcvn.,zxcn.vn.v,znm.,vnzx.,vnzxc.vn.z,vnz.,nv.z,nvmz" + "xc,nvzxcvcnm.,vczxvnzxcnvmxc.zmcnvzm.,nvmc,nzxmc,vn.mnnmzxc,vnxcnmv,znvzxcnmv,.xcnvm,zxc" + "nzxv.zx,qweryweurqioweupropqwutioweupqrioweutiopweuriopweuriopqwurioputiopqwuriowuqeriou"
+ "pqweropuweropqwurweuqriopuropqwuriopuqwriopuqweopruioqweurqweuriouqweopruioupqiytioqtyio" + "wtyqptypryoqweutioioqtweqruowqeytiowquiourowetyoqwupiotweuqiorweuqroipituqwiorqwtioweuri" + "ouytuioerytuioweryuitoweytuiweyuityeruirtyuqriqweuropqweiruioqweurioqwuerioqwyuituierwot"
+ "ueryuiotweyrtuiwertyioweryrueioqptyioruyiopqwtjkasdfhlafhlasdhfjklashjkfhasjklfhklasjdfh" + "klasdhfjkalsdhfklasdhjkflahsjdkfhklasfhjkasdfhasfjkasdhfklsdhalghhaf;hdklasfhjklashjklfa" + "sdhfasdjklfhsdjklafsd;hkldadfjjklasdhfjasddfjklfhakjklasdjfkl;asdjfasfljasdfhjklasdfhjka"
+ "ghjkashf;djfklasdjfkljasdklfjklasdjfkljasdfkljaklfj", "\u001BJ\u0003\u0000\u008C\u0094n\u00DE\u00B4\u00D7\u0096\u00B1x\u0086\u00F2-\u00E1\u001A" + "\u00BC\u000B\u001C\u00BA\u00A9\u00C7\u00F7\u00CCn\u00B2B4QD\u008BN\u0013\b\u00A0\u00CDn"
+ "\u00E8,\u00A5S\u00A1\u009C],\u001D#\u001A\u00D2V\u00BE\u00DB\u00EB&\u00BA\u0003e|\u0096j" + "\u00A2v\u00EC\u00EF\u0087G3\u00D6\'\u000Ec\u0095\u00E2\u001D\u008D,\u00C5\u00D1(\u009F`" + "\u0094o\u0002\u008B\u00DD\u00AAd\u0094,\u001E;e|\u0007EZ\u00B2\u00E2\u00FCI\u0081,\u009F"
+ "@\u00AE\u00EFh\u0081\u00AC\u0016z\u000F\u00F5;m\u001C\u00B9\u001E-_\u00D5\u00C8\u00AF^" + "\u0085\u00AA\u0005\u00BESu\u00C2\u00B0\"\u008A\u0015\u00C6\u00A3\u00B1\u00E6B\u0014" + "\u00F4\u0084TS\u0019_\u00BE\u00C3\u00F2\u001D\u00D1\u00B7\u00E5\u00DD\u00B6\u00D9#\u00C6"
+ "\u00F6\u009F\u009E\u00F6Me0\u00FB\u00C0qE\u0004\u00AD\u0003\u00B5\u00BE\u00C9\u00CB" + "\u00FD\u00E2PZFt\u0004\r\u00FF \u0004w\u00B2m\'\u00BFG\u00A9\u009D\u001B\u0096,b\u0090#" + "\u008B\u00E0\u00F8\u001D\u00CF\u00AF\u001D=\u00EE\u008A\u00C8u#f\u00DD\u00DE\u00D6m"
+ "\u00E3*\u0082\u008Ax\u008A\u00DB\u00E6 L\u00B7\\c\u00BA0\u00E3?\u00B6\u00EE\u008C\"" + "\u00A2*\u00B0\"\n\u0099\u00FF=bQ\u00EE\b\u00F6=J\u00E4\u00CC\u00EF\"\u0087\u0011\u00E2" + "\u0083(\u00E4\u00F5\u008F5\u0019c[\u00E1Z\u0092s\u00DD\u00A1P\u009D8\\\u00EB\u00B5\u0003"
+ "jd\u0090\u0094\u00C8\u008D\u00FB/\u008A\u0086\"\u00CC\u001D\u0087\u00E0H\n\u0096w\u00909" + "\u00C6##H\u00FB\u0011GV\u00CA \u00E3B\u0081\u00F7w2\u00C1\u00A5\\@!e\u0017@)\u0017\u0017" + "lV2\u00988\u0006\u00DC\u0099M3)\u00BB\u0002\u00DFL&\u0093l\u0017\u0082\u0086 \u00D7"
+ "\u0003y}\u009A\u0000\u00D7\u0087\u0000\u00E7\u000Bf\u00E3Lfqg\b2\u00F9\b>\u00813\u00CD" + "\u0017r1\u00F0\u00B8\u0094RK\u00901\u008Eh\u00C1\u00EF\u0090\u00C9\u00E5\u00F2a\tr%" + "\u00AD\u00EC\u00C5b\u00C0\u000B\u0012\u0005\u00F7\u0091u\r\u00EEa..\u0019\t\u00C2\u0003"
);
}
[NUnit.Framework.Test]
public virtual void TestFox()
{
CheckDecodeResource("The quick brown fox jumps over the lazy dog", "\u001B*\u0000\u0000\u0004\u0004\u00BAF:\u0085\u0003\u00E9\u00FA\f\u0091\u0002H\u0011," + "\u00F3\u008A:\u00A3V\u007F\u001A\u00AE\u00BF\u00A4\u00AB\u008EM\u00BF\u00ED\u00E2\u0004K"
+ "\u0091\u00FF\u0087\u00E9\u001E");
}
[NUnit.Framework.Test]
public virtual void TestFoxFox()
{
CheckDecodeResourceWithDictionary("The quick brown fox jumps over the lazy dog", "\u001B*\u0000\u0000 \u0000\u00C2\u0098\u00B0\u00CA\u0001", "The quick brown fox jumps over the lazy dog");
}
[NUnit.Framework.Test]
public virtual void TestUtils()
{
new TSpdf.IO.Codec.Brotli.Dec.Context();
new TSpdf.IO.Codec.Brotli.Dec.Decode();
new TSpdf.IO.Codec.Brotli.Dec.Dictionary();
new TSpdf.IO.Codec.Brotli.Dec.Huffman();
new TSpdf.IO.Codec.Brotli.Dec.Prefix();
}
}
}

View File

@@ -0,0 +1,39 @@
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
using TSpdf.Test;
namespace TSpdf.IO.Codec.Brotli.Dec
{
/// <summary>
/// Tests for
/// <see cref="Dictionary"/>
/// .
/// </summary>
public class DictionaryTest : ExtendedTSpdfTest
{
[NUnit.Framework.Test]
public virtual void TestGetData()
{
NUnit.Framework.Assert.AreEqual(37084801881332636L, Crc64(TSpdf.IO.Codec.Brotli.Dec.Dictionary.GetData()));
}
private static long Crc64(byte[] data)
{
long crc = -1;
for (int i = 0; i < data.Length; ++i)
{
long c = (crc ^ (long)(data[i] & unchecked((int)(0xFF)))) & unchecked((int)(0xFF));
for (int k = 0; k < 8; k++)
{
c = ((long)(((ulong)c) >> 1)) ^ (-(c & 1L) & -3932672073523589310L);
}
crc = c ^ ((long)(((ulong)crc) >> 8));
}
return ~crc;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,77 @@
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
using TSpdf.Test;
namespace TSpdf.IO.Codec.Brotli.Dec
{
/// <summary>
/// Tests for
/// <see cref="Transform"/>
/// .
/// </summary>
public class TransformTest : ExtendedTSpdfTest
{
private static long Crc64(byte[] data)
{
long crc = -1;
for (int i = 0; i < data.Length; ++i)
{
long c = (crc ^ (long)(data[i] & unchecked((int)(0xFF)))) & unchecked((int)(0xFF));
for (int k = 0; k < 8; k++)
{
c = ((long)(((ulong)c) >> 1)) ^ (-(c & 1L) & -3932672073523589310L);
}
crc = c ^ ((long)(((ulong)crc) >> 8));
}
return ~crc;
}
[NUnit.Framework.Test]
public virtual void TestTrimAll()
{
byte[] output = new byte[2];
byte[] input = new byte[] { 119, 111, 114, 100 };
// "word"
TSpdf.IO.Codec.Brotli.Dec.Transform transform = new TSpdf.IO.Codec.Brotli.Dec.Transform("[", TSpdf.IO.Codec.Brotli.Dec.WordTransformType.OmitFirst5, "]");
TSpdf.IO.Codec.Brotli.Dec.Transform.TransformDictionaryWord(output, 0, input, 0, input.Length, transform);
byte[] expectedOutput = new byte[] { 91, 93 };
// "[]"
NUnit.Framework.Assert.AreEqual(expectedOutput, output);
}
[NUnit.Framework.Test]
public virtual void TestCapitalize()
{
byte[] output = new byte[8];
byte[] input = new byte[] { 113, unchecked((byte)(-61)), unchecked((byte)(-90)), unchecked((byte)(-32)), unchecked((byte)(-92)), unchecked((byte)(-86)) };
// "qæप"
TSpdf.IO.Codec.Brotli.Dec.Transform transform = new TSpdf.IO.Codec.Brotli.Dec.Transform("[", TSpdf.IO.Codec.Brotli.Dec.WordTransformType.UppercaseAll, "]");
TSpdf.IO.Codec.Brotli.Dec.Transform.TransformDictionaryWord(output, 0, input, 0, input.Length, transform);
byte[] expectedOutput = new byte[] { 91, 81, unchecked((byte)(-61)), unchecked((byte)(-122)), unchecked((byte)(-32)), unchecked((byte)(-92)), unchecked((byte)(-81)), 93 };
// "[QÆय]"
NUnit.Framework.Assert.AreEqual(expectedOutput, output);
}
[NUnit.Framework.Test]
public virtual void TestAllTransforms()
{
/* This string allows to apply all transforms: head and tail cutting, capitalization and
turning to upper case; all results will be mutually different. */
// "o123456789abcdef"
byte[] testWord = new byte[] { 111, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102 };
byte[] output = new byte[2259];
int offset = 0;
for (int i = 0; i < TSpdf.IO.Codec.Brotli.Dec.Transform.Transforms.Length; ++i)
{
offset += TSpdf.IO.Codec.Brotli.Dec.Transform.TransformDictionaryWord(output, offset, testWord, 0, testWord.Length, TSpdf.IO.Codec.Brotli.Dec.Transform.Transforms[i]);
output[offset++] = unchecked((byte)(-1));
}
NUnit.Framework.Assert.AreEqual(output.Length, offset);
NUnit.Framework.Assert.AreEqual(8929191060211225186L, Crc64(output));
}
}
}

View File

@@ -0,0 +1,134 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.IO;
using TSpdf.Commons.Utils;
using TSpdf.IO.Source;
using TSpdf.Test;
namespace TSpdf.IO.Font {
[NUnit.Framework.Category("IntegrationTest")]
public class CFFFontSubsetIntegrationTest : ExtendedTSpdfTest {
private static readonly String SOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/CFFFontSubsetIntegrationTest/";
private static readonly String FONTS_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/sharedFontsResourceFiles/";
private static readonly String CJK_JP_BOLD_PATH = FONTS_FOLDER + "NotoSansCJKjp-Bold.otf";
private const int CJK_JP_BOLD_CFF_OFFSET = 259880;
private const int CJK_JP_BOLD_CFF_LENGTH = 16023217;
private static readonly String JP_REGULAR_PATH = FONTS_FOLDER + "NotoSansJP-Regular_charsetDataFormat0.otf";
private const int JP_REGULAR_CFF_OFFSET = 337316;
private const int JP_REGULAR_CFF_LENGTH = 4210891;
private static readonly String PURITAN_PATH = FONTS_FOLDER + "Puritan2.otf";
[NUnit.Framework.Test]
public virtual void SubsetNotoSansCjkJpBoldNoUsedGlyphsTest() {
String cmpCff = SOURCE_FOLDER + "subsetNotoSansCJKjpBoldNoUsedGlyphs.cff";
ICollection<int> glyphsUsed = JavaCollectionsUtil.EmptySet<int>();
byte[] cffSubsetBytes = SubsetNotoSansCjkJpBoldCff(CJK_JP_BOLD_PATH, CJK_JP_BOLD_CFF_OFFSET, CJK_JP_BOLD_CFF_LENGTH
, glyphsUsed);
int expectedSubsetLength = 279337;
NUnit.Framework.Assert.AreEqual(expectedSubsetLength, cffSubsetBytes.Length);
byte[] cmpBytes = File.ReadAllBytes(System.IO.Path.Combine(cmpCff));
NUnit.Framework.Assert.AreEqual(cmpBytes, cffSubsetBytes);
}
[NUnit.Framework.Test]
public virtual void SubsetNotoSansCjkJpBoldTwoUsedGlyphsTest() {
String cmpCff = SOURCE_FOLDER + "subsetNotoSansCJKjpBoldTwoUsedGlyphs.cff";
// In this case cid == gid for given characters.
// \u20eab "𠺫"
int glyphCid1 = 59715;
// \uff14 ""
int glyphCid2 = 59066;
HashSet<int> glyphsUsed = new HashSet<int>(JavaUtil.ArraysAsList(glyphCid1, glyphCid2));
byte[] cffSubsetBytes = SubsetNotoSansCjkJpBoldCff(CJK_JP_BOLD_PATH, CJK_JP_BOLD_CFF_OFFSET, CJK_JP_BOLD_CFF_LENGTH
, glyphsUsed);
int expectedSubsetLength = 365381;
NUnit.Framework.Assert.AreEqual(expectedSubsetLength, cffSubsetBytes.Length);
byte[] cmpBytes = File.ReadAllBytes(System.IO.Path.Combine(cmpCff));
NUnit.Framework.Assert.AreEqual(cmpBytes, cffSubsetBytes);
}
[NUnit.Framework.Test]
public virtual void SubsetNotoSansJpRegularOneUsedGlyphTest() {
// In this case cid != gid for given characters.
// \u4FE1 "信"; gid: 0x0a72 / 2674
int glyphGid1 = 2674;
HashSet<int> glyphsUsed = new HashSet<int>(JavaCollectionsUtil.SingletonList(glyphGid1));
byte[] cffSubsetBytes = SubsetNotoSansCjkJpBoldCff(JP_REGULAR_PATH, JP_REGULAR_CFF_OFFSET, JP_REGULAR_CFF_LENGTH
, glyphsUsed);
int expectedSubsetLength = 121796;
NUnit.Framework.Assert.AreEqual(expectedSubsetLength, cffSubsetBytes.Length);
byte[] cmpBytes = File.ReadAllBytes(System.IO.Path.Combine(SOURCE_FOLDER + "subsetNotoSansJPRegularOneUsedGlyph.cff"
));
NUnit.Framework.Assert.AreEqual(cmpBytes, cffSubsetBytes);
}
[NUnit.Framework.Test]
public virtual void SubsetNonCidCFFFontRangeCheck() {
// 'H' (not that it matters which glyph we use)
int glyphGid1 = 41;
HashSet<int> glyphsUsed = new HashSet<int>(JavaCollectionsUtil.SingletonList(glyphGid1));
byte[] cffData = new TrueTypeFont(PURITAN_PATH).GetFontStreamBytes();
byte[] cffSubsetBytes = new CFFFontSubset(cffData, glyphsUsed).Process();
CFFFont result = new CFFFont(cffSubsetBytes);
int expectedCharsetLength = 255;
// skip over the format ID (1 byte) and the first SID (2 bytes)
result.Seek(result.fonts[0].charsetOffset + 3);
NUnit.Framework.Assert.AreEqual(expectedCharsetLength - 2, result.GetCard16());
}
private byte[] SubsetNotoSansCjkJpBoldCff(String otfFile, int offsetToCff, int cffLength, ICollection<int>
glyphsUsed) {
RandomAccessFileOrArray fontRaf = null;
try {
fontRaf = new RandomAccessFileOrArray(new RandomAccessSourceFactory().CreateBestSource(otfFile));
byte[] cff = new byte[cffLength];
try {
fontRaf.Seek(offsetToCff);
fontRaf.ReadFully(cff);
}
finally {
fontRaf.Close();
}
CFFFontSubset cffFontSubset = new CFFFontSubset(cff, glyphsUsed);
return cffFontSubset.Process();
}
finally {
if (fontRaf != null) {
fontRaf.Close();
}
}
}
}
}

View File

@@ -0,0 +1,80 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using TSpdf.IO.Source;
using TSpdf.Test;
namespace TSpdf.IO.Font {
[NUnit.Framework.Category("UnitTest")]
public class CFFFontTest : ExtendedTSpdfTest {
private static readonly String SOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/sharedFontsResourceFiles/";
[NUnit.Framework.Test]
public virtual void SeekTest() {
RandomAccessFileOrArray raf = new RandomAccessFileOrArray(new RandomAccessSourceFactory().CreateBestSource
(SOURCE_FOLDER + "NotoSansCJKjp-Bold.otf"));
int offsetToCff = 259880;
int cffLength = 16023217;
byte[] cff = new byte[cffLength];
try {
raf.Seek(offsetToCff);
raf.ReadFully(cff);
}
finally {
raf.Close();
}
CFFFont cffFont = new CFFFont(cff);
cffFont.Seek(0);
// Get int (bin 0000 0001 0000 0000 0000 0100 0000 0011)
NUnit.Framework.Assert.AreEqual(16778243, cffFont.GetInt());
cffFont.Seek(0);
// Gets the first short (bin 0000 0001 0000 0000)
NUnit.Framework.Assert.AreEqual(256, cffFont.GetShort());
cffFont.Seek(2);
// Gets the second short (bin 0000 0100 0000 0011)
NUnit.Framework.Assert.AreEqual(1027, cffFont.GetShort());
}
[NUnit.Framework.Test]
public virtual void GetPositionTest() {
RandomAccessFileOrArray raf = new RandomAccessFileOrArray(new RandomAccessSourceFactory().CreateBestSource
(SOURCE_FOLDER + "NotoSansCJKjp-Bold.otf"));
int offsetToCff = 259880;
int cffLength = 16023217;
byte[] cff = new byte[cffLength];
try {
raf.Seek(offsetToCff);
raf.ReadFully(cff);
}
finally {
raf.Close();
}
CFFFont cffFont = new CFFFont(cff);
cffFont.Seek(0);
NUnit.Framework.Assert.AreEqual(0, cffFont.GetPosition());
cffFont.Seek(16);
NUnit.Framework.Assert.AreEqual(16, cffFont.GetPosition());
}
}
}

View File

@@ -0,0 +1,170 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Otf;
using TSpdf.Test;
namespace TSpdf.IO.Font {
[NUnit.Framework.Category("UnitTest")]
public class FontCacheNoFontAsianTest : ExtendedTSpdfTest {
// Android-Conversion-Skip-File (TODO DEVSIX-7376 investigate why FontCacheNoFontAsianTest is skipped on Android)
[NUnit.Framework.SetUp]
public virtual void Before() {
FontCache.ClearSavedFonts();
}
[NUnit.Framework.Test]
public virtual void ClearFontCacheTest() {
String fontName = "FreeSans.ttf";
NUnit.Framework.Assert.IsNull(FontCache.GetFont(fontName));
FontProgram fontProgram = new FontCacheNoFontAsianTest.FontProgramMock();
FontCache.SaveFont(fontProgram, fontName);
NUnit.Framework.Assert.AreEqual(fontProgram, FontCache.GetFont(fontName));
FontCache.ClearSavedFonts();
NUnit.Framework.Assert.IsNull(FontCache.GetFont(fontName));
}
[NUnit.Framework.Test]
public virtual void FontStringTtcCacheKeyTest() {
String fontName = "Font.ttc";
FontCacheKey ttc0 = FontCacheKey.Create(fontName, 0);
FontCacheKey ttc1 = FontCacheKey.Create(fontName, 1);
NUnit.Framework.Assert.IsNull(FontCache.GetFont(ttc0));
NUnit.Framework.Assert.IsNull(FontCache.GetFont(ttc1));
FontProgram fontProgram = new FontCacheNoFontAsianTest.FontProgramMock();
FontCache.SaveFont(fontProgram, ttc1);
NUnit.Framework.Assert.IsNull(FontCache.GetFont(ttc0));
NUnit.Framework.Assert.AreEqual(fontProgram, FontCache.GetFont(ttc1));
}
[NUnit.Framework.Test]
public virtual void FontBytesTtcCacheKeyTest() {
byte[] fontBytes = "SupposedTtcFontData".GetBytes(System.Text.Encoding.UTF8);
byte[] otherFontBytes = "DifferentTtcFontBytes".GetBytes(System.Text.Encoding.UTF8);
byte[] normalFontBytes = "NormalFontBytes".GetBytes(System.Text.Encoding.UTF8);
FontCacheKey ttc0 = FontCacheKey.Create(fontBytes, 1);
FontCacheKey otherTtc0 = FontCacheKey.Create(otherFontBytes, 1);
FontCacheKey normal = FontCacheKey.Create(normalFontBytes);
NUnit.Framework.Assert.IsNull(FontCache.GetFont(ttc0));
NUnit.Framework.Assert.IsNull(FontCache.GetFont(otherTtc0));
NUnit.Framework.Assert.IsNull(FontCache.GetFont(normal));
FontProgram otherTtc0MockFontProgram = new FontCacheNoFontAsianTest.FontProgramMock();
FontProgram normalMockFontProgram = new FontCacheNoFontAsianTest.FontProgramMock();
FontCache.SaveFont(otherTtc0MockFontProgram, otherTtc0);
FontCache.SaveFont(normalMockFontProgram, normal);
NUnit.Framework.Assert.IsNull(FontCache.GetFont(ttc0));
NUnit.Framework.Assert.AreEqual(otherTtc0MockFontProgram, FontCache.GetFont(otherTtc0));
NUnit.Framework.Assert.AreEqual(normalMockFontProgram, FontCache.GetFont(normal));
}
[NUnit.Framework.Test]
public virtual void GetCompatibleCidFontNoFontAsian() {
// Without font-asian module in the class path
// any value passed into a method is expected to return null.
NUnit.Framework.Assert.IsNull(FontCache.GetCompatibleCidFont("78-RKSJ-V"));
}
[NUnit.Framework.Test]
public virtual void IsPredefinedCidFontNoFontAsian() {
// Without font-asian module in the class path
// any value passed into a method is expected to return false.
NUnit.Framework.Assert.IsFalse(FontCache.IsPredefinedCidFont("78-RKSJ-V"));
}
[NUnit.Framework.Test]
public virtual void GetCompatibleCmapsNoFontAsian() {
// Without font-asian module in the class path
// any value passed into a method is expected to return null.
NUnit.Framework.Assert.IsNull(FontCache.GetCompatibleCmaps("HeiseiKakuGo-W5"));
}
[NUnit.Framework.Test]
public virtual void GetRegistryNamesNoFontAsian() {
// Without font-asian module in the class path
// registry names collection is expected to be empty.
NUnit.Framework.Assert.IsTrue(FontCache.GetRegistryNames().IsEmpty());
}
[NUnit.Framework.Test]
public virtual void GetCid2UniCMapNoFontAsian() {
// Without font-asian module in the class path
// no CMap can be found.
NUnit.Framework.Assert.Catch(typeof(TSpdf.IO.Exceptions.IOException), () => FontCache.GetCid2UniCmap("UniJIS-UTF16-H"
));
}
[NUnit.Framework.Test]
public virtual void GetUni2CidCMapNoFontAsian() {
// Without font-asian module in the class path
// no CMap can be found.
NUnit.Framework.Assert.Catch(typeof(TSpdf.IO.Exceptions.IOException), () => FontCache.GetUni2CidCmap("UniJIS-UTF16-H"
));
}
[NUnit.Framework.Test]
public virtual void GetByte2CidCMapNoFontAsian() {
// Without font-asian module in the class path
// no CMap can be found.
NUnit.Framework.Assert.Catch(typeof(TSpdf.IO.Exceptions.IOException), () => FontCache.GetByte2CidCmap("78ms-RKSJ-H"
));
}
[NUnit.Framework.Test]
public virtual void GetCid2ByteCMapNoFontAsian() {
// Without font-asian module in the class path
// no CMap can be found.
NUnit.Framework.Assert.Catch(typeof(TSpdf.IO.Exceptions.IOException), () => FontCache.GetCid2Byte("78ms-RKSJ-H"
));
}
private class FontProgramMock : FontProgram {
public override int GetPdfFontFlags() {
return 0;
}
public override int GetKerning(Glyph first, Glyph second) {
return 0;
}
}
}
}

View File

@@ -0,0 +1,92 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.Test;
namespace TSpdf.IO.Font {
[NUnit.Framework.Category("UnitTest")]
public class FontEncodingTest : ExtendedTSpdfTest {
[NUnit.Framework.Test]
public virtual void NotSetDifferenceToMinus1IndexTest() {
FontEncoding encoding = FontEncoding.CreateEmptyFontEncoding();
String[] initialDifferences = (String[])encoding.differences.Clone();
encoding.SetDifference(-1, "a");
NUnit.Framework.Assert.AreEqual(initialDifferences, encoding.differences);
}
[NUnit.Framework.Test]
public virtual void NotSetDifferenceTo256IndexTest() {
FontEncoding encoding = FontEncoding.CreateEmptyFontEncoding();
String[] initialDifferences = (String[])encoding.differences.Clone();
encoding.SetDifference(256, "a");
NUnit.Framework.Assert.AreEqual(initialDifferences, encoding.differences);
}
[NUnit.Framework.Test]
public virtual void SetDifferenceToZeroIndexTest() {
FontEncoding encoding = FontEncoding.CreateEmptyFontEncoding();
encoding.SetDifference(0, "a");
NUnit.Framework.Assert.AreEqual("a", encoding.differences[0]);
}
[NUnit.Framework.Test]
public virtual void SetDifferenceTo255IndexTest() {
FontEncoding encoding = FontEncoding.CreateEmptyFontEncoding();
encoding.SetDifference(255, "a");
NUnit.Framework.Assert.AreEqual("a", encoding.differences[255]);
}
[NUnit.Framework.Test]
public virtual void GetNullDifferenceTest() {
FontEncoding encoding = FontEncoding.CreateEmptyFontEncoding();
NUnit.Framework.Assert.IsNull(encoding.GetDifference(0));
}
[NUnit.Framework.Test]
public virtual void SetDifferenceAndGetTest() {
FontEncoding encoding = FontEncoding.CreateEmptyFontEncoding();
encoding.SetDifference(0, "a");
NUnit.Framework.Assert.AreEqual("a", encoding.GetDifference(0));
}
}
}

View File

@@ -0,0 +1,93 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font.Constants;
using TSpdf.Test;
namespace TSpdf.IO.Font {
[NUnit.Framework.Category("UnitTest")]
public class FontProgramTest : ExtendedTSpdfTest {
private const String notExistingFont = "some-font.ttf";
[NUnit.Framework.Test]
public virtual void ExceptionMessageTest() {
Exception e = NUnit.Framework.Assert.Catch(typeof(System.IO.IOException), () => FontProgramFactory.CreateFont
(notExistingFont));
NUnit.Framework.Assert.AreEqual(MessageFormatUtil.Format(TSpdf.IO.Exceptions.IOException._1NotFoundAsFileOrResource
, notExistingFont), e.Message);
}
[NUnit.Framework.Test]
public virtual void BoldTest() {
FontProgram fp = FontProgramFactory.CreateFont(StandardFonts.HELVETICA);
fp.SetBold(true);
NUnit.Framework.Assert.IsTrue((fp.GetPdfFontFlags() & (1 << 18)) != 0, "Bold expected");
fp.SetBold(false);
NUnit.Framework.Assert.IsTrue((fp.GetPdfFontFlags() & (1 << 18)) == 0, "Not Bold expected");
}
[NUnit.Framework.Test]
public virtual void RegisterDirectoryOpenTypeTest() {
FontProgramFactory.ClearRegisteredFonts();
FontProgramFactory.ClearRegisteredFontFamilies();
FontCache.ClearSavedFonts();
FontProgramFactory.RegisterFontDirectory(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/");
NUnit.Framework.Assert.AreEqual(43, FontProgramFactory.GetRegisteredFonts().Count);
NUnit.Framework.Assert.IsNull(FontCache.GetFont(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSansBold.ttf"));
NUnit.Framework.Assert.IsTrue(FontProgramFactory.GetRegisteredFonts().Contains("free sans lihavoitu"));
}
[NUnit.Framework.Test]
public virtual void RegisterDirectoryType1Test() {
FontProgramFactory.RegisterFontDirectory(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/type1/");
FontProgram computerModern = FontProgramFactory.CreateRegisteredFont("computer modern");
FontProgram cmr10 = FontProgramFactory.CreateRegisteredFont("cmr10");
NUnit.Framework.Assert.IsNotNull(computerModern);
NUnit.Framework.Assert.IsNotNull(cmr10);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using TSpdf.Test;
namespace TSpdf.IO.Font {
[NUnit.Framework.Category("UnitTest")]
public class MonospaceFontTest : ExtendedTSpdfTest {
private static readonly String sourceFolder = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/MonospaceFontTest/";
[NUnit.Framework.Test]
public virtual void OpenMono() {
TrueTypeFont font = new TrueTypeFont(sourceFolder + "DejaVuSansMono.ttf");
NUnit.Framework.Assert.IsNotNull(font.GetGlyph('A'));
}
[NUnit.Framework.Test]
public virtual void OpenSans() {
TrueTypeFont font = new TrueTypeFont(sourceFolder + "DejaVuSans.ttf");
NUnit.Framework.Assert.IsNotNull(font.GetGlyph('A'));
}
[NUnit.Framework.Test]
public virtual void OpenSerif() {
TrueTypeFont font = new TrueTypeFont(sourceFolder + "DejaVuSerif.ttf");
NUnit.Framework.Assert.IsNotNull(font.GetGlyph('A'));
}
}
}

View File

@@ -0,0 +1,83 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font.Otf;
using TSpdf.Test;
namespace TSpdf.IO.Font {
[NUnit.Framework.Category("UnitTest")]
public class TrueTypeFontTest : ExtendedTSpdfTest {
private static readonly String SOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/sharedFontsResourceFiles/";
[NUnit.Framework.Test]
public virtual void NotoSansJpCmapTest() {
// 信
char jpChar = '\u4FE1';
FontProgram fontProgram = FontProgramFactory.CreateFont(SOURCE_FOLDER + "NotoSansJP-Regular_charsetDataFormat0.otf"
);
Glyph glyph = fontProgram.GetGlyph(jpChar);
NUnit.Framework.Assert.AreEqual(new char[] { jpChar }, glyph.GetUnicodeChars());
NUnit.Framework.Assert.AreEqual(20449, glyph.GetUnicode());
NUnit.Framework.Assert.AreEqual(10195, glyph.GetCode());
}
[NUnit.Framework.Test]
public virtual void NotoSansScCmapTest() {
// 易
char chChar = '\u6613';
FontProgram fontProgram = FontProgramFactory.CreateFont(SOURCE_FOLDER + "NotoSansSC-Regular.otf");
Glyph glyph = fontProgram.GetGlyph(chChar);
NUnit.Framework.Assert.AreEqual(new char[] { chChar }, glyph.GetUnicodeChars());
NUnit.Framework.Assert.AreEqual(26131, glyph.GetUnicode());
NUnit.Framework.Assert.AreEqual(20292, glyph.GetCode());
}
[NUnit.Framework.Test]
public virtual void NotoSansTcCmapTest() {
// 易
char chChar = '\u6613';
FontProgram fontProgram = FontProgramFactory.CreateFont(SOURCE_FOLDER + "NotoSansTC-Regular.otf");
Glyph glyph = fontProgram.GetGlyph(chChar);
NUnit.Framework.Assert.AreEqual(new char[] { chChar }, glyph.GetUnicodeChars());
NUnit.Framework.Assert.AreEqual(26131, glyph.GetUnicode());
NUnit.Framework.Assert.AreEqual(20292, glyph.GetCode());
}
[NUnit.Framework.Test]
public virtual void NotoSansScMapGlyphsCidsToGidsTest() {
// 易
char chChar = '\u6613';
int charCidInFont = 20292;
int charGidInFont = 14890;
TrueTypeFont trueTypeFontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(SOURCE_FOLDER + "NotoSansSC-Regular.otf"
);
HashSet<int> glyphs = new HashSet<int>(JavaCollectionsUtil.SingletonList(charCidInFont));
ICollection<int> actualResult = trueTypeFontProgram.MapGlyphsCidsToGids(glyphs);
NUnit.Framework.Assert.AreEqual(1, actualResult.Count);
NUnit.Framework.Assert.IsTrue(actualResult.Contains(charGidInFont));
}
}
}

View File

@@ -0,0 +1,42 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using TSpdf.Test;
namespace TSpdf.IO.Font.Cmap {
[NUnit.Framework.Category("UnitTest")]
public class CMapByteCidTest : ExtendedTSpdfTest {
[NUnit.Framework.Test]
public virtual void AddCharAndDecodeByteCodeTest() {
CMapByteCid cMapByteCid = new CMapByteCid();
char byteCode = (char)0x94e0;
int cid = 7779;
byte[] byteCodeBytes = new byte[] { (byte)((byteCode & 0xFF00) >> 8), (byte)(byteCode & 0xFF) };
char[] charPerByteSequence = new char[] { (char)byteCodeBytes[0], (char)byteCodeBytes[1] };
cMapByteCid.AddChar(new String(charPerByteSequence), new CMapObject(CMapObject.NUMBER, cid));
String actual = cMapByteCid.DecodeSequence(byteCodeBytes, 0, 2);
String expected = new String(new char[] { (char)cid });
NUnit.Framework.Assert.AreEqual(expected, actual);
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using TSpdf.Commons.Utils;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("UnitTest")]
public class ActualTextIteratorTest : ExtendedTSpdfTest {
[NUnit.Framework.Test]
public virtual void TestActualTestParts() {
Glyph glyph = new Glyph(200, 200, '\u002d');
GlyphLine glyphLine = new GlyphLine(JavaUtil.ArraysAsList(glyph));
glyphLine.SetActualText(0, 1, "\u002d");
ActualTextIterator actualTextIterator = new ActualTextIterator(glyphLine);
GlyphLine.GlyphLinePart part = actualTextIterator.Next();
// When actual text is the same as the result by text extraction, we should omit redundant actual text in the content stream
NUnit.Framework.Assert.IsNull(part.actualText);
}
}
}

View File

@@ -0,0 +1,230 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using System.Collections.Generic;
using System.IO;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.IO.Util;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("UnitTest")]
public class GlyphLineTest : ExtendedTSpdfTest {
private static IList<Glyph> ConstructGlyphListFromString(String text, TrueTypeFont font) {
IList<Glyph> glyphList = new List<Glyph>();
char[] chars = text.ToCharArray();
foreach (char letter in chars) {
glyphList.Add(font.GetGlyph(letter));
}
return glyphList;
}
[NUnit.Framework.Test]
public virtual void TestEquals() {
Glyph glyph = new Glyph(200, 200, 200);
GlyphLine.ActualText actualText = new GlyphLine.ActualText("-");
GlyphLine one = new GlyphLine(new List<Glyph>(JavaUtil.ArraysAsList(glyph)), new List<GlyphLine.ActualText
>(JavaUtil.ArraysAsList(actualText)), 0, 1);
GlyphLine two = new GlyphLine(new List<Glyph>(JavaUtil.ArraysAsList(glyph)), new List<GlyphLine.ActualText
>(JavaUtil.ArraysAsList(actualText)), 0, 1);
one.Add(glyph);
two.Add(glyph);
one.end++;
two.end++;
NUnit.Framework.Assert.IsTrue(one.Equals(two));
}
[NUnit.Framework.Test]
public virtual void TestOtherLinesAddition() {
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
GlyphLine containerLine = new GlyphLine(ConstructGlyphListFromString("Viva France!", font));
GlyphLine childLine1 = new GlyphLine(ConstructGlyphListFromString(" Liberte", font));
containerLine.Add(childLine1);
NUnit.Framework.Assert.AreEqual(containerLine.end, 12);
containerLine.end = 20;
GlyphLine childLine2 = new GlyphLine(ConstructGlyphListFromString(" Egalite", font));
containerLine.Add(childLine2);
NUnit.Framework.Assert.AreEqual(containerLine.end, 20);
containerLine.start = 10;
GlyphLine childLine3 = new GlyphLine(ConstructGlyphListFromString(" Fraternite", font));
containerLine.Add(childLine3);
NUnit.Framework.Assert.AreEqual(containerLine.start, 10);
containerLine.start = 0;
containerLine.Add(ConstructGlyphListFromString("!", font)[0]);
containerLine.end = 40;
NUnit.Framework.Assert.AreEqual(containerLine.glyphs.Count, 40);
}
[NUnit.Framework.Test]
public virtual void TestAdditionWithActualText() {
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
IList<Glyph> glyphs = ConstructGlyphListFromString("Viva France!", font);
GlyphLine containerLine = new GlyphLine(glyphs);
NUnit.Framework.Assert.IsNull(containerLine.actualText);
containerLine.SetActualText(0, 1, "TEST");
NUnit.Framework.Assert.IsNotNull(containerLine.actualText);
NUnit.Framework.Assert.AreEqual(12, containerLine.actualText.Count);
NUnit.Framework.Assert.AreEqual("TEST", containerLine.actualText[0].value);
containerLine.Add(new GlyphLine(glyphs));
NUnit.Framework.Assert.AreEqual(24, containerLine.actualText.Count);
for (int i = 13; i < 24; i++) {
NUnit.Framework.Assert.IsNull(containerLine.actualText[i]);
}
}
[NUnit.Framework.Test]
public virtual void TestOtherLinesWithActualTextAddition() {
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
GlyphLine containerLine = new GlyphLine(ConstructGlyphListFromString("France", font));
GlyphLine childLine = new GlyphLine(ConstructGlyphListFromString("---Liberte", font));
childLine.SetActualText(3, 10, "Viva");
containerLine.Add(childLine);
containerLine.end = 16;
for (int i = 0; i < 9; i++) {
NUnit.Framework.Assert.IsNull(containerLine.actualText[i]);
}
for (int i = 9; i < 16; i++) {
NUnit.Framework.Assert.AreEqual("Viva", containerLine.actualText[i].value);
}
NUnit.Framework.Assert.AreEqual("France---Viva", containerLine.ToString());
}
[NUnit.Framework.Test]
public virtual void TestOtherLinesWithActualTextAddition02() {
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
GlyphLine containerLine = new GlyphLine(ConstructGlyphListFromString("France", font));
containerLine.SetActualText(1, 5, "id");
GlyphLine childLine = new GlyphLine(ConstructGlyphListFromString("---Liberte", font));
childLine.SetActualText(3, 10, "Viva");
containerLine.Add(childLine);
containerLine.end = 16;
NUnit.Framework.Assert.IsNull(containerLine.actualText[0]);
for (int i = 1; i < 5; i++) {
NUnit.Framework.Assert.AreEqual("id", containerLine.actualText[i].value);
}
for (int i = 5; i < 9; i++) {
NUnit.Framework.Assert.IsNull(containerLine.actualText[i]);
}
for (int i = 9; i < 16; i++) {
NUnit.Framework.Assert.AreEqual("Viva", containerLine.actualText[i].value);
}
NUnit.Framework.Assert.AreEqual("Fide---Viva", containerLine.ToString());
}
[NUnit.Framework.Test]
public virtual void TestContentReplacingWithNullActualText() {
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
GlyphLine lineToBeReplaced = new GlyphLine(ConstructGlyphListFromString("Byelorussia", font));
lineToBeReplaced.SetActualText(1, 2, "e");
GlyphLine lineToBeCopied = new GlyphLine(ConstructGlyphListFromString("Belarus", font));
lineToBeReplaced.ReplaceContent(lineToBeCopied);
// Test that no exception has been thrown. Also check the content.
NUnit.Framework.Assert.AreEqual("Belarus", lineToBeReplaced.ToString());
}
[NUnit.Framework.Test]
public virtual void TestActualTextForSubstitutedGlyphProcessingInSubstituteOneToMany01() {
String expectedActualTextForFirstGlyph = "0";
String expectedActualTextForSecondGlyph = "A";
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
// no actual text for the second glyph is set - it should be created during substitution
GlyphLine line = new GlyphLine(ConstructGlyphListFromString("AA", font));
line.SetActualText(0, 1, expectedActualTextForFirstGlyph);
line.idx = 1;
line.SubstituteOneToMany(font.GetGsubTable(), new int[] { 39, 40 });
NUnit.Framework.Assert.IsNotNull(line.actualText);
NUnit.Framework.Assert.AreEqual(3, line.actualText.Count);
NUnit.Framework.Assert.AreSame(line.actualText[1], line.actualText[2]);
NUnit.Framework.Assert.AreEqual(expectedActualTextForSecondGlyph, line.actualText[1].value);
// check that it hasn't been corrupted
NUnit.Framework.Assert.AreEqual(expectedActualTextForFirstGlyph, line.actualText[0].value);
}
[NUnit.Framework.Test]
public virtual void TestActualTextForSubstitutedGlyphProcessingInSubstituteOneToMany02() {
String expectedActualTextForFirstGlyph = "A";
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
GlyphLine line = new GlyphLine(ConstructGlyphListFromString("A", font));
line.SetActualText(0, 1, expectedActualTextForFirstGlyph);
line.SubstituteOneToMany(font.GetGsubTable(), new int[] { 39, 40 });
NUnit.Framework.Assert.IsNotNull(line.actualText);
NUnit.Framework.Assert.AreEqual(2, line.actualText.Count);
NUnit.Framework.Assert.AreSame(line.actualText[0], line.actualText[1]);
NUnit.Framework.Assert.AreEqual(expectedActualTextForFirstGlyph, line.actualText[0].value);
}
[NUnit.Framework.Test]
public virtual void TestActualTextForSubstitutedGlyphProcessingInSubstituteOneToMany03() {
byte[] ttf = StreamUtil.InputStreamToArray(new FileStream(TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/FreeSans.ttf", FileMode.Open, FileAccess.Read
));
TrueTypeFont font = new TrueTypeFont(ttf);
// no actual text is set
GlyphLine line = new GlyphLine(ConstructGlyphListFromString("A", font));
line.SubstituteOneToMany(font.GetGsubTable(), new int[] { 39, 40 });
NUnit.Framework.Assert.IsNull(line.actualText);
}
}
}

View File

@@ -0,0 +1,54 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("UnitTest")]
public class GlyphTest : ExtendedTSpdfTest {
[NUnit.Framework.Test]
public virtual void HasPlacementIfAnchorDeltaNonZeroTest() {
Glyph glyph = CreateDummyGlyph();
NUnit.Framework.Assert.AreEqual(0, glyph.GetXPlacement());
NUnit.Framework.Assert.AreEqual(0, glyph.GetYPlacement());
NUnit.Framework.Assert.AreEqual(0, glyph.GetAnchorDelta());
NUnit.Framework.Assert.IsFalse(glyph.HasPlacement());
glyph.SetAnchorDelta((short)10);
NUnit.Framework.Assert.IsTrue(glyph.HasPlacement());
}
[NUnit.Framework.Test]
public virtual void HasOffsetsIfAnchorDeltaNonZeroTest() {
Glyph glyph = CreateDummyGlyph();
NUnit.Framework.Assert.AreEqual(0, glyph.GetXPlacement());
NUnit.Framework.Assert.AreEqual(0, glyph.GetYPlacement());
NUnit.Framework.Assert.AreEqual(0, glyph.GetAnchorDelta());
NUnit.Framework.Assert.IsFalse(glyph.HasOffsets());
glyph.SetAnchorDelta((short)10);
NUnit.Framework.Assert.IsTrue(glyph.HasOffsets());
}
private static Glyph CreateDummyGlyph() {
return new Glyph(0, 0, 0);
}
}
}

View File

@@ -0,0 +1,86 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class GposLookupType1Test : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/GposLookupType1Test/";
[NUnit.Framework.Test]
public virtual void VerifyXAdvanceIsAppliedSubFormat1() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType1 lookup = (GposLookupType1)gposTableReader.GetLookupTable(29);
IList<Glyph> glyphs = JavaUtil.ArraysAsList(new Glyph(fontProgram.GetGlyphByCode(174)), new Glyph(fontProgram
.GetGlyphByCode(5)));
GlyphLine gl = new GlyphLine(glyphs);
gl.idx = 0;
NUnit.Framework.Assert.AreEqual(0, gl.Get(0).GetXAdvance());
NUnit.Framework.Assert.IsTrue(lookup.TransformOne(gl));
NUnit.Framework.Assert.AreEqual(219, gl.Get(0).GetXAdvance());
}
[NUnit.Framework.Test]
public virtual void VerifyPositionIsNotAppliedForIrrelevantGlyphSubFormat1() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType1 lookup = (GposLookupType1)gposTableReader.GetLookupTable(29);
IList<Glyph> glyphs = JavaUtil.ArraysAsList(new Glyph(fontProgram.GetGlyphByCode(5)), new Glyph(fontProgram
.GetGlyphByCode(174)));
GlyphLine gl = new GlyphLine(glyphs);
gl.idx = 0;
NUnit.Framework.Assert.AreEqual(0, gl.Get(0).GetXAdvance());
NUnit.Framework.Assert.IsFalse(lookup.TransformOne(gl));
NUnit.Framework.Assert.AreEqual(0, gl.Get(0).GetXAdvance());
}
[NUnit.Framework.Test]
public virtual void VerifyDifferentXAdvanceIsAppliedSubFormat2() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType1 lookup = (GposLookupType1)gposTableReader.GetLookupTable(16);
IList<Glyph> glyphs = JavaUtil.ArraysAsList(new Glyph(fontProgram.GetGlyphByCode(401)), new Glyph(fontProgram
.GetGlyphByCode(5)));
GlyphLine gl = new GlyphLine(glyphs);
NUnit.Framework.Assert.AreEqual(0, gl.Get(0).GetXAdvance());
NUnit.Framework.Assert.IsTrue(lookup.TransformOne(gl));
NUnit.Framework.Assert.AreEqual(109, gl.Get(0).GetXAdvance());
// Subtable type 2 defines different GposValueRecords for different coverage glyphs
glyphs = JavaUtil.ArraysAsList(new Glyph(fontProgram.GetGlyphByCode(508)), new Glyph(fontProgram.GetGlyphByCode
(5)));
gl = new GlyphLine(glyphs);
NUnit.Framework.Assert.AreEqual(0, gl.Get(0).GetXAdvance());
NUnit.Framework.Assert.IsTrue(lookup.TransformOne(gl));
NUnit.Framework.Assert.AreEqual(158, gl.Get(0).GetXAdvance());
}
}
}

View File

@@ -0,0 +1,52 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class GposLookupType4Test : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/GposLookupType4Test/";
[NUnit.Framework.Test]
public virtual void VerifyMarkToBaseAttachment() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "Padauk-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType4 lookup = (GposLookupType4)gposTableReader.GetLookupTable(192);
IList<Glyph> glyphs = JavaUtil.ArraysAsList(new Glyph(fontProgram.GetGlyphByCode(163)), new Glyph(fontProgram
.GetGlyphByCode(207)), new Glyph(fontProgram.GetGlyphByCode(213)));
GlyphLine gl = new GlyphLine(glyphs);
gl.idx = 2;
NUnit.Framework.Assert.AreEqual(0, gl.Get(2).GetXPlacement());
NUnit.Framework.Assert.AreEqual(0, gl.Get(2).GetAnchorDelta());
lookup.TransformOne(gl);
NUnit.Framework.Assert.AreEqual(364, gl.Get(2).GetXPlacement());
NUnit.Framework.Assert.AreEqual(-2, gl.Get(2).GetAnchorDelta());
}
}
}

View File

@@ -0,0 +1,89 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class GposLookupType5Test : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/GposLookupType5Test/";
[NUnit.Framework.Test]
public virtual void VerifyMarkToBaseAttachment() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "KhmerOS.ttf");
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType5 lookup = (GposLookupType5)gposTableReader.GetLookupTable(0);
IList<Glyph> glyphs = JavaUtil.ArraysAsList(new Glyph(fontProgram.GetGlyphByCode(445)), new Glyph(fontProgram
.GetGlyphByCode(394)));
GlyphLine gl = new GlyphLine(glyphs);
gl.idx = 1;
lookup.TransformOne(gl);
NUnit.Framework.Assert.AreEqual(2, gl.Size());
NUnit.Framework.Assert.AreEqual(445, gl.Get(0).GetCode());
NUnit.Framework.Assert.AreEqual(394, gl.Get(1).GetCode());
NUnit.Framework.Assert.AreEqual(-1, gl.Get(1).GetAnchorDelta());
NUnit.Framework.Assert.AreEqual(756, gl.Get(1).GetXPlacement());
}
[NUnit.Framework.Test]
public virtual void TestSelectingCorrectAttachmentAlternative() {
// TODO on completion of DEVSIX-3732 this test will probably have to be refactored
// since we will have to emulate previous substitutions and populate the substitution info
// to the glyph line so that mark is attached to the correct component of a ligature
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoNaskhArabic-Regular.ttf"
);
GlyphLine glyphLine = new GlyphLine(JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(513), fontProgram.GetGlyphByCode
(75)));
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType5 lookup = (GposLookupType5)gposTableReader.GetLookupTable(3);
glyphLine.idx = 1;
lookup.TransformOne(glyphLine);
NUnit.Framework.Assert.AreEqual(2, glyphLine.Size());
NUnit.Framework.Assert.AreEqual(513, glyphLine.Get(0).GetCode());
NUnit.Framework.Assert.AreEqual(75, glyphLine.Get(1).GetCode());
NUnit.Framework.Assert.AreEqual(-1, glyphLine.Get(1).GetAnchorDelta());
NUnit.Framework.Assert.AreEqual(-22, glyphLine.Get(1).GetXPlacement());
}
[NUnit.Framework.Test]
public virtual void TestThatNoTransformationsAppliedForNonRelevantGlyphs() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoNaskhArabic-Regular.ttf"
);
GlyphLine glyphLine = new GlyphLine(JavaUtil.ArraysAsList(fontProgram.GetGlyph('1'), fontProgram.GetGlyphByCode
(75)));
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType5 lookup = (GposLookupType5)gposTableReader.GetLookupTable(3);
glyphLine.idx = 1;
lookup.TransformOne(glyphLine);
NUnit.Framework.Assert.AreEqual(2, glyphLine.Size());
NUnit.Framework.Assert.AreEqual(1490, glyphLine.Get(0).GetCode());
NUnit.Framework.Assert.AreEqual(75, glyphLine.Get(1).GetCode());
NUnit.Framework.Assert.AreEqual(0, glyphLine.Get(1).GetAnchorDelta());
NUnit.Framework.Assert.AreEqual(0, glyphLine.Get(1).GetXPlacement());
}
}
}

View File

@@ -0,0 +1,65 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class GposLookupType7Test : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/GposLookupType7Test/";
[NUnit.Framework.Test]
public virtual void VerifyXAdvanceIsAppliedForContextualPositioning() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType7 lookup = (GposLookupType7)gposTableReader.GetLookupTable(28);
IList<Glyph> glyphs = JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(25), fontProgram.GetGlyphByCode(174
), fontProgram.GetGlyphByCode(5), fontProgram.GetGlyphByCode(411));
GlyphLine gl = new GlyphLine(glyphs);
NUnit.Framework.Assert.AreEqual(0, gl.Get(1).GetXAdvance());
NUnit.Framework.Assert.IsTrue(lookup.TransformLine(gl));
NUnit.Framework.Assert.AreEqual(219, gl.Get(1).GetXAdvance());
}
[NUnit.Framework.Test]
public virtual void VerifyXAdvanceIsNotAppliedForUnsatisfiedContextualPositioning() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
GposLookupType7 lookup = (GposLookupType7)gposTableReader.GetLookupTable(28);
IList<Glyph> glyphs = JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(1), fontProgram.GetGlyphByCode(174)
, fontProgram.GetGlyphByCode(5), fontProgram.GetGlyphByCode(411));
GlyphLine gl = new GlyphLine(glyphs);
NUnit.Framework.Assert.IsFalse(lookup.TransformLine(gl));
for (int i = 0; i < gl.Size(); i++) {
NUnit.Framework.Assert.AreEqual(0, gl.Get(i).GetXAdvance());
NUnit.Framework.Assert.AreEqual(0, gl.Get(i).GetYAdvance());
}
}
}
}

View File

@@ -0,0 +1,81 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class GposLookupType8Test : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/GposLookupType8Test/";
[NUnit.Framework.Test]
public virtual void VerifyXAdvanceIsAppliedForContextualPositioning() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "Padauk-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
IList<Glyph> glyphs = JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(233), fontProgram.GetGlyphByCode(163
), fontProgram.GetGlyphByCode(158), fontProgram.GetGlyphByCode(227));
GlyphLine gl = new GlyphLine(glyphs);
GposLookupType8 lookup = (GposLookupType8)gposTableReader.GetLookupTable(92);
NUnit.Framework.Assert.AreEqual(0, gl.Get(2).GetXAdvance());
NUnit.Framework.Assert.IsTrue(lookup.TransformLine(gl));
NUnit.Framework.Assert.AreEqual(28, gl.Get(2).GetXAdvance());
}
[NUnit.Framework.Test]
public virtual void VerifyXAdvanceIsAppliedForPosTableLookup8Format2() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
IList<Glyph> glyphs = JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(29), fontProgram.GetGlyphByCode(26)
, fontProgram.GetGlyphByCode(431), fontProgram.GetGlyphByCode(415), fontProgram.GetGlyphByCode(199), fontProgram
.GetGlyphByCode(26), fontProgram.GetGlyphByCode(407), fontProgram.GetGlyphByCode(210), fontProgram.GetGlyphByCode
(417));
GlyphLine gl = new GlyphLine(glyphs);
GposLookupType8 lookup = (GposLookupType8)gposTableReader.GetLookupTable(0);
NUnit.Framework.Assert.AreEqual(0, gl.Get(1).GetXAdvance());
NUnit.Framework.Assert.IsTrue(lookup.TransformLine(gl));
NUnit.Framework.Assert.AreEqual(134, gl.Get(1).GetXAdvance());
}
[NUnit.Framework.Test]
public virtual void VerifyXAdvanceIsNotAppliedForUnsatisfiedContextualPositioning() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "Padauk-Regular.ttf"
);
GlyphPositioningTableReader gposTableReader = fontProgram.GetGposTable();
IList<Glyph> glyphs = JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(233), fontProgram.GetGlyphByCode(163
), fontProgram.GetGlyphByCode(158), fontProgram.GetGlyphByCode(233));
GlyphLine gl = new GlyphLine(glyphs);
GposLookupType8 lookup = (GposLookupType8)gposTableReader.GetLookupTable(92);
NUnit.Framework.Assert.IsFalse(lookup.TransformLine(gl));
for (int i = 0; i < gl.Size(); i++) {
NUnit.Framework.Assert.AreEqual(0, gl.Get(i).GetXAdvance());
NUnit.Framework.Assert.AreEqual(0, gl.Get(i).GetYAdvance());
}
}
}
}

View File

@@ -0,0 +1,49 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class GsubLookupType4Test : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/GsubLookupType4Test/";
[NUnit.Framework.Test]
public virtual void TestNoIndexOutOfBound() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "DejaVuSansMono.ttf"
);
GlyphSubstitutionTableReader gsubTableReader = fontProgram.GetGsubTable();
IList<Glyph> glyphs = JavaUtil.ArraysAsList(new Glyph(1, 1, 1), new Glyph(1, 1, 1), new Glyph(1, 1, 1), new
Glyph(1, 1, 1), new Glyph(1, 1, 1), new Glyph(1, 1, 1));
GlyphLine gl = new GlyphLine(glyphs);
gl.idx = gl.end;
GsubLookupType4 lookup = (GsubLookupType4)gsubTableReader.GetLookupTable(6);
//Assert that no exception is thrown if gl.idx = gl.end
NUnit.Framework.Assert.IsFalse(lookup.TransformOne(gl));
}
}
}

View File

@@ -0,0 +1,65 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.Commons.Utils;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class GsubLookupType6Test : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/GsubLookupType6Test/";
[NUnit.Framework.Test]
public virtual void TestSubstitutionApplied() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "Padauk-Regular.ttf"
);
GlyphSubstitutionTableReader gsubTableReader = fontProgram.GetGsubTable();
IList<Glyph> glyphs = JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(233), fontProgram.GetGlyphByCode(167
), fontProgram.GetGlyphByCode(207), fontProgram.GetGlyphByCode(149), fontProgram.GetGlyphByCode(207),
fontProgram.GetGlyphByCode(186), fontProgram.GetGlyphByCode(229), fontProgram.GetGlyphByCode(248));
GlyphLine gl = new GlyphLine(glyphs);
GsubLookupType6 lookup = (GsubLookupType6)gsubTableReader.GetLookupTable(57);
NUnit.Framework.Assert.AreEqual(233, gl.Get(0).GetCode());
NUnit.Framework.Assert.IsTrue(lookup.TransformLine(gl));
NUnit.Framework.Assert.AreEqual(234, gl.Get(0).GetCode());
}
[NUnit.Framework.Test]
public virtual void TestSubstitutionNotApplied() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "Padauk-Regular.ttf"
);
GlyphSubstitutionTableReader gsubTableReader = fontProgram.GetGsubTable();
IList<Glyph> glyphs = JavaUtil.ArraysAsList(fontProgram.GetGlyphByCode(233), fontProgram.GetGlyphByCode(167
), fontProgram.GetGlyphByCode(207), fontProgram.GetGlyphByCode(149), fontProgram.GetGlyphByCode(207),
fontProgram.GetGlyphByCode(186), fontProgram.GetGlyphByCode(229), fontProgram.GetGlyphByCode(248));
GlyphLine gl = new GlyphLine(glyphs);
GsubLookupType6 lookup = (GsubLookupType6)gsubTableReader.GetLookupTable(54);
NUnit.Framework.Assert.AreEqual(233, gl.Get(0).GetCode());
NUnit.Framework.Assert.IsFalse(lookup.TransformLine(gl));
NUnit.Framework.Assert.AreEqual(233, gl.Get(0).GetCode());
}
}
}

View File

@@ -0,0 +1,72 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Linq;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("UnitTest")]
public class OpenTypeFontTableReaderTest : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/OpenTypeFontTableReaderTest/";
[NUnit.Framework.Test]
public virtual void TestFetchLangSysByTag() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphSubstitutionTableReader gsub = fontProgram.GetGsubTable();
ScriptRecord mym2 = gsub.GetScriptRecords()[0];
NUnit.Framework.Assert.AreEqual("mym2", mym2.tag);
// default LangSys has no tag
NUnit.Framework.Assert.AreEqual("", gsub.GetLanguageRecord("mym2").tag);
NUnit.Framework.Assert.AreEqual(LanguageTags.SGAW_KAREN, gsub.GetLanguageRecord("mym2", LanguageTags.SGAW_KAREN
).tag);
NUnit.Framework.Assert.AreEqual(LanguageTags.MON, gsub.GetLanguageRecord("mym2", LanguageTags.MON).tag);
NUnit.Framework.Assert.IsNull(gsub.GetLanguageRecord(null));
NUnit.Framework.Assert.IsNull(gsub.GetLanguageRecord("mym3"));
NUnit.Framework.Assert.IsNull(gsub.GetLanguageRecord("mym3", LanguageTags.SGAW_KAREN));
}
[NUnit.Framework.Test]
public virtual void TestGetLookupsArray() {
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + "NotoSansMyanmar-Regular.ttf"
);
GlyphSubstitutionTableReader gsub = fontProgram.GetGsubTable();
FeatureRecord firstRecord = new FeatureRecord();
firstRecord.lookups = new int[] { 5, 2 };
firstRecord.tag = "1";
FeatureRecord secondRecord = new FeatureRecord();
secondRecord.lookups = new int[] { 4, 10 };
secondRecord.tag = "2";
FeatureRecord[] records = new FeatureRecord[] { firstRecord, secondRecord };
int[] lookupsLocations = gsub.GetLookups(firstRecord).Select((record) => record.subTableLocations[0]).ToArray
();
int[] expected = new int[] { 142610, 142436 };
NUnit.Framework.Assert.AreEqual(expected, lookupsLocations);
lookupsLocations = gsub.GetLookups(records).Select((record) => record.subTableLocations[0]).ToArray();
expected = new int[] { 142436, 142538, 142610, 143908 };
NUnit.Framework.Assert.AreEqual(expected, lookupsLocations);
}
}
}

View File

@@ -0,0 +1,64 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using TSpdf.IO.Font;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("IntegrationTest")]
public class OpenTypeGdefTableReaderTest : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/OpenTypeGdefTableReaderTest/";
[NUnit.Framework.Test]
public virtual void TestLookupFlagWithMarkAttachmentTypeAndMarkGlyphWithoutMarkAttachmentClass() {
String fontName = "Padauk-Regular.ttf";
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + fontName);
OpenTypeGdefTableReader gdef = fontProgram.GetGdefTable();
int glyphCode = 207;
NUnit.Framework.Assert.AreEqual(OtfClass.GLYPH_MARK, gdef.GetGlyphClassTable().GetOtfClass(glyphCode));
NUnit.Framework.Assert.IsTrue(gdef.IsSkip(glyphCode, (1 << 8) | OpenTypeGdefTableReader.FLAG_IGNORE_BASE));
}
[NUnit.Framework.Test]
public virtual void TestLookupFlagWithMarkAttachmentTypeAndMarkGlyphWithSameMarkAttachmentClass() {
String fontName = "Padauk-Regular.ttf";
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + fontName);
OpenTypeGdefTableReader gdef = fontProgram.GetGdefTable();
int glyphCode = 151;
NUnit.Framework.Assert.AreEqual(OtfClass.GLYPH_MARK, gdef.GetGlyphClassTable().GetOtfClass(glyphCode));
NUnit.Framework.Assert.IsFalse(gdef.IsSkip(glyphCode, (1 << 8) | OpenTypeGdefTableReader.FLAG_IGNORE_BASE)
);
}
[NUnit.Framework.Test]
public virtual void TestLookupFlagWithMarkAttachmentTypeAndBaseGlyph() {
String fontName = "Padauk-Regular.ttf";
TrueTypeFont fontProgram = (TrueTypeFont)FontProgramFactory.CreateFont(RESOURCE_FOLDER + fontName);
OpenTypeGdefTableReader gdef = fontProgram.GetGdefTable();
int glyphCode = 165;
NUnit.Framework.Assert.AreEqual(OtfClass.GLYPH_BASE, gdef.GetGlyphClassTable().GetOtfClass(glyphCode));
NUnit.Framework.Assert.IsFalse(gdef.IsSkip(glyphCode, (1 << 8)));
}
}
}

View File

@@ -0,0 +1,118 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://TSpdfpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using TSpdf.IO.Source;
using TSpdf.Test;
namespace TSpdf.IO.Font.Otf {
[NUnit.Framework.Category("UnitTest")]
public class OtfReadCommonTest : ExtendedTSpdfTest {
private static readonly String RESOURCE_FOLDER = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf/OtfReadCommonTest/";
private static readonly String RESOURCE_FOLDER_2 = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/otf" + "/GposLookupType7Test/";
[NUnit.Framework.Test]
public virtual void TestReadCoverageFormat1() {
// Based on Example 5 from the specification
// https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2
// 0001 0005 0038 003B 0041 1042 A04A
String path = RESOURCE_FOLDER + "coverage-format-1.bin";
RandomAccessFileOrArray rf = new RandomAccessFileOrArray(new RandomAccessSourceFactory().CreateBestSource(
path));
IList<int> glyphIds = OtfReadCommon.ReadCoverageFormat(rf, 0);
NUnit.Framework.Assert.AreEqual(5, glyphIds.Count);
NUnit.Framework.Assert.AreEqual(0x38, (int)glyphIds[0]);
NUnit.Framework.Assert.AreEqual(0x3B, (int)glyphIds[1]);
NUnit.Framework.Assert.AreEqual(0x41, (int)glyphIds[2]);
NUnit.Framework.Assert.AreEqual(0x1042, (int)glyphIds[3]);
NUnit.Framework.Assert.AreEqual(0xA04A, (int)glyphIds[4]);
}
[NUnit.Framework.Test]
public virtual void TestReadCoverageFormat2() {
// Based on Example 6 from the specification
// https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2
// 0002 0001 A04E A057 0000
String path = RESOURCE_FOLDER + "coverage-format-2.bin";
RandomAccessFileOrArray rf = new RandomAccessFileOrArray(new RandomAccessSourceFactory().CreateBestSource(
path));
IList<int> glyphIds = OtfReadCommon.ReadCoverageFormat(rf, 0);
NUnit.Framework.Assert.AreEqual(10, glyphIds.Count);
NUnit.Framework.Assert.AreEqual(0xA04E, (int)glyphIds[0]);
NUnit.Framework.Assert.AreEqual(0xA057, (int)glyphIds[9]);
}
[NUnit.Framework.Test]
public virtual void TestConversionGlyphToTextSpace() {
OtfReadCommonTest.OpenTypeFontTableReaderTest gposTableReader = new OtfReadCommonTest.OpenTypeFontTableReaderTest
(this, new OtfReadCommonTest.RandomAccesArrayTest(this, null), 0, null, null, 1);
// at 15 we fill up all values
GposValueRecord valueRecord = OtfReadCommon.ReadGposValueRecord(gposTableReader, 15);
NUnit.Framework.Assert.AreEqual(2000, valueRecord.XAdvance);
NUnit.Framework.Assert.AreEqual(2000, valueRecord.XPlacement);
NUnit.Framework.Assert.AreEqual(2000, valueRecord.YAdvance);
NUnit.Framework.Assert.AreEqual(2000, valueRecord.YPlacement);
}
internal class OpenTypeFontTableReaderTest : OpenTypeFontTableReader {
protected internal OpenTypeFontTableReaderTest(OtfReadCommonTest _enclosing, RandomAccessFileOrArray rf, int
tableLocation, OpenTypeGdefTableReader gdef, IDictionary<int, Glyph> indexGlyphMap, int unitsPerEm)
: base(rf, tableLocation, gdef, indexGlyphMap, unitsPerEm) {
this._enclosing = _enclosing;
}
protected internal override OpenTableLookup ReadLookupTable(int lookupType, int lookupFlag, int[] subTableLocations
) {
return null;
}
private readonly OtfReadCommonTest _enclosing;
}
internal class RandomAccesArrayTest : RandomAccessFileOrArray {
/// <summary>Creates a RandomAccessFileOrArray that wraps the specified byte source.</summary>
/// <remarks>
/// Creates a RandomAccessFileOrArray that wraps the specified byte source. The byte source will be closed when
/// this RandomAccessFileOrArray is closed.
/// </remarks>
/// <param name="byteSource">the byte source to wrap</param>
public RandomAccesArrayTest(OtfReadCommonTest _enclosing, IRandomAccessSource byteSource)
: base(byteSource) {
this._enclosing = _enclosing;
}
public override short ReadShort() {
return 2;
}
public override long Skip(long n) {
return 2;
}
private readonly OtfReadCommonTest _enclosing;
}
}
}

View File

@@ -0,0 +1,73 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
namespace TSpdf.IO.Font.Woff2 {
public class SimpleWoff2DecodeTest : Woff2DecodeTest {
private static readonly String sourceFolder = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/woff2/SimpleWoff2Decode/";
private static readonly String targetFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory + "/test/TSpdf/io/font/woff2/SimpleWoff2Decode/";
[NUnit.Framework.OneTimeSetUp]
public static void SetUp() {
if (DEBUG) {
CreateOrClearDestinationFolder(targetFolder);
}
}
[NUnit.Framework.Test]
public virtual void SimpleTtfTest() {
RunTest("NotoSansCJKtc-Regular");
}
[NUnit.Framework.Test]
public virtual void BigTTCTest() {
RunTest("NotoSansCJK-Regular");
}
private void RunTest(String fontName) {
RunTest(fontName, sourceFolder, targetFolder, true);
}
}
}

View File

@@ -0,0 +1,97 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using System.IO;
using TSpdf.IO.Exceptions;
using TSpdf.Test;
namespace TSpdf.IO.Font.Woff2 {
[NUnit.Framework.Category("UnitTest")]
public abstract class Woff2DecodeTest : ExtendedTSpdfTest {
protected internal static bool DEBUG = true;
protected internal virtual bool IsDebug() {
return DEBUG;
}
protected internal void RunTest(String fileName, String sourceFolder, String targetFolder, bool isFontValid
) {
String inFile = fileName + ".woff2";
String outFile = fileName + ".ttf";
String cmpFile = "cmp_" + fileName + ".ttf";
byte[] @in = null;
byte[] @out = null;
byte[] cmp = null;
try {
@in = ReadFile(sourceFolder + inFile);
if (isFontValid) {
NUnit.Framework.Assert.IsTrue(Woff2Converter.IsWoff2Font(@in));
}
@out = Woff2Converter.Convert(@in);
cmp = ReadFile(sourceFolder + cmpFile);
NUnit.Framework.Assert.IsTrue(isFontValid, "Only valid fonts should reach this");
NUnit.Framework.Assert.AreEqual(cmp, @out);
}
catch (FontCompressionException e) {
if (isFontValid) {
throw;
}
}
finally {
if (IsDebug()) {
SaveFile(@in, targetFolder + inFile);
SaveFile(@out, targetFolder + outFile);
SaveFile(cmp, targetFolder + cmpFile);
}
}
}
protected internal void SaveFile(byte[] content, String fileName) {
if (content != null) {
Stream os = new FileStream(fileName, FileMode.Create);
os.Write(content);
os.Dispose();
}
}
}
}

View File

@@ -0,0 +1,95 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using System.IO;
using TSpdf.IO.Font.Woff2;
namespace TSpdf.IO.Font.Woff2.W3c {
public abstract class W3CWoff2DecodeTest : Woff2DecodeTest {
private static readonly String baseSourceFolder = TSpdf.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/TSpdf/io/font/woff2/w3c/";
private static readonly String baseDestinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory
+ "/test/TSpdf/io/font/woff2/w3c/";
protected internal abstract String GetFontName();
protected internal abstract String GetTestInfo();
protected internal abstract bool IsFontValid();
[NUnit.Framework.SetUp]
public virtual void SetUp() {
if (IsDebug()) {
CreateOrClearDestinationFolder(GetDestinationFolder());
}
}
[NUnit.Framework.Test]
public virtual void RunTest() {
System.Console.Out.Write("\n" + GetTestInfo() + "\n");
RunTest(GetFontName(), GetSourceFolder(), GetDestinationFolder(), IsFontValid());
}
private String GetDestinationFolder() {
String localPackage = GetLocalPackage().ToLowerInvariant();
return baseDestinationFolder + localPackage + System.IO.Path.DirectorySeparatorChar + GetTestClassName() +
System.IO.Path.DirectorySeparatorChar;
}
private String GetSourceFolder() {
String localPackage = GetLocalPackage().ToLowerInvariant();
return baseSourceFolder + localPackage + System.IO.Path.DirectorySeparatorChar;
}
private String GetTestClassName() {
return GetType().Name;
}
private String GetLocalPackage() {
String packageName = GetType().Namespace.ToString();
String basePackageName = typeof(W3CWoff2DecodeTest).Namespace.ToString();
return packageName.Substring(basePackageName.Length).Replace('.', System.IO.Path.DirectorySeparatorChar);
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationChecksum001Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-checksum-001";
}
protected internal override String GetTestInfo() {
return "Valid CFF flavored WOFF file, the output file is put through an OFF validator to check the validity of table checksums.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationChecksum002Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-checksum-002";
}
protected internal override String GetTestInfo() {
return "Valid CFF flavored WOFF file, the output file is put through an OFF validator to check the validity of head table checkSumAdjustment.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationLocaFormat001Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-loca-format-001";
}
protected internal override String GetTestInfo() {
return "Valid TTF flavored WOFF with simple composite glyphs where the loca table uses the short format, to check loca reconstruction";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationLocaFormat002Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-loca-format-002";
}
protected internal override String GetTestInfo() {
return "Valid TTF flavored WOFF with simple composite glyphs where the loca table uses the long format, to check loca reconstruction";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff001Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-001";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff002Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-002";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff003Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-003";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff004Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-004";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff005Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-005";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff006Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-006";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff007Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-007";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff008Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-008";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff009Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-009";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff010Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-010";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff011Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-011";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff012Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-012";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff013Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-013";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff014Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-014";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff015Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-015";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff016Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-016";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff017Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-017";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff018Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-018";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff019Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-019";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff020Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-020";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff021Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-021";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff022Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-022";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff023Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-023";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff024Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-024";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff025Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-025";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff026Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-026";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff027Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-027";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff028Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-028";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff029Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-029";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff030Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-030";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff031Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-031";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff032Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-032";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff033Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-033";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff034Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-034";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff035Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-035";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff036Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-036";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff037Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-037";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff038Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-038";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff039Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-039";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff040Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-040";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff041Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-041";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff042Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-042";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff043Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-043";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff044Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-044";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff045Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-045";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff046Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-046";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff047Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-047";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff048Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-048";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff049Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-049";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff050Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-050";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff051Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-051";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff052Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-052";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff053Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-053";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff054Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-054";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff055Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-055";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff056Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-056";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff057Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-057";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff058Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-058";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff059Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-059";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff060Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-060";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff061Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-061";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

View File

@@ -0,0 +1,60 @@
/*
This file is part of the TSpdf (R) project.
Copyright (c) 1987-2023 TSpdf
Authors: TSpdf Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
TSpdf GROUP. TSpdf GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://TSpdfpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using TSpdf.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the TSpdf software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping TSpdf with a closed
source product.
For more information, please contact TSpdf Software Corp. at this
address: sales@TSpdfpdf.com
*/
using System;
using TSpdf.IO.Font.Woff2.W3c;
namespace TSpdf.IO.Font.Woff2.W3c.Decoder {
public class ValidationOff062Test : W3CWoff2DecodeTest {
protected internal override String GetFontName() {
return "validation-off-062";
}
protected internal override String GetTestInfo() {
return "Valid WOFF file from the fire format tests, the decoded file should run through a font validator to confirm the OFF structure validity.";
}
protected internal override bool IsFontValid() {
return true;
}
}
}

Some files were not shown because too many files have changed in this diff Show More