Bug 443362 - SazanamiMincho fails to display in PDF
SazanamiMincho fails to display in PDF
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: fonts-japanese (Show other bugs)
5.1
All Linux
high Severity high
: rc
: ---
Assigned To: Akira TAGOH
QE Internationalization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-21 02:26 EDT by Jeff Fearn
Modified: 2014-03-09 18:10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-09 18:10:23 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)
PDF exhibiting problem (960.15 KB, application/pdf)
2008-04-21 02:26 EDT, Jeff Fearn
no flags Details
Example without an embedded font (834.94 KB, application/pdf)
2008-04-21 20:36 EDT, Jeff Fearn
no flags Details
Font metric file (356.34 KB, text/xml)
2008-10-12 22:15 EDT, Jeff Fearn
no flags Details

  None (edit)
Description Jeff Fearn 2008-04-21 02:26:20 EDT
Description of problem:
When trying to view a PDF using, but not embedding, SazanamiMincho or
SazanamiGothic, the PDF contents fail to display and evince reports the
following error:

Error: Couldn't find a mapping to Unicode for font 'SazanamiMincho'

some font thing failed


OR

Error: Couldn't find a mapping to Unicode for font 'SazanamiGothic'

some font thing failed


Version-Release number of selected component (if applicable):
fonts-japanese-0.20061016-4.el5

How reproducible:
Always

Steps to Reproduce:
1. Build a PDF using Sazanami Mincho or Gothic without embedding the font
2. view PDF
  
Actual results:
PDF does not display content

Expected results:
PDF displaying contents

Additional info:
Discovered this when trying to get FOP to build translated PDFs on RHEL5.

Attached is a PDF that exhibits this error. This PDF displays correctly on FC8
and produces the above error on RHEL5.

I have been unable to successfully embed these font in a PDF on RHEL5, I'm
hoping it is the same issue.
Comment 1 Jeff Fearn 2008-04-21 02:26:21 EDT
Created attachment 303109 [details]
PDF exhibiting problem
Comment 2 Akira TAGOH 2008-04-21 06:34:22 EDT
Which version did you try with? I can see "some font thing failed" error on both
with:

sazanami-fonts-mincho-0.20040629-4.20061016.fc8
evince-2.20.2-1.fc8
poppler-0.6.2-1.fc8

and

fonts-japanese-0.20061016-4.el5
evince-0.6.0-8.el5
poppler-0.5.4-4.4.el5_1

And there was no changes in the font itself between RHEL5 and F-8. so if you are
saying it's a RHEL5 specific issue, the real problem may be in other place.
Comment 3 Jeff Fearn 2008-04-21 20:36:03 EDT
Created attachment 303236 [details]
Example without an embedded font

Bah! Sorry, I attached the wrong PDF. This one works on FC8 and not on RHEL5.

RHEL5:
fonts-japanese-0.20061016-4.el5

evince-0.6.0-8.el5

poppler-0.5.4-4.3.el5_1


FC8:
sazanami-fonts-mincho-0.20040629-4.20061016.fc8
evince-2.20.2-1.fc8
poppler-0.6.2-1.fc8
Comment 4 Jens Petersen 2008-07-31 23:21:53 EDT
Any change on this?
Comment 5 Jeff Fearn 2008-08-12 02:43:24 EDT
(In reply to comment #4)
> Any change on this?

FYI we switched to sazanami-gothic on RHEL 5 and Fedora 9 as sazanami-mincho causes some problems when trying to create a font metric file for FOP.

e.g (assuming you have FOP setup)

on RHEL 5:

java -cp /usr/share/java/fop.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlgraphics-commons.jar org.apache.fop.fonts.apps.TTFReader -fn SazanamiMincho /usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf SazanamiMincho.xml

or on Fedora 9:

java -cp /usr/share/java/fop.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlgraphics-commons.jar org.apache.fop.fonts.apps.TTFReader -fn SazanamiMincho /usr/share/fonts/sazanami-fonts-mincho/sazanami-mincho.ttf SazanamiMincho.xml

You end up with:

TTF Reader for Apache FOP 0.95beta



Parsing font...

Reading /usr/share/fonts/sazanami-fonts-mincho/sazanami-mincho.ttf...

Font Family: [Sazanami Mincho, 0U0V0j0f±]

C⎼␊▒├␋┼± │└┌ °⎺┼├ °␋┌␊...

C⎼␊▒├␋┼± CID ␊┼␌⎺␍␊␍ └␊├⎼␋␌⎽...

W⎼␋├␋┼± │└┌ °⎺┼├ °␋┌␊ S▒≥▒┼▒└␋M␋┼␌␤⎺.│└┌...

T␤␋⎽ °⎺┼├ ␌⎺┼├▒␋┼⎽ ┼⎺ ␊└␉␊␍␍␋┼± ┌␋␌␊┼⎽␊ ⎼␊⎽├⎼␋␌├␋⎺┼⎽.



XML °⎺┼├ └␊├⎼␋␌⎽ °␋┌␊ ⎽┤␌␌␊⎽⎽°┤┌┌≤ ␌⎼␊▒├␊␍.




Gothic works correctly on both:

java -cp /usr/share/java/fop.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlgraphics-commons.jar org.apache.fop.fonts.apps.TTFReader -fn SazanamiGothic /usr/share/fonts/sazanami-fonts-gothic/sazanami-gothic.ttf SazanamiGothic.xml

TTF Reader for Apache FOP 0.95beta



Parsing font...

Reading /usr/share/fonts/sazanami-fonts-gothic/sazanami-gothic.ttf...

Font Family: [0U0V0j00´0·0Ã0¯, Sazanami Gothic]

Creating xml font file...

Creating CID encoded metrics...

Writing xml font file SazanamiGothic.xml...

This font contains no embedding license restrictions.



XML font metrics file successfully created.
Comment 6 Jeff Fearn 2008-09-18 20:52:26 EDT
Additionally after creating SazanamiMincho.xml, as per #5, you get the following error when trying to use SazanamiMincho in FOP:

SEVERE: Failed to read font metrics file /usr/share/publican/fop/font-metrics/SazanamiMincho.xml
org.xml.sax.SAXParseException: Character reference "&#14" is an invalid XML character.
        at org.apache.fop.fonts.FontReader.createFont(FontReader.java:92)


The family name is:


<family-name>0U0V0j0f&#14;g&#29;</family-name>

Deleteing &#14; leads to:

SEVERE: Failed to read font metrics file /usr/share/publican/fop/font-metrics/SazanamiMincho.xml
org.xml.sax.SAXParseException: Character reference "&#29" is an invalid XML character.

Deleting &#29; allows you to build a PDF using SazanamiMincho.
Comment 7 Jens Petersen 2008-10-12 22:00:04 EDT
Could you attach SazanamiMincho.xml?
Comment 8 Jeff Fearn 2008-10-12 22:15:48 EDT
Created attachment 320158 [details]
Font metric file

font metric file
Comment 9 Jens Petersen 2008-10-12 22:47:51 EDT
(In reply to comment #6)
> <family-name>0U0V0j0f&#14;g&#29;</family-name>
> 
> Deleting &#14; leads to:
:
> Deleting &#29; allows you to build a PDF using SazanamiMincho.

As a workaround could you just remove those for now?  Or replace the name with something like "Sazanami Mincho".

I looked at the ttf files with fontforge and fontmatrix and could not see any decrepancy between Mincho and Gothic for the naming, so I really don't understand what is going on when generating the xml files.
Comment 10 Jeff Fearn 2008-10-13 00:03:34 EDT
(In reply to comment #9)
> (In reply to comment #6)
> > <family-name>0U0V0j0f&#14;g&#29;</family-name>
> > 
> > Deleting &#14; leads to:
> :
> > Deleting &#29; allows you to build a PDF using SazanamiMincho.
> 
> As a workaround could you just remove those for now?  Or replace the name with
> something like "Sazanami Mincho".

The output gets corrupted after this is run, making it difficult to debug errors in the build process.

> I looked at the ttf files with fontforge and fontmatrix and could not see any
> decrepancy between Mincho and Gothic for the naming, so I really don't
> understand what is going on when generating the xml files.

Not sure if this helps, this is the output on RHEL5:

Font Family: [0U0V0j0f±, S▒≥▒┼▒└␋ M␋┼␌␤⎺]

This is the output on FC9 (which works properly):

Font Family: [Sazanami Mincho, 0U0V0j0fg]

I believe I will disable Mincho and go with Gothic for now.
Comment 11 RHEL Product and Program Management 2012-09-18 13:39:51 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 12 RHEL Product and Program Management 2014-03-07 08:57:28 EST
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.
Comment 13 Jeff Fearn 2014-03-09 18:10:23 EDT
We moved to RHEL6, so this fix is no longer required by us.

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