Commit 2b9712d0 for tesseract
commit 2b9712d094d1f4398341f2cd4a165faee5cb5084
Author: Stefan Weil <sw@weilnetz.de>
Date: Fri Nov 13 23:51:33 2026 +0100
Fix download of ae_Arab.ttf for the unit tests (#4687)
"make check" downloads the fonts which some unit tests need. The URL
for ae_Arab.ttf returns HTTP 404 since the master branch of the Debian
repository was changed to build its fonts from source (2026-09-09).
curl was run without --fail, so the HTML error page was saved as
ae_Arab.ttf. pango_font_info_test then failed, because the font "Arab"
was missing in the list of available fonts, and the download was not
tried again as the file existed.
Get the font from the tag debian/2.1-7, which is the last one with
that file. Also let curl fail on HTTP errors for all font downloads,
so an error page is no longer stored as a font.
Assisted-by: OpenCode / Claude Fable 5.2 (Anthropic)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
diff --git a/Makefile.am b/Makefile.am
index 25eba524..4dd8d6fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1707,32 +1707,32 @@ $(LANGDATA_DIR) $(TESSDATA_DIR) $(TESSDATA_BEST_DIR) $(TESSDATA_FAST_DIR):
@exit 1
$(TESTING_DIR)/Arial_Bold_Italic.ttf:
- curl -sSL -o Arial.exe https://sourceforge.net/projects/corefonts/files/the%20fonts/final/arial32.exe/download
+ curl -fsSL -o Arial.exe https://sourceforge.net/projects/corefonts/files/the%20fonts/final/arial32.exe/download
cabextract -F Arialbi.TTF -q Arial.exe
rm Arial.exe
mv Arialbi.TTF $@
$(TESTING_DIR)/DejaVuSans-ExtraLight.ttf:
- curl -sSL https://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2 | \
+ curl -fsSL https://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2 | \
tar -xjO dejavu-fonts-ttf-2.37/ttf/DejaVuSans-ExtraLight.ttf >$@
$(TESTING_DIR)/Lohit-Hindi.ttf:
- curl -sSL https://raw.githubusercontent.com/pratul/packageofpractices/master/assets/fonts/Lohit-Hindi.ttf -o $@
+ curl -fsSL https://raw.githubusercontent.com/pratul/packageofpractices/master/assets/fonts/Lohit-Hindi.ttf -o $@
$(TESTING_DIR)/Times_New_Roman.ttf:
- curl -sSL -o Times.exe https://sourceforge.net/projects/corefonts/files/the%20fonts/final/times32.exe/download
+ curl -fsSL -o Times.exe https://sourceforge.net/projects/corefonts/files/the%20fonts/final/times32.exe/download
cabextract -F Times.TTF -q Times.exe
rm Times.exe
mv Times.TTF $@
$(TESTING_DIR)/UnBatang.ttf:
- curl -sSL -o $@ https://salsa.debian.org/fonts-team/fonts-unfonts-core/-/raw/master/UnBatang.ttf
+ curl -fsSL -o $@ https://salsa.debian.org/fonts-team/fonts-unfonts-core/-/raw/master/UnBatang.ttf
$(TESTING_DIR)/Verdana.ttf:
- curl -sSL -o Verdana.exe https://sourceforge.net/projects/corefonts/files/the%20fonts/final/verdan32.exe/download
+ curl -fsSL -o Verdana.exe https://sourceforge.net/projects/corefonts/files/the%20fonts/final/verdan32.exe/download
cabextract -F Verdana.TTF -q Verdana.exe
rm Verdana.exe
mv Verdana.TTF $@
$(TESTING_DIR)/ae_Arab.ttf:
- curl -sSL -o $@ https://salsa.debian.org/fonts-team/fonts-arabeyes/-/raw/master/ae_Arab.ttf
+ curl -fsSL -o $@ https://salsa.debian.org/fonts-team/fonts-arabeyes/-/raw/debian/2.1-7/ae_Arab.ttf