Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134906 - app-text/ptex 3.1.5-r1 - dvips cannot render Japanese fonts
Summary: app-text/ptex 3.1.5-r1 - dvips cannot render Japanese fonts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Mamoru KOMACHI (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-30 04:39 UTC by Pedro Jose Marron
Modified: 2006-06-02 07:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tex file in euc-jp encoding with latex commands, english and japanese characters (Vocabulary.tex,8.58 KB, application/x-tex)
2006-05-30 04:58 UTC, Pedro Jose Marron
Details
generated dvi file after platex Vocabulary.tex (Vocabulary.dvi,11.54 KB, application/x-dvi)
2006-05-30 05:01 UTC, Pedro Jose Marron
Details
A .dvi file which was generated from .tex file on the above. (Vocabulary.dvi,11.54 KB, application/octet-stream)
2006-05-30 17:38 UTC, hiyuh
Details
A .pdf file which was generated from .tex file on the above. (Vocabulary.pdf,25.41 KB, application/octet-stream)
2006-05-30 17:39 UTC, hiyuh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Jose Marron 2006-05-30 04:39:27 UTC
Hi all,

I have been trying to generate a poscript file with Japanese fonts using app-text/ptex 3.1.5-r1. In order to do that, I issue the following commands:

platex file.tex
dvips -o file.ps file.dvi

This worked at some point (about a year ago) but it is now broken. The dvi file generated by platex has the right fonts and I can read the Japanese and English text in the document, but as soon as I try to use dvips, I get garbage only for the japanese characters.

% dvips --version

dvips(k) 5.92b
kpathsea version 3.4.5
Copyright (C) 2001 Radical Eye Software.
There is NO warranty.  You may redistribute this software
under the terms of the GNU General Public License
and the Dvips copyright.
For more information about these matters, see the files
named COPYING and dvips.h.
Primary author of Dvips: T. Rokicki; -k maintainer: T. Kacvinsky/ S. Rahtz.

I have looked in several forums and this seems to be a bug, so I am posting it here.

Thanks and regards,

Pedro
Comment 1 hiyuh 2006-05-30 04:51:52 UTC
(In reply to comment #0)
> platex file.tex
> dvips -o file.ps file.dvi

could you give me that file.{tex,dvi} for test on my ptex environment?
Comment 2 Pedro Jose Marron 2006-05-30 04:58:52 UTC
Created attachment 87859 [details]
tex file in euc-jp encoding with latex commands, english and japanese characters

Example vocabulary file with japanese and english words.
Comment 3 Pedro Jose Marron 2006-05-30 05:00:14 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > platex file.tex
> > dvips -o file.ps file.dvi
> 
> could you give me that file.{tex,dvi} for test on my ptex environment?
> 

Hi Masaru,

thank you for the quick response. Here is the file. I uploaded it to the bugzilla site using the "create new attachment" button.

Regards,

Pedro
Comment 4 Pedro Jose Marron 2006-05-30 05:01:52 UTC
Created attachment 87860 [details]
generated dvi file after platex Vocabulary.tex

And here is the .dvi file
Comment 5 hiyuh 2006-05-30 06:14:57 UTC
pjmarron:

Well, I've tested your .tex and .dvi file on my ptex environment
with two scenarios.

Vocabulary.tex <- It's yours.
     |
  (platex)
     |
     v
Vocabulary.dvi
     |
  (dvips)
     |
     v
Vocabulary.ps

Vocabulary.dvi <- It's yours.
     |
  (dvips)
     |
     v
Vocabulary.ps

All .ps file could be converted to .pdf file by ps2pdf for me.
And then all .dvi file could be converted to .pdf file by dvipdfmx for me
Its PDFs have no garbage japanes fonts, though. 
I have no ps viewer because of I usally see my TeX doc as .pdf, not .ps.

My environment is app-text/ptex-3.1.8.1_p20050418 and dvips(k) 5.95a.
Could you mind to upgrade your environment?
Otherwise, your ps viewer is fishy, IMHO.
Comment 6 Pedro Jose Marron 2006-05-30 06:42:55 UTC
(In reply to comment #5)
> pjmarron:
> 
> Well, I've tested your .tex and .dvi file on my ptex environment
> with two scenarios.
> 
> Vocabulary.tex <- It's yours.
>      |
>   (platex)
>      |
>      v
> Vocabulary.dvi
>      |
>   (dvips)
>      |
>      v
> Vocabulary.ps
> 
> Vocabulary.dvi <- It's yours.
>      |
>   (dvips)
>      |
>      v
> Vocabulary.ps
> 
> All .ps file could be converted to .pdf file by ps2pdf for me.
> And then all .dvi file could be converted to .pdf file by dvipdfmx for me
> Its PDFs have no garbage japanes fonts, though. 
> I have no ps viewer because of I usally see my TeX doc as .pdf, not .ps.
> 
> My environment is app-text/ptex-3.1.8.1_p20050418 and dvips(k) 5.95a.
> Could you mind to upgrade your environment?
> Otherwise, your ps viewer is fishy, IMHO.
> 

Hi Masaru,

that is exactly what I did to generate the files. By the way, I only have dvipdfm (and no dvipdfmx), but that did not work either. I got the following error message:

Vocabulary.dvi -> Vocabulary.pdf
[1
TFM file error (ec < bc)

But I will upgrade my ptex environment to ptex-3.1.8.1-p20050418 and will let you know if it works.

Thanks for the help!

Regards,

Pedro
Comment 7 Pedro Jose Marron 2006-05-30 07:14:46 UTC
> 
> Hi Masaru,
> 
> that is exactly what I did to generate the files. By the way, I only have
> dvipdfm (and no dvipdfmx), but that did not work either. I got the following
> error message:
> 
> Vocabulary.dvi -> Vocabulary.pdf
> [1
> TFM file error (ec < bc)
> 
> But I will upgrade my ptex environment to ptex-3.1.8.1-p20050418 and will let
> you know if it works.
> 
> Thanks for the help!
> 
> Regards,
> 
> Pedro
> 

Hi again,

I upgraded ptex and that did not solve the problem. I get exactly the same result and if I try to print the generated poscript file, I get dollar signs instead of hiragana.

Is there a way to find out what I am actually missing?

Thanks a lot,

Pedro
Comment 8 hiyuh 2006-05-30 17:36:25 UTC
(In reply to comment #7)
[SNIP]
> Is there a way to find out what I am actually missing?
[SNIP]

Well, could you try to see my .dvi and .pdf file?
These were generated from your original .tex file by platex and dvipdfmx
on my environment.
Those files should show you no garbage japanese fonts, I think.
If not, it must be your viewer problem, IMHO...
Comment 9 hiyuh 2006-05-30 17:38:56 UTC
Created attachment 87924 [details]
A .dvi file which was generated from .tex file on the above.
Comment 10 hiyuh 2006-05-30 17:39:38 UTC
Created attachment 87925 [details]
A .pdf file which was generated from .tex file on the above.
Comment 11 Pedro Jose Marron 2006-05-31 01:11:01 UTC
(In reply to comment #8)
> (In reply to comment #7)
> [SNIP]
> > Is there a way to find out what I am actually missing?
> [SNIP]
> 
> Well, could you try to see my .dvi and .pdf file?
> These were generated from your original .tex file by platex and dvipdfmx
> on my environment.
> Those files should show you no garbage japanese fonts, I think.
> If not, it must be your viewer problem, IMHO...
> 

Hi,

thanks for the files. I can see the .dvi and .pdf files without problems. I had to download the asian fonts for acroread, but that was no problem. So yes, I can see those files without problems.

Several things I have tried and realized:

 - I can always see my own .dvi files with the right fonts even if I generated them with the stable version of ptex. With the latest ~x86 version, they work too. So the .dvi file seems to be ok.

 - I have no dvipdfmx in my environment so that I always have to go through dvips to generate a .ps file and then ps2pdf13 to generate a .pdf file. And that does not work.

 - I have been able to see your .pdf file without problems and even print it, so that is fine.

Now, questions I have...

 - Why don't I have dvipdfmx in my system?

 - How do you invoke dvips (maybe I am missing a command-line argument?)

 - Am I missing fonts that should be installed in the system? What about this Ryumin-Light that shows up in the .pdf file I generate myself? Where is that located in the system?

Again, thanks for the help,

Pedro
Comment 12 hiyuh 2006-05-31 02:35:49 UTC
(In reply to comment #11)
[SNIP]
> Now, questions I have...
> 
>  - Why don't I have dvipdfmx in my system?
app-text/dvipdfmx is in official portage tree, IIRC.
 
>  - How do you invoke dvips (maybe I am missing a command-line argument?)
Nope, I haven't used dvips explicitly to generate these .dvi and .pdf file
which were attached here.
I just did to generate .dvi from .tex like that
 $ platex Vocabulary.tex
It makes .dvi file as Vocabulary.dvi automatically.
And then, I just did to generate .pdf from .dvi like that
 $ dvipdfmx Vocabulary.dvi
It makes .pdf file as Vocabulary.pdf automatically.
So, I've not use any options explicitly through my terminal, though.

>  - Am I missing fonts that should be installed in the system? What about this
> Ryumin-Light that shows up in the .pdf file I generate myself? Where is that
> located in the system?
Well, almost fonts I've installed in my userland which are in official tree,
IIRC.
So, "eix -I -C media-fonts | grep ^*" shows...

* media-fonts/arphicfonts 
* media-fonts/artwiz-aleczapka-en 
* media-fonts/artwiz-fonts 
* media-fonts/baekmuk-fonts 
* media-fonts/corefonts 
* media-fonts/cronyx-fonts 
* media-fonts/encodings 
* media-fonts/font-adobe-100dpi 
* media-fonts/font-adobe-75dpi 
* media-fonts/font-adobe-utopia-type1 
* media-fonts/font-alias 
* media-fonts/font-bh-type1 
* media-fonts/font-cursor-misc 
* media-fonts/font-misc-misc 
* media-fonts/font-util 
* media-fonts/freefonts 
* media-fonts/gnu-gs-fonts-std 
* media-fonts/intlfonts 
* media-fonts/jisx0213-fonts 
* media-fonts/kochi-substitute 
* media-fonts/mikachan-font 
* media-fonts/sazanami 
* media-fonts/shinonome 
* media-fonts/terminus-font 
* media-fonts/ttf-bitstream-vera 
* media-fonts/knm_new_linux [1]

Last one is one of console fonts, maybe it's unrelated, IMHO.
Comment 13 Pedro Jose Marron 2006-05-31 11:28:29 UTC
(In reply to comment #12)

Hi again,

> >  - Why don't I have dvipdfmx in my system?
> app-text/dvipdfmx is in official portage tree, IIRC.

Ok... I thought it was part of ptex and somehow did not get built because I was missing a flag or something. I have it now and things ended up working but not right away. Let me tell you what I did to get it working.

First, only with dvipdfmx, I got the following error message:

** ERROR ** Could not find encoding file "H"

But then, surfing the web, I came across the following fix:

ln -s /usr/share/ghostscript/Resource/ /usr/share/texmf/dvipdfm/
mktexlsr

From that point on, things worked flawlessly and I can generate a beautiful .pdf file with really nice fonts that can be printed without problems. I did not even have to install all the fonts you mention below because things were already there.

Thank you very, very much for the help and for the patience ;)

Regards,

Pedro

P.S. Is this a bug in dvipdfmx, ghostscript or ptex? Should I file another bug to make sure this is fixed in new releases?
Comment 14 hiyuh 2006-05-31 17:42:23 UTC
(In reply to comment #13)
[SNIP]
> ln -s /usr/share/ghostscript/Resource/ /usr/share/texmf/dvipdfm/
> mktexlsr
> 
> From that point on, things worked flawlessly and I can generate a beautiful
> .pdf file with really nice fonts that can be printed without problems. I did
> not even have to install all the fonts you mention below because things were
> already there.
Ugh, sorry for my ton of misdirections.
It seems be one of CMap issues...

[SNIP]
> P.S. Is this a bug in dvipdfmx, ghostscript or ptex? Should I file another bug
> to make sure this is fixed in new releases?
It shouldn't be any bug of tex stuff, IMHO.
Although tex env/conf makes us messy, these must be "setting", like web
browser's fonts setting.
If you think that when installing dvipdfmx with "default setting" is better,
you can file it as "Enhancement" severity's, maybe.
Comment 15 Pedro Jose Marron 2006-06-02 07:42:56 UTC
(In reply to comment #14)
> (In reply to comment #13)
> [SNIP]
> > ln -s /usr/share/ghostscript/Resource/ /usr/share/texmf/dvipdfm/
> > mktexlsr
> > 
> > From that point on, things worked flawlessly and I can generate a beautiful
> > .pdf file with really nice fonts that can be printed without problems. I did
> > not even have to install all the fonts you mention below because things were
> > already there.
> Ugh, sorry for my ton of misdirections.
> It seems be one of CMap issues...
> 
> [SNIP]
> > P.S. Is this a bug in dvipdfmx, ghostscript or ptex? Should I file another bug
> > to make sure this is fixed in new releases?
> It shouldn't be any bug of tex stuff, IMHO.
> Although tex env/conf makes us messy, these must be "setting", like web
> browser's fonts setting.
> If you think that when installing dvipdfmx with "default setting" is better,
> you can file it as "Enhancement" severity's, maybe.
> 

Hi,

thanks for the info. And do not worry about the "misdirections". What you told me and the tests you did helped a lot :)

Regards,

Pedro