ex510 commited on
Commit
801e69e
·
verified ·
1 Parent(s): f24aaa3

Delete fix_fonts.py

Browse files
Files changed (1) hide show
  1. fix_fonts.py +0 -26
fix_fonts.py DELETED
@@ -1,26 +0,0 @@
1
- import os
2
- import glob
3
- from test_font import test_arabic_render
4
-
5
- def cleanup_fonts():
6
- # List of potentially corrupt font files
7
- fonts_to_check = ["Tajawal-Bold.ttf", "Cairo-Bold.ttf", "NotoSansArabic-Bold.ttf", "Rubik-Bold.ttf", "Montserrat-Bold.ttf"]
8
-
9
- print("🧹 Cleaning up potentially corrupt font files...")
10
- for font in fonts_to_check:
11
- if os.path.exists(font):
12
- try:
13
- size = os.path.getsize(font)
14
- # Delete if small (likely HTML error page) or just force refresh
15
- print(f" found {font} ({size} bytes) -> DELETING to force re-download.")
16
- os.remove(font)
17
- except Exception as e:
18
- print(f" ❌ Could not delete {font}: {e}")
19
- else:
20
- print(f" {font} not found (good).")
21
-
22
- print("\n🔄 Re-running font test (this will trigger new downloads)...")
23
- test_arabic_render()
24
-
25
- if __name__ == "__main__":
26
- cleanup_fonts()