Fill the CJK console and fit the summary under the logo

This commit is contained in:
ZacharyZhang-NY committed 2026-10-12 00:08:30 -04:00
1 parent 2c523afa6f
commit 411acd6d18
2 files changed
+8 -2

No files matched your search

+2 -2
View File
@@ -277,9 +277,9 @@ ocr_screen() {
screendump "$shot"
[[ -s $shot ]] || return 0
magick "$shot" -colorspace gray -negate -resize 150% "$prepped" 2>/dev/null || return 0
# The logo and the black strip under foot throw tesseract off CJK, so Chinese runs also read between them, without spaces.
# The logo throws tesseract off CJK, so Chinese runs also read below it, without spaces.
if [[ $INSTALL_LANGUAGE == "zh" ]]; then
magick "$shot" -gravity north -chop 0x35% -gravity south -chop 0x4% -colorspace gray -negate -resize 150% "$prepped.text.png" 2>/dev/null || return 0
magick "$shot" -gravity north -chop 0x35% -colorspace gray -negate -resize 150% "$prepped.text.png" 2>/dev/null || return 0
{ tesseract "$prepped" - --psm 6 -l "$OCR_LANGS"; tesseract "$prepped.text.png" - --psm 6 -l "$OCR_LANGS"; } 2>/dev/null | sed 'p; s/ //g' || true
else
tesseract "$prepped" - --psm 6 -l "$OCR_LANGS" 2>/dev/null || true
@@ -1,6 +1,8 @@
# The Chinese installer's console: the VT's Tokyo Night palette, with Noto Sans Mono CJK from the offline mirror.
[main]
font=Noto Sans Mono CJK SC:size=13
# Noto's tall default rows leave the summary too few lines for the logo.
line-height=22px
[colors-dark]
background=1a1b26
@@ -21,3 +23,7 @@ bright4=7aa2f7
bright5=bb9af7
bright6=7dcfff
bright7=c0caf5
# cage draws no title bar, and a reserved one leaves a black strip.
[csd]
preferred=none