A desktop application built with PySide6 and PyMuPDF, providing a Bionic Reading experience for PDF and text files. This app allows you to adjust bold ratio, letter spacing, line spacing, font family, and theme to enhance reading speed and reduce visual strain.
It also persists user settings in a JSON file, so each time you start the application, your last used preferences—like font size, theme (dark/light mode), and spacing—are all loaded automatically.
-
Load PDF or TXT:
- Automatically converts PDF text (via PyMuPDF) or reads
.txtfiles and displays them in the editor.
- Automatically converts PDF text (via PyMuPDF) or reads
-
Bionic Reading:
- Uses regex to split words from punctuation and bolds the first part of each word, allowing faster word recognition.
-
Adjustable Reading Settings:
- Bold ratio: How much of each word is bolded (e.g., 40%).
- Font size: Ranging from 8 to 48pt.
- Letter spacing & line spacing: Increase or decrease spacing for better readability.
- Font family: Choose any system font or load your own.
-
Dark/Light Themes:
- Toggle theme with a checkbox, instantly switching between a dark mode and a light mode.
-
Refresh Button:
- Refresh the current text with the latest Bionic Reading settings.
-
Export:
- Export the processed text to HTML or PDF.
-
JSON-based Configuration:
- Automatically loads your last used settings from
config.jsonon startup. - Saves updated settings whenever you change them.
- Automatically loads your last used settings from
- Python 3.7+ (recommended)
- Installed via
pip:PySide6for the GUIPyMuPDFfor PDF extractionweasyprintfor exporting to PDF
- (Optional) A local copy of
MiSans-Regular.otfto load as the default UI font.- You can use any other font if not available.
Example:
pip install PySide6 PyMuPDF weasyprint fitz - Clone or download this repository.
- Place your custom font (optional) like
MiSans-Regular.otfin the same directory if needed. - Install dependencies (PySide6, PyMuPDF, weasyprint).
- Run the Python script:
python bionic_reading_app.py
- On first run, the app creates (or reads) a
config.jsonfile in the same directory, storing your preferences.
-
Load a File
- Click “加载 PDF / TXT” to open a
.pdfor.txtfile. - The text will appear in the main editor area.
- Click “加载 PDF / TXT” to open a
-
Adjust Bionic Reading Parameters
- 加粗比例 (Bold Ratio): Move the slider to decide how much of each word is bolded (10–90%).
- 字体大小 (Font Size): Adjust the spin box to choose a point size.
- 字距 (Letter Spacing) & 行距 (Line Spacing): Tweak spacing for better legibility.
- 选择字体 (Font Selector): Pick a system font from the dropdown.
-
Toggle Dark Mode
- Check “深色模式” to switch to dark theme, or uncheck for light theme.
-
Refresh Text
- Click “刷新” to re-apply Bionic Reading to the current editor text with the updated settings.
-
Export
- Click “导出为 HTML 或 PDF” to save the processed text.
- Choose a
.htmlor.pdffile extension in the file dialog.
-
Automatic Configuration
- Any time you adjust a setting (e.g., bold ratio, font size, or theme), the app saves it to
config.json. - On the next startup, the app will load these preferences automatically.
- Any time you adjust a setting (e.g., bold ratio, font size, or theme), the app saves it to
.
├── BionicReader.py # Main application script
├── MiSans-Regular.otf # Optional custom font
└── README.md # This README
Feel free to open issues or submit pull requests if you have improvements, bug fixes, or new features to propose.
- Fork/clone this repo.
- Create a new feature branch.
- Commit and push changes to your repo.
- Open a pull request.
This project is licensed under MIT License. You’re free to use, modify, and distribute it for personal or commercial use.
Enjoy faster, clearer reading with Bionic Reading App!