Bug 178411 - Cannot see Japanese dvi file because of vfontmap description
Cannot see Japanese dvi file because of vfontmap description
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: tetex (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
David Lawrence
: i18n, Reopened
: 187893 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-20 04:22 EST by Mamoru TASAKA
Modified: 2013-07-02 19:13 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-04-28 00:45:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample Japanese tex file ( in ISO-2022-JP ) (146 bytes, text/x-tex)
2006-01-20 04:25 EST, Mamoru TASAKA
no flags Details
Screenshot of pxdvi (15.44 KB, image/png)
2006-01-20 05:11 EST, Jindrich Novy
no flags Details
A patch to change some definition in xdvi.h (568 bytes, patch)
2006-03-30 12:33 EST, Mamoru TASAKA
no flags Details | Diff
some warning on the background after pxdvi to view the file (1.99 KB, text/plain)
2006-04-28 02:22 EDT, Lawrence Lim
no flags Details
updated tetex-3.0-pxdvi.patch (8.73 KB, patch)
2006-05-01 23:19 EDT, Takanori MATSUURA
no flags Details | Diff

  None (edit)
Description Mamoru TASAKA 2006-01-20 04:22:00 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.8) Gecko/20060103 Fedora/1.5-4 Firefox/1.5

Description of problem:
I cannot see Japanese dvi file with current rawhide system.

After I create a dvi file from Japanese tex file (usually encoded
with ISO-2022-JP (it successes), the following happens.

[root@dhcp151 TEMP]# platex sample
This is pTeX, Version 3.141592-p3.1.8 (euc) (Web2C 7.5.4)
(./sample.tex
pLaTeX2e <2005/01/04>+0 (based on LaTeX2e <2003/12/01> patch level 0)
(/usr/share/texmf/ptex/platex/base/jarticle.cls
Document Class: jarticle 2002/04/09 v1.4 Standard pLaTeX class
(/usr/share/texmf/ptex/platex/base/jsize12.clo)) (./sample.aux) [1]
(./sample.aux) )
Output written on sample.dvi (1 page, 348 bytes).
Transcript written on sample.log.
[root@dhcp151 TEMP]# pxdvi sample
Warning: Missing charsets in String to FontSet conversion
Warning: Missing charsets in String to FontSet conversion
Warning: Missing charsets in String to FontSet conversion
FT2: Open Font Error. (/usr/share/fonts/japanese/TrueType/kochi-mincho-subst.ttf)
[root@dhcp151 TEMP]# head -n 2 /usr/share/texmf/pxdvi/vfontmap
min     /usr/share/fonts/japanese/TrueType/kochi-mincho-subst.ttf
nmin    /usr/share/fonts/japanese/TrueType/kochi-mincho-subst.ttf
[root@dhcp151 TEMP]# LANG=C rpm -q --changelog fonts-japanese | head -n 20 | tail -n 4
* Wed Aug 17 2005 Akira TAGOH <tagoh@redhat.com> - 0.20050222-7
- Added cidfmap.ja for the latest ghostscript.
- Removed Kochi fonts.

"At lease" changing font series in vfontmap from kochi to sazanami is
needes.


Version-Release number of selected component (if applicable):
tetex-3.0-16 fonts-japanese-0.20050222-11.1 ghostscript-8.15.1-3.1

How reproducible:
Always

Steps to Reproduce:
1. Create Japanese tex file.
2. Make dvi file from tex file by platex
3. See dvi file made with pxdvi
  

Actual Results:  Cannot see dvi file

Expected Results:  Dvi file can be seen...

Additional info:

Note:
Even after I manually change fonts in vfontmap to sazanami font series,
when I see dvi file with pxdvi, Japanese characters are collapsed.
But the created dvi file can be seen correctly with FC4 system; for which
I don't know the further reason.
Comment 1 Mamoru TASAKA 2006-01-20 04:25:37 EST
Created attachment 123471 [details]
sample Japanese tex file ( in ISO-2022-JP )

Sample Japanese tex file.
It is encoded with ISO-2022-JP.
Comment 2 Jindrich Novy 2006-01-20 05:11:37 EST
Created attachment 123473 [details]
Screenshot of pxdvi

Could you please confirm this is correct output when viewing the sample file
you attached?
Comment 3 Mamoru TASAKA 2006-01-20 06:49:07 EST
(In reply to comment #2)
> Created an attachment (id=123473) [edit]
> Screenshot of pxdvi
> 
> Could you please confirm this is correct output when viewing the sample file
> you attached?

Okay. The view of the attachment in the comment 2 is CORRECT.
Comment 4 Jindrich Novy 2006-01-24 08:06:42 EST
It looks like the rawhide fonts-japanese misses the kochi-mincho-subst font
completely. When I install the fonts manualy from the old fonts-japanese, I'm
able to run pxdvi smoothly, but the japanese fonts aren't correctly displayed.

Comparing the output from pxdvi on my working FC4 and rawhide where it doesn't
work, I see that this warning is displayed prior the other messages:

Warning: Cannot convert string "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*" to
type FontStruct

I'm trying to figure out what's happening here (suspecting freetype).
Comment 5 Jindrich Novy 2006-01-24 10:14:12 EST
I tried to comment out the kochi fonts and substitute them with the sazanami
ones in /usr/share/texmf/pxdvi/vfontmap. But with no luck... pxdvi displays the
DVI contents, but japanese characters are displayed like they're missing in the
font (black squares)...
Comment 6 Mamoru TASAKA 2006-01-24 13:10:23 EST
Yes. I think that changing description in vfontmap from kochi to
sazanami is needed, but I have no idea for further fix for now...
Comment 7 Jindrich Novy 2006-01-26 05:09:54 EST
Akira, could you please help us here why the fonts are displayed incorrectly
when vfontmap points on the sazanami fonts? Were there some important changes we
are not aware of in fonts-japanese since fonts-japanese-0.20050222-3 that could
affect pxdvi?

Thanks.
Comment 8 Akira TAGOH 2006-01-26 06:06:42 EST
No idea off hand. Kochi fonts and Sazanami fonts are different TrueType font -
properly which was made by even the same upstream though - I have also no idea
how pxdvi picks the glyphs up from TrueType fonts. so need to investigate this
anyway. let me have a look then.
Comment 9 Akira TAGOH 2006-01-26 06:58:05 EST
I just tried this out on Rawhide with kochi-{gothic,mincho}-subst.ttf that
copied manually. but it doesn't work for me. what you did try at Comment #2 was
on FC4 box, right? and what you were saying at Comment #4 was on Rawhide box?
I'm wondering if this is related to fonts.  guessing from asking me about font,
you are sure there aren't any changes in pxdvi between FC4 and Rawhide right. so
I suspect it may be freetype or something like rendering library as you did then.
Comment 10 Akira TAGOH 2006-01-26 07:10:31 EST
Ok, I've also tried this on FC4 box with sazanami-{gothic,mincho}.ttf. it works
fine. so this is apparently rendering issue.
Comment 11 Jindrich Novy 2006-01-26 07:24:54 EST
To answer your question in Comment #9, yes, pxdvi worked fine under FC4, the
output from Comment #4 was taken from an updated FC4. In Comment #4 is used the
latest rawhide fonts-japanese on rawhide box, right.
Comment 12 Jindrich Novy 2006-03-08 06:16:57 EST
I applied change to vfontmap suggested by MATSUURA Takanori. Maybe that will fix
your issue.
Comment 13 Mamoru TASAKA 2006-03-09 08:46:59 EST
Hello, Jindrich.
Which version of rpm(s) do you refer to? I think the current newest rawhide
tetex rpm is tetex-3.0-17 (in 20060307 rawhide) and  I don't see any change  in
vfontmap...

If your change will be applied in 20060310 rawhide, I will wait until then.
Comment 14 Jindrich Novy 2006-03-09 09:34:21 EST
Hello Mamoru,

the latest tetex rpm version is 3.0-18, where the attempt to fix it is applied.
Maybe it's not on the mirrors yet because of the FC5 freeze, but I built it few
days ago.

In the meantime the srpm is here:
http://people.redhat.com/jnovy/files/tetex-3.0-18.src.rpm

Comment 15 Mamoru TASAKA 2006-03-09 11:15:30 EST
I just rebuilt rpms from source tetex-3.0-18 and installed them, but it seems to
no purpose...

The change in 3.0-18 is  that vfontmap points to sazanami fonts, right? Then the
attempt is already done as I reported on the Note of the first bug report and
the comments from 1 to 6 says. Can you see the dvi file correctly (as the
attachment in comment 2) created from the original tex file (attached in the
comment 1)  by 3.0-18 ?  

Note: when I create ps file from dvi file by 
pdvips -Ppdf sample.dvi ,
the created ps file can be seen correctly by gs, so I suppose there is no
problem in dvi file itself.
Comment 16 Mamoru TASAKA 2006-03-30 12:33:03 EST
Created attachment 127061 [details]
A patch to change some definition in xdvi.h

Hello, Jindrich.
Current rawhide rpm tetex-3.0-19 does not work well, however, there is some
news.

A information that "Making it valid the definition that "typedef       
unsigned int	wide_ubyte;" in texk/pxdvik/xdvi.h should work for this issue"
was brought on Japanese Fedora wiki page, and this worked WELL for me!!
Currently, I apply the attached patch for tetex.spec and it works well for now.


I checked that on FC4 system NeedFunctionPrototypes was defined as 1 at the
line 234  of texk/pxdvik/xdvi.h,  but on FC5 system NeedFunctionPrototypes is
not defined at this line, and by the following lines NeedFunctionPrototypes is
defined as 0. So I suppose that this is related to switching to modular X.
Comment 17 Jindrich Novy 2006-03-31 15:48:51 EST
Hi Mamoru,

yes, modular X seems to be at fault here as far as I can see from
X11/Xfuncproto.h, which is included by X11/Xlib.h in xdvi.h:

<snip>
#ifndef NARROWPROTO
#define NARROWPROTO
#endif
#ifndef FUNCPROTO
#define FUNCPROTO 15
#endif

#ifndef NeedWidePrototypes
#ifdef NARROWPROTO
#define NeedWidePrototypes 0
#else
#define NeedWidePrototypes 1            /* default to make interropt. easier */
#endif
#endif /* NeedWidePrototypes */
</snip>

what causes that NeedWidePrototypes is defined to 0 if previously undefined.

Mike, is it intentional? From the comment above in X11/Xfuncproto.h I'd guess
the default should be #define NeedWidePrototypes 1 ?
Comment 18 Jindrich Novy 2006-04-04 08:02:44 EDT
Ok, I applied the workaround presented by Mamoru. Please reopen if you see any
other problems. The workaround is applied since tetex-3.0-20.
Comment 19 Jindrich Novy 2006-04-04 08:05:16 EDT
*** Bug 187893 has been marked as a duplicate of this bug. ***
Comment 20 Mamoru TASAKA 2006-04-17 12:46:51 EDT
Hello, Jindrich.

tetex-3.0-20 works WELL for me, thanks.
Then would you have a plan to apply these temporary fix (vfontmap change in
3.0-18 and definition of NeedWidePrototypes in 3.0-20) to FC5  updates ?
Comment 21 Jindrich Novy 2006-04-26 11:23:22 EDT
Hi Mamoru,

I modified the vfontmap file once more based on recommendation from Matsuura
Takanori. This should appear soon including more japanese fixes since 3.0-22.
Could you please confirm everything works as expected with this version? If so,
I'll release updates immediatelly.
Comment 22 Mamoru TASAKA 2006-04-26 12:14:05 EDT
Okay, I will check tetex-3.0-22 when it appears on web site.
Comment 23 Mamoru TASAKA 2006-04-27 05:46:50 EDT
Hello, Jindrich.

Now I checked tetex-3.0-22 and it seems to work well.
Comment 24 Fedora Update System 2006-04-27 18:01:45 EDT
tetex-3.0-19.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 25 Mamoru TASAKA 2006-04-28 00:45:00 EDT
Okay, I upgraded to tetex-3.0-19.fc5 on FC5 system and it seems to work well.
Thanks!!

Now, I close this bug as CLOSED RAWHIDE. If another bug is found, I will reopen
this bug or create another bug report.
Comment 26 Lawrence Lim 2006-04-28 02:22:46 EDT
Created attachment 128344 [details]
some warning on the background after pxdvi to view the file

I tried with tetex-3.0-22, and it showing fine too. Noticed some warning output
in the background thought. Please let me know if it should be of concern.
Comment 27 Takanori MATSUURA 2006-05-01 23:19:55 EDT
Created attachment 128463 [details]
updated tetex-3.0-pxdvi.patch

(In reply to comment #26)
> some warning on the background after pxdvi to view the file

This patch may fix the last "Warning: Cannot convert string..." warning.

"Warning: Missing charsets in String to FontSet conversion" warnings are from
font detection mechanism in pxdvi GUI and harmless for the pxdvi functions .

xdvi command also output the same warning in my FC5.

Other warnings are not shown in my FC5.

Does your machine have fonts-japanese package required by tetex-xdvi?

Could you open the new bug If more fix is needed?
Comment 28 Lawrence Lim 2006-05-01 23:24:16 EDT
RE Comment #27

Sure. Thanks for your patch.
Comment 29 Fedora Update System 2006-05-26 10:10:00 EDT
tetex-3.0-10.FC4 has been pushed for fc4, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 30 Fedora Update System 2006-06-07 19:36:49 EDT
tetex-3.0-10.FC4 has been pushed for fc4, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.