mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-14 20:29:07 +00:00
Temporary solution to read woff2
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Typography.OpenFont;
|
||||
|
||||
internal static class BinaryReaderExtensions
|
||||
{
|
||||
public static ushort ReadUInt16BE(this BinaryReader reader)
|
||||
{
|
||||
byte[] bytes = reader.ReadBytes(2);
|
||||
return (ushort)((bytes[0] << 8) | bytes[1]);
|
||||
}
|
||||
|
||||
public static uint ReadUInt32BE(this BinaryReader reader)
|
||||
{
|
||||
byte[] bytes = reader.ReadBytes(4);
|
||||
return (uint)((bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user