Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions filetype/types/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ def __init__(self):
)

def match(self, buf):
return (len(buf) > 7 and
return (len(buf) > 3 and
buf[0] == 0x77 and
buf[1] == 0x4F and
buf[2] == 0x46 and
buf[3] == 0x46 and
buf[4] == 0x00 and
buf[5] == 0x01 and
buf[6] == 0x00 and
buf[7] == 0x00)
buf[3] == 0x46)


class Woff2(Type):
Expand All @@ -44,15 +40,11 @@ def __init__(self):
)

def match(self, buf):
return (len(buf) > 7 and
return (len(buf) > 3 and
buf[0] == 0x77 and
buf[1] == 0x4F and
buf[2] == 0x46 and
buf[3] == 0x32 and
buf[4] == 0x00 and
buf[5] == 0x01 and
buf[6] == 0x00 and
buf[7] == 0x00)
buf[3] == 0x32)


class Ttf(Type):
Expand Down