You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### 4.2.3 Specifying the Local Font File Path via Environment Variables
1850
+
Before initializing the production line object, you can set an environment variable to specify the local font file path. This enables the production line to use the specified font when saving the annotated result image via the `save_to_img` method.
1851
+
This approach is convenient for offline deployment as it eliminates the need to download font files over the network and simplifies file management. **It is essential to ensure that the specified font file exists!****
1852
+
1853
+
Suppose the font file `simfang.ttf` is stored in the `fonts` folder in the current directory.
1854
+
1855
+
Python script:
1856
+
1857
+
```python
1858
+
import os
1859
+
1860
+
# Specify the location of the font file before initializing the production line.
0 commit comments