[reportlab-users] Come on, i am so messed up and i need anything from u

Marius Gedminas reportlab-users@reportlab.com
Thu, 13 Nov 2003 21:28:10 +0200


--cHMo6Wbp1wrKhbfi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 11, 2003 at 01:36:03PM -0800, sarah el-lawindy wrote:
> Marius Gedminas ,
>   thanks for replying. here is the code i wrote:
>=20
>     import reportlab.rl_config
>     reportlab.rl_config.warnOnMissingFontGlyphs =3D 0=20
>     from reportlab.pdfbase import pdfmetrics
>     from reportlab.pdfbase.ttfonts import TTFont
>     from reportlab.pdfgen import canvas
>     c =3D canvas.Canvas('t.pdf')
>     pdfmetrics.registerFont(TTFont('ArabicRiyadh', 'ArabicRiyadh.ttf'))
>     from reportlab.lib.fonts import addMapping
>     addMapping('ArabicRiyadh', 0, 0, 'ArabicRiyadh')
>     c.setFont('ArabicRiyadh', 32)

This line is suspect:

>     TEST =3D u'?????'

This can work only if you use Python 2.3 and have an appropriate
character coding specified near the top of the file.

As a first step, could you replace real characters with Unicode escapes,
e.g.

      TEST =3D u'\u1234\u5678\u9ABC'

Find out the real Unicode numbers for the characters you use; I cannot
do that because I only see ASCII question mark characters in your
email.

If it works, you can try

      TEST =3D unicode('?????', 'encoding-used-for-arabic-text')

Substitute the appropriate encoding up there, I do not know which one is
usually used for Arabic.

Marius Gedminas
--=20
I am right now in the process of reading the Xft source code (the suspense =
near
the end of Chapter 7 is unbearable) [...]
	-- Juliusz Chroboczek

--cHMo6Wbp1wrKhbfi
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/s9tKkVdEXeem148RAk1jAJ99/QHEguy2BkLnKCy62ohX3JPBjQCePswn
aA6MTXl63X9Uj9BfS3Bvcmo=
=26oy
-----END PGP SIGNATURE-----

--cHMo6Wbp1wrKhbfi--