Creating a font that captures the essence of Ming Dynasty woodblock printed books is no small feat. Enter the Qiji font, a project that harnesses semi-automatic computer vision and OCR to create an open-source typeface that is both an artistic and technological endeavor. In this blog, we will walk you through the steps involved in creating and using this unique Ming typeface.
Understanding the Qiji Font
The Qiji font is inspired by the rich heritage of Ming dynasty typography, bearing a historical significance as it is crafted from the pages of ancient woodblock printed books. Here’s a quick overview:
- Type: Ming Typeface
- Source: Woodblock printed books from the Ming Dynasty
- Development: Utilizes semi-automatic computer vision and OCR techniques
- Status: Open source and a work in progress
- Created in Honor of: A 16th-century printer
- Usage: Designed for use with wenyan-lang, a Classical Chinese programming language
Getting Started: Steps to Create the Qiji Font
The creation of the Qiji font involves a systematic workflow:
- Step I: Download high-resolution PDFs from shuge.org and convert them into images.
- Step II: Overlay a grid on each page to create bounding boxes for characters.
- Step III: Generate a low-poly mask for each character and save as thumbnails using OpenCV.
- Step IV: Use neural-net OCR to recognize characters from thumbnails.
- Step V: Manually assess the OCR output to select the best versions of each character.
- Step VI: Create a fine raster rendering of each character.
- Step VII: Employ raster-to-vector tracing software potrace and the FontForge Python library to generate the final font file.
Explaining the Code Workflow
To better understand the complexities of this process, think of it like creating a sculpture from a block of marble:
Step I: You begin with a large block of marble (PDF) and carefully slice it into manageable pieces (images).
Step II: Next, you outline the areas where you see potential sculptures (bounding boxes).
Step III: You remove excess marble to see the shapes clearly (creating low-poly masks).
Step IV: You take each piece of marble and examine it under a light to highlight the details (OCR).
Step V: You assess each piece to decide which ones best represent your vision (manually judging OCR output).
Step VI: Finally, you carefully finish each piece, ensuring they’re balanced and aesthetically pleasing (fine raster rendering).
Step VII: Lastly, you transform your sculptures into elegant, usable pieces of art that others can appreciate (raster-to-vector tracing).
Troubleshooting Common Issues
As with any creative endeavor, challenges may arise. Here are some troubleshooting tips:
- If you notice inconsistent character sizes, ensure to adjust the grid layout during Step II.
- For OCR recognition issues, explore using alternative neural networks that may provide better accuracy.
- If your software encounters errors, check the installation of your dependencies—especially with OpenCV and FontForge.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
Creating the Qiji font is an intricate process requiring dedication and precision. Each step contributes to the beauty of the final product, echoing the artistry of its Ming dynasty roots. Whether you are a developer interested in the technical side or a lover of history and art, engaging with this project can be immensely rewarding.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

