[reportlab-users] CJK fonts
Andy Robinson
andy at reportlab.com
Sun Jan 4 04:01:59 EST 2015
On 4 January 2015 at 05:18, Glenn Linderman <v+python at g.nevcal.com> wrote:
> But this user doesn't always know. Now I could make an assumption about
> certain character ranges being in certain fonts, but is there a way I can
> ask reportlab "Does this character exist in this font?"
Give us some time to remind ourselves how it works - maybe another 3.5
years ;-) Remember that we don't draw the text, Adobe Reader (or
whatever you use instead) does, and it's quite happy being fed IDs of
glyphs which don't exist and/or they may introduce font substitution
mechanisms of their own at any time. So while it's useful to know
your font might lack a glyph, it doesn't mean it won't get displayed
somehow.
There is no convenient high-level API but we ought to add one. Robin,
how feasible would that be?
On this front, I note that Just van Rossum's fonttools package is
being updated; Behdad Esfahdod, who's very well known for his work on
rendering Persian text and now works for Google, has been bringing it
up to date:
https://github.com/behdad/fonttools/
This is not what we use for speed reasons but it's probably the right
tool if you want to query and understand what's in a font.
--
Andy Robinson
More information about the reportlab-users
mailing list