Incorrect output from demo_text_path.py on mac

Well, dvi files only contains the name of the tex font. What textpath
does is to pick up corresponding type I font and convert them to path
using the freetype library (as far as I know, this is what dvipng and
matplotlib pdf backend does). So, my guess is that, textpath is
somehow picking up wrong fonts, or wrong glyphs.

The code works fine at least in my mac os X tiger w/ texlive 2008, and
in ubuntu with texlive 2007.
As I don't have any access to mac os X 10.6, it would be hard to track
down what is wrong. Here are a few more test I wish you to run.

*) Check if pdf backend produces a correct result. Do not use textpath
example, but simply use text command with usetex=True, and see if the
pdf output is okay. FWIW, the textpath code is largely borrowed from
the pdfbackend.

*) Run the attached code, and post the terminal output. The output is
basically the name of the tex font and the name of the substituted
type1 font, etc. For your reference, here is my output.

texname, type1name, enc, char_id
cmex10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmex10.pfb
None CMEX10-34
cmsy10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmsy10.pfb
None CMSY10-49
cmex10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmsy10.pfb
None CMEX10-88
cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmmi12.pfb
None CMMI12-110
cmr17 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMR17-61
cmr17 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMR17-49
cmsy10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMSY10-0
cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMMI12-101
cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMMI12-105
cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMMI12-25
cmr17 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMR17-50
cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMMI12-110
cmex10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb
None CMEX10-35
pncr8r /usr/local/texlive/2008/texmf-dist/fonts/type1/urw/ncntrsbk/uncr8a.pfb
/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc
Century%20Schoolbook%20L%20Roman-232

Regards,

-JJ

demo_text_path2.py (4.85 KB)

···

On Tue, Nov 3, 2009 at 4:23 AM, tcb <thecolourblue+m@...149...> wrote:

and if I convert the dvi with dvipng, it all seems in order
(demo_text_path_tex.png). I haven't looked closely into how the textpath
stuff works, but I thought it would read the dvi as a path, and display that
on the screen- if that is correct then I dont know how it ends up displaying
a different symbol from what is in the dvi file.

Hi,

Yes, with the pdfbackend, and using just the plain text code (with usetex=True), the correct output is produced (for Text but not TextPath). I modified your demo_text_path2.py to draw with text, and attached the output.

This is the terminal output from running your attached code. I am using the texlive 2009 distribution- which appears to be working fine, I have not noticed any problems at all. What is the difference between the bluesky and amsfonts?

texname, type1name, enc, char_id
cmex10 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb None CMEX10-34
cmsy10 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb None CMSY10-49
cmex10 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb None CMEX10-88
cmmi12 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb None CMMI12-110
cmr17 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMR17-61
cmr17 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMR17-49
cmsy10 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMSY10-0
cmmi12 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMMI12-101
cmmi12 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMMI12-105
cmmi12 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMMI12-25
cmr17 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMR17-50
cmmi12 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMMI12-110
cmex10 /usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb None CMEX10-35
phvr8r /usr/local/texlive/2009/texmf-dist/fonts/type1/urw/helvetic/uhvr8a.pfb /usr/local/texlive/2009/texmf-dist/fonts/enc/dvips/base/8r.enc Nimbus%20Sans%20L%20Regular-2

regards,

demo_text_path2.py.pdf (208 KB)

demo_text_path2.diff (1.33 KB)

···

On Tue, Nov 3, 2009 at 2:50 PM, Jae-Joon Lee <lee.j.joon@…149…> wrote:

On Tue, Nov 3, 2009 at 4:23 AM, tcb <thecolourblue+m@…149…> wrote:

and if I convert the dvi with dvipng, it all seems in order

(demo_text_path_tex.png). I haven’t looked closely into how the textpath

stuff works, but I thought it would read the dvi as a path, and display that

on the screen- if that is correct then I dont know how it ends up displaying

a different symbol from what is in the dvi file.

Well, dvi files only contains the name of the tex font. What textpath

does is to pick up corresponding type I font and convert them to path

using the freetype library (as far as I know, this is what dvipng and

matplotlib pdf backend does). So, my guess is that, textpath is

somehow picking up wrong fonts, or wrong glyphs.

The code works fine at least in my mac os X tiger w/ texlive 2008, and

in ubuntu with texlive 2007.

As I don’t have any access to mac os X 10.6, it would be hard to track

down what is wrong. Here are a few more test I wish you to run.

*) Check if pdf backend produces a correct result. Do not use textpath

example, but simply use text command with usetex=True, and see if the

pdf output is okay. FWIW, the textpath code is largely borrowed from

the pdfbackend.

*) Run the attached code, and post the terminal output. The output is

basically the name of the tex font and the name of the substituted

type1 font, etc. For your reference, here is my output.

texname, type1name, enc, char_id

cmex10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmex10.pfb

None CMEX10-34

cmsy10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmsy10.pfb

None CMSY10-49

cmex10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmsy10.pfb

None CMEX10-88

cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmmi12.pfb

None CMMI12-110

cmr17 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMR17-61

cmr17 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMR17-49

cmsy10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMSY10-0

cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMMI12-101

cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMMI12-105

cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMMI12-25

cmr17 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMR17-50

cmmi12 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMMI12-110

cmex10 /usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb

None CMEX10-35

pncr8r /usr/local/texlive/2008/texmf-dist/fonts/type1/urw/ncntrsbk/uncr8a.pfb

/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc

Century%20Schoolbook%20L%20Roman-232

Regards,

-JJ