I think for JDK 8 you can pass down a flag to decide whether to include or exclude CFF. This flag would be the value of FontUtilities.isOpenJDK() and that should tell us what we need. That would preserve the status quo for Oracle JDK and it would be our problem if the same
bug were then reported against that release.

-phil.

On 9/27/17, 5:35 PM, Mario Torre wrote:
Hi Phil,

I think I may be fine if we need to live with a local patch in our RPM in 8, this use case should be pretty rare, although I'll check first if there’s some ifdefs that I can use for the backport to 8.

I tried to figure out if I could just change the logic but all I could get was NPEs.

Perhaps a more fine tuned search to exclude CFF in the first place, but I’m not sure how to craft the query for FontConfig in this case.

I’ll push to 10 for now and backport to 9 in the meantime. Do I need another reviewer ok?

Cheers,
Mario

On Wed 27. Sep 2017 at 23:15, Phil Race <philip.r...@oracle.com <mailto:philip.r...@oracle.com>> wrote:

    This is fine for JDK 9 + 10 but the reason CFF fonts are discarded
    is that we weren't supporting them properly in Oracle JDK until 9.
    We should have removed this check in 9 but it was forgotten.

    If you backport this to 7 and 8 it will be a problem there - for
    Oracle JDK, not OpenJDK.

    Although it won't matter for openjdk7 .. since Oracle isn't using that
    forest any more

    But it will be an issue for 8. Not sure how to handle that but
    it should not be backported without a resolution there.

    -phil.

    On 09/27/2017 06:52 AM, Mario Torre wrote:
    > Hi all,
    >
    > I would like to propose a fix for
    > https://bugs.openjdk.java.net/browse/JDK-8188030.
    >
    > The issue is basically that CFF fonts are considered better
    match than
    > Type 1, but are discarded, leaving the font array with no elements.
    >
    > The fix is here:
    >
    > http://cr.openjdk.java.net/~neugens/8188030/webrev.01/
    <http://cr.openjdk.java.net/%7Eneugens/8188030/webrev.01/>
    >
    > I attached a reproducer to the bug report, but you need a somewhat
    > minimal system setup for that to work.
    >
    > The fix is for OpenJDK 10 at this point, but I plan to backport
    it all
    > the way down to 7.
    >
    > Any comments?
    >
    > Cheers,
    > Mario

Reply via email to