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

Andreas L. Delmelle edited comment on FOP-2540 at 11/22/15 1:41 PM:
--------------------------------------------------------------------

Attached small patch + log outputs to demonstrate that number of 'unusable' 
font file warnings goes down from 111 to 64.

Core of the change is really at line 37 in the patch. 
For the remainder:
* replaced some 'magic numbers' with more descriptive symbolic literals, and 
already added a few more for as of yet unsupported formats (based on OTF 
documentation available at Microsoft)
* added generics to OFMtxEntry.unicodeIndex and related getter
* removed some unnecessary (un)boxing.

Potential improvement: perhaps we should add a class OFCmap, to extricate the 
logic from the main OpenFont class, which would likely make it easier/cleaner 
to extend the functionality in the future...


was (Author: adelmelle):
Attached small patch + log outputs to demonstrate that number of 'unusable' 
font file warnings goes down from 111 to 64.

Core of the change is really at line 37 in the patch. 
For the remainder:
* replaced some 'magic numbers' with more descriptive symbolic literals, and 
already added a few more for as of yet unsupported formats (based on OTF 
documentation available at Microsoft)
* added generics to OFMtxEntry.unicodeIndex and related getter
* removed some unnecessary (un)boxing.

> Enhance TTF/OTF support beyond Windows
> --------------------------------------
>
>                 Key: FOP-2540
>                 URL: https://issues.apache.org/jira/browse/FOP-2540
>             Project: FOP
>          Issue Type: Improvement
>          Components: font/opentype
>    Affects Versions: 2.0
>         Environment: OS X
>            Reporter: Andreas L. Delmelle
>            Assignee: Andreas L. Delmelle
>            Priority: Minor
>         Attachments: FOP_2540.patch, test_osx_fonts_after_1.log, 
> test_osx_fonts_before.log
>
>
> Currently, cmap tables in TTF/OTF are only supported for Platform ID = 3, 
> i.e. MS Windows. There is no support for Platform ID = 0, i.e. basic Unicode, 
> or 1, i.e. Macintosh.
> This makes quite some system fonts bundled with OS X supposedly unusable. The 
> solution is fairly trivial (patch proposal will be attached shortly), 
> provided the cmap table format in the font is already supported. FOP 
> currently only has support for cmap format 4 (segment to delta mapping), but 
> this seems to suffice for most of the Unicode cmaps as well.
> See also FOP-2539, which triggered me to investigate this closer.



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

Reply via email to