Docs: Add font conversion guide and link in user guide

This commit is contained in:
Antigravity Agent 2026-01-19 23:40:29 -05:00
parent 7a38bd55f4
commit 532f8ea07a
2 changed files with 43 additions and 0 deletions

37
FONT_CONVERSION.md Normal file
View File

@ -0,0 +1,37 @@
# Font Conversion Guide
To use custom fonts with the CrossPoint Reader, you must convert standard `.ttf` or `.otf` font files into the specific `.epdfont` binary format used by the compiled firmware.
We use a Python script located at `lib/EpdFont/scripts/fontconvert.py`.
## Requirements
- Python 3
- `freetype-py` library (`pip install freetype-py`)
## Usage
Run the script from the project root:
```bash
python3 lib/EpdFont/scripts/fontconvert.py --binary [Family-Style-Size] [Size] [PathToFont]
```
### Arguments
1. `name`: The output filename (without extension). **Convention:** `Family-Style-Size` (e.g. `Bookerly-Regular-12`).
2. `size`: The integer point size (e.g. `12`).
3. `fontstack`: Path to the source font file (e.g. `fonts/Bookerly-Regular.ttf`).
4. `--binary`: **REQUIRED**. Flags the script to output the `.epdfont` binary instead of a C header.
### Example
To convert `Bookerly-Regular.ttf` to a size 12 font:
```bash
python3 lib/EpdFont/scripts/fontconvert.py --binary Bookerly-Regular-12 12 fonts/Bookerly-Regular.ttf
```
This will generate `Bookerly-Regular-12.epdfont` in your current directory.
## Installing on Device
1. Rename the file if necessary to match the pattern: `Family-Style-Size.epdfont`.
2. Copy the `.epdfont` file to the `/fonts` directory on your SD card.

View File

@ -128,6 +128,12 @@ You can customize the sleep screen by placing custom images in specific location
> - Use uncompressed BMP files with 24-bit color depth > - Use uncompressed BMP files with 24-bit color depth
> - Use a resolution of 480x800 pixels to match the device's screen resolution. > - Use a resolution of 480x800 pixels to match the device's screen resolution.
### 3.7 Custom Fonts
You can load your own custom fonts onto the device by converting them to the required `.epdfont` format.
See the **[Font Conversion Guide](FONT_CONVERSION.md)** for detailed instructions on how to use the conversion tool.
--- ---
## 4. Reading Mode ## 4. Reading Mode