Skip to content
Merged
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
32 changes: 24 additions & 8 deletions filetype/types/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ def match(self, buf):
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[4] == 0x00 and
buf[5] == 0x01 and
buf[6] == 0x00 and
buf[7] == 0x00) or
(buf[4] == 0x4F and
buf[5] == 0x54 and
buf[6] == 0x54 and
buf[7] == 0x4F) or
(buf[4] == 0x74 and
buf[5] == 0x72 and
buf[6] == 0x75 and
buf[7] == 0x65)))


class Woff2(Type):
Expand All @@ -49,10 +57,18 @@ def match(self, buf):
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[4] == 0x00 and
buf[5] == 0x01 and
buf[6] == 0x00 and
buf[7] == 0x00) or
(buf[4] == 0x4F and
buf[5] == 0x54 and
buf[6] == 0x54 and
buf[7] == 0x4F) or
(buf[4] == 0x74 and
buf[5] == 0x72 and
buf[6] == 0x75 and
buf[7] == 0x65)))


class Ttf(Type):
Expand Down