remove useless checksum check for truetype font processing
Some checks failed
Build and test / build (push) Has been cancelled
Run Integration Tests / build (push) Has been cancelled

This commit is contained in:
Eliot Jones 2024-09-29 17:06:08 +01:00 committed by BobLd
parent f6566d6007
commit eb9a191e0d

View File

@ -1,7 +1,6 @@
namespace UglyToad.PdfPig.Fonts.TrueType.Parser
{
using System;
using System.Diagnostics;
using Tables;
internal static class TableParser
@ -14,19 +13,7 @@
public static T Parse<T>(TrueTypeHeaderTable table, TrueTypeDataBytes data, TableRegister.Builder register) where T : ITrueTypeTable
{
// checksum https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html
uint sum = 0;
var nLongs = (table.Length + 3) / 4;
data.Seek(table.Offset);
while (nLongs-- > 0)
{
sum += (uint)data.ReadSignedInt();
}
if (sum != table.CheckSum)
{
Debug.WriteLine("Table with invalid checksum found in TrueType font file.");
}
if (typeof(T) == typeof(CMapTable))
{