Ely Office: six offline-first desktop apps in Rust and GPUI
ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git), ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
This commit is contained in:
817 files changed
+143101
No files matched your search
@@ -0,0 +1,29 @@
|
||||
OCR fails when a requested language does not load.
|
||||
|
||||
Tesseract initialises with the languages it can load and drops the
|
||||
rest; a page asked for in eng+chi_sim was read in English alone and
|
||||
reported as a success (Ely OCR).
|
||||
|
||||
--- a/source/fitz/tessocr.cpp 2026-10-06 16:20:56
|
||||
+++ b/source/fitz/tessocr.cpp 2026-10-06 16:20:56
|
||||
@@ -144,6 +144,20 @@
|
||||
delete api;
|
||||
fz_clear_leptonica_mem(ctx);
|
||||
fz_throw(ctx, FZ_ERROR_LIBRARY, "Tesseract language initialisation failed");
|
||||
+ }
|
||||
+
|
||||
+ {
|
||||
+ std::vector<std::string> loaded;
|
||||
+ int wanted = 1;
|
||||
+ for (const char *s = language; *s; s++)
|
||||
+ wanted += *s == '+';
|
||||
+ api->GetLoadedLanguagesAsVector(&loaded);
|
||||
+ if ((int)loaded.size() < wanted)
|
||||
+ {
|
||||
+ delete api;
|
||||
+ fz_clear_leptonica_mem(ctx);
|
||||
+ fz_throw(ctx, FZ_ERROR_LIBRARY, "Tesseract loaded %d of %d languages in %s", (int)loaded.size(), wanted, language);
|
||||
+ }
|
||||
}
|
||||
|
||||
n = fz_count_options(ctx, options);
|
||||
Reference in new issue
Block a user