|
From: | Kane O'Donnell |
Subject: | [ft] Fast wordcloud using FreeType? |
Date: | Sat, 12 Sep 2015 17:53:13 +1200 |
>From what I've read, FreeType will allow me to handle 1. and 2. relatively easily. However, I'm not sure about 3. While it's easy to, for example, save the position/rotation of all placed words, and then naively convert that to e.g. SVG, I'm not sure whether e.g. font size 32 means the same in FreeType as it will in SVG, and hence whether or not my non-overlapping word layout will be preserved. I guess that's my key question.
More than happy to get general feedback on such a project, including other suitable libraries -- though a key requirement is for it to be as fast as possible.
Kane
PS -- I've done something in Python but there was a messy and imperfect hack to convert from PIL (bitmap) to matplotlib (PDF), which basically failed point 3 as outlined above. I've also done this in Java, and I managed to find two libraries which did the job well. However, now I'm keen to learn a new language, and I enjoy using this as an example.
PPS -- I'm aware there are other methods (quad-tree + bounding boxes), though they're not as simple as the "does this pixel overlap that one" approach, and sometimes less functional and performant.
[Prev in Thread] | Current Thread | [Next in Thread] |