diff --git a/Cargo.toml b/Cargo.toml index e46cb64..99b7170 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ flume = { version = "0.11.0", default-features = false, features = ["async"] } xflags = "0.4.0-pre.2" mimalloc = "0.1.43" nix = { version = "0.29.0", features = ["signal"] } -mupdf = "0.4.4" +mupdf = { version = "0.4.4", default-features = false, features = ["svg", "system-fonts", "img"] } # for tracing with tokio-console console-subscriber = { version = "0.4.0", optional = true } @@ -50,6 +50,8 @@ lto = "fat" default = ["nightly"] nightly = ["ratatui-image/vb64"] tracing = ["tokio/tracing", "dep:console-subscriber"] +epub = ["mupdf/epub"] +cbz = ["mupdf/cbz"] [dev-dependencies] criterion = { version = "0.5.1", features = ["async_tokio"] } diff --git a/src/renderer.rs b/src/renderer.rs index ce8b953..54f858f 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -3,7 +3,7 @@ use std::{thread::sleep, time::Duration}; use crossterm::terminal::WindowSize; use flume::{Receiver, SendError, Sender, TryRecvError}; use itertools::Itertools; -use mupdf::{Colorspace, Document, Matrix, Page, Pixmap, TextPageOptions}; +use mupdf::{Colorspace, Document, Matrix, Page, Pixmap}; use ratatui::layout::Rect; pub enum RenderNotif { @@ -336,8 +336,7 @@ fn render_single_page_to_ctx( let result_rects = search_term .as_ref() .map(|term| { - page.to_text_page(TextPageOptions::all())? - .search(term, u32::MAX) + page.search(term, u32::MAX) }) .transpose()? .unwrap_or_default();