[ 
https://issues.apache.org/jira/browse/FOP-2539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15009459#comment-15009459
 ] 

Andreas L. Delmelle edited comment on FOP-2539 at 11/17/15 10:05 PM:
---------------------------------------------------------------------

Was trying to check what the behavior was when the TTF was used, but 
unfortunately, the Symbol.ttf file that comes with OS X cannot be processed:

WARNING: Unable to load font file: file:/System/Library/Fonts/Symbol.ttf. 
Reason: java.io.IOException: The font does not have a Unicode cmap table: 
file:/System/Library/Fonts/Symbol.ttf

Happens with quite a lot of TTFs and TTCs on OS X. Not an expert, so not sure 
what is wrong about those files that makes FOP's font library not able to 
process it. I mean: I obviously get that it cannot find a Unicode cmap table, 
but would have to familiarize myself with the format to know whether that is 
really an issue with the file, or whether it just points to a deficiency in 
FOP's font lib... ?

EDIT - The Arial.ttf that comes with OS X _does_ work apparently, and would 
render the first sample with proper baseline alignment between the regular 
latin characters and the greek symbols.

EDIT 2 - Was a bit in an adventurous mood, so decided to debug the code to try 
and find out why the Symbol.ttf throws that error. 
Apparently, it fails at OpenFont.readCMAP, lines 426 and following. There are 
two CMAP tables in the file, but one yields Platform ID = 0 and Encoding ID = 
3, the other has Platform ID = 1 and Encoding ID = 0. Hence, neither 
cmapUniOffset nor symbolMapOffset is set on lines 419, resp. 422. This in turn 
causes FOP to assume there is no CMAP table available, which causes the error.

Now, checking the OpenType documentation, it seems that our implementation 
would only process the Windows variants (Platform ID = 3), and not the Unicode 
(Platform ID = 0) nor the Macintosh (Platform ID = 1)... Shame that so many 
developers only know MS Windows and do not test their code on different 
platforms... :)

EDIT - Finally, just a heads up: the CMAP table with Platform ID = 0 and 
Encoding ID = 3 is properly processed if I alter the check on line 418. Result 
is then similar to using the Base14 font, i.e. no support for regular latin 
characters.
The Macintosh/Roman table yields an error. Apparently, that table format is not 
yet supported by FOP's implementation. Very likely, if support for that is 
added, that would then also render the latin characters properly...


was (Author: adelmelle):
Was trying to check what the behavior was when the TTF was used, but 
unfortunately, the Symbol.ttf file that comes with OS X cannot be processed:

WARNING: Unable to load font file: file:/System/Library/Fonts/Symbol.ttf. 
Reason: java.io.IOException: The font does not have a Unicode cmap table: 
file:/System/Library/Fonts/Symbol.ttf

Happens with quite a lot of TTFs and TTCs on OS X. Not an expert, so not sure 
what is wrong about those files that makes FOP's font library not able to 
process it. I mean: I obviously get that it cannot find a Unicode cmap table, 
but would have to familiarize myself with the format to know whether that is 
really an issue with the file, or whether it just points to a deficiency in 
FOP's font lib... ?

EDIT - The Arial.ttf that comes with OS X _does_ work apparently, and would 
render the first sample with proper baseline alignment between the regular 
latin characters and the greek symbols.

EDIT 2 - Was a bit in an adventurous mood, so decided to debug the code to try 
and find out why the Symbol.ttf throws that error. 
Apparently, it fails at OpenFont.readCMAP, lines 426 and following. There are 
two CMAP tables in the file, but one yields Platform ID = 0 and Encoding ID = 
3, the other has Platform ID = 1 and Encoding ID = 0. Hence, neither 
cmapUniOffset nor symbolMapOffset is set on lines 419, resp. 422. This in turn 
causes FOP to assume there is no CMAP table available, which causes the error.

Now, checking the OpenType documentation, it seems that our implementation 
would only process the Windows variants (Platform ID = 3), and not the Unicode 
(Platform ID = 0) nor the Macintosh (Platform ID = 1)... Shame that so many 
developers only know MS Windows and do not test their code on different 
platforms... :)

> Apache PDF issue with Symbol.ttf
> --------------------------------
>
>                 Key: FOP-2539
>                 URL: https://issues.apache.org/jira/browse/FOP-2539
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windox, unix
>            Reporter: Sushmitha
>         Attachments: symbol_test.fo, symbol_test_2.fo
>
>
> I have Symbol.ttf, configured the same in config file. Symbol font is not 
> applying properly.
> Please find the below details
> FOP version - 1.0
> OS - Unix, Windows
> XSL-FO desc:
> <fo:block font-family="Symbol">
> Abcdefgh α β γ
> </fo:block>
> Result - the charcters are not displaying properly and they are not human 
> readable format
> fop.xconf:-
> <renderers>
> <renderer mime="application/pdf">
> <fonts>
> <font metrics-url="Symbol.xml" embed-url="Symbol.ttf">
> <font-triplet name="Symbol" style="normal" weight="normal"/>
> </font>
> </fonts>
> </renderer>
> <renderers>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to