Skip to content

Commit

Permalink
cleanup and add missing dep
Browse files Browse the repository at this point in the history
  • Loading branch information
iammosespaulr committed Dec 30, 2024
1 parent 37e064d commit ea0b25e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 6 deletions.
4 changes: 0 additions & 4 deletions marker/providers/pdf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import atexit
import ctypes
import io
import os
import re
import tempfile
from typing import List, Set, Tuple, Union
Expand Down Expand Up @@ -341,7 +340,6 @@ def parse_font_data(self, page_id, font_name: str, raw_data: bytes) -> Union[TTF

return T1Font(tmpfile.name)
except Exception as e:
print(font_name, e)
return None

if raw_data.startswith(b'\x01\x00\x04'):
Expand All @@ -351,8 +349,6 @@ def parse_font_data(self, page_id, font_name: str, raw_data: bytes) -> Union[TTF
fontSet[0].Encoding, fontSet[0].Notice
return fontSet
except Exception as e:
print(font_name, e)
return None

print(self.filepath, page_id, f"Unknown font format for {font_name} with raw data: {bytes(raw_data)[:100]}")
return None
79 changes: 77 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ markdownify = "^0.13.1"
click = "^8.1.7"
google-generativeai = "^0.8.3"
markdown2 = "^2.5.2"
fonttools = "^4.55.3"

[tool.poetry.group.dev.dependencies]
jupyter = "^1.0.0"
Expand Down

0 comments on commit ea0b25e

Please sign in to comment.