Skip to content

Commit ded1f15

Browse files
docs: improve installation guide, and add troubleshoot section
1 parent 48f4cd6 commit ded1f15

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,19 @@ A powerful Python library for creating complex visual compositions and beautiful
2424

2525
## Installation
2626

27+
It is highly recommended to install PicTex in a virtual environment to avoid conflicts with system-wide packages and potential permission issues on certain operating systems like Windows.
28+
2729
```bash
30+
# 1. Create and activate a virtual environment
31+
python -m venv .venv
32+
33+
# On Windows:
34+
.\.venv\Scripts\activate
35+
36+
# On macOS/Linux:
37+
# source .venv/bin/activate
38+
39+
# 2. Install PicTex into the active environment
2840
pip install pictex
2941
```
3042

@@ -119,6 +131,37 @@ For a complete guide on all features, from layout and the box model to advanced
119131
- [**Styling Guide: Colors & Gradients**](https://pictex.readthedocs.io/en/latest/colors/)
120132
- [**Styling Guide: Text & Fonts**](https://pictex.readthedocs.io/en/latest/text/)
121133

134+
## Troubleshooting
135+
136+
### Text rendering issues on Windows (missing ligatures, incorrect text shaping)
137+
138+
**Symptom:** You may notice that advanced typography features, such as font ligatures or complex scripts, do not render correctly on Windows.
139+
140+
**Cause:** This is typically caused by an incomplete installation of the `skia-python` dependency, where a crucial data file (`icudtl.dat`) required for advanced text shaping is missing. This often happens when `pip` installs the package in a user-level directory without administrator privileges.
141+
142+
**Solutions:**
143+
144+
1. **(Recommended) Reinstall in a Virtual Environment:** This is the safest and most reliable method to ensure a correct installation. A virtual environment does not require administrator rights and provides a clean slate.
145+
146+
```bash
147+
# If already installed, uninstall first
148+
pip uninstall pictex skia-python
149+
150+
# Create and activate a new virtual environment (see installation section)
151+
python -m venv .venv
152+
.\.venv\Scripts\activate
153+
154+
# Install PicTex again
155+
pip install pictex
156+
```
157+
158+
2. **Reinstall with Administrator Privileges:** If you cannot use a virtual environment, running the installation from a terminal with administrator rights will allow `pip` to install the package correctly.
159+
160+
```bash
161+
# Open PowerShell or Command Prompt as an Administrator
162+
pip install --force-reinstall pictex
163+
```
164+
122165
## Contributing
123166

124167
Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/francozanardi/pictex/issues).

0 commit comments

Comments
 (0)