[reportlab-users] Using Symbola or equivalent Unicode6 font with Reportlab

Mathieu Comandon strycore at gmail.com
Fri Feb 21 12:12:59 EST 2014


Hi Robin,
Thanks a lot for your reply!

On Fri, Feb 21, 2014 at 12:27 PM, Robin Becker <robin at reportlab.com> wrote:


> Hi Mathieu,

>

>

> On 20/02/2014 17:09, Mathieu Comandon wrote:

>

>> Hi,

>>

>> I'm trying to generate a set of "superfonts" based on Symbola.ttf (

>> http://users.teilar.gr/~g1951d/ ). The plan is to merge the regular fonts

>> we use in our application with Symbola.ttf in order to allow printing

>> almost any possible glyph.

>>

>> I have looked for such a font without success.

>

> I have tried some things with FontForge, it's quite easy to merge several

fonts together and to convert them into various formats.

I tried generating a PDF from sources containing Unicode6 characters or

> non-latin alphabets (Japanese, Chinese, Arabic, Hebrew). Neither the

> composite Times + Symbola I created on FontForge nor the plain Symbola

> displayed the non Latin characters.

>

> It's not clear exactly how you are doing the conversion. Are you creating

> a combined TTF? I have used MS Mincho & MS Gothic on windows and they are

> certainly able to display both latin & CJK / Arabic / etc etc. However, I'm

> not sure what parts of unicode you're referring to when you mention unicode

> 6.

>

> As I understand it there are some issues in python 2.x unicode related to

> going outside the standard plane, but I'm not sure if that's what you mean.

>

> When I'm mentioning Unicode 6 characters, I'm mainly refering to "emojis"

(example: http://strycore.com/unicode6 ). For example, in our product we
generate PDF documents from Instagram feeds and Instagram users tend to use
those.
Having the Unicode 6 is not really a huge requirement, if i manage to get
alternative alphabets printed correctly, that will be a huge improvement !

I tried running your code snippet using the ms-mincho fonts (but running on
Linux) and I got the following error:

raise RenderPMError("Can't setFont(%s) missing the T1
files?\nOriginally %s: %s" % (fontName,s1,s2))
reportlab.graphics.renderPM.RenderPMError: Can't setFont(ms-mincho)
missing the T1 files?
Originally <type 'exceptions.AttributeError'>: TTEncoding instance has
no attribute 'vector'

I will try debugging this and using other fonts on monday. Also, we are
using Platypus flowables to generate the contents, I hope it doesn't affect
the font rendering, I'll try converting your snippet using Platypus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140221/40b52eb0/attachment.html>


More information about the reportlab-users mailing list