You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Alfred (Jira)" <ji...@apache.org> on 2020/06/14 09:58:00 UTC

[jira] [Created] (PDFBOX-4882) Two conditions are always false in TrueTypeEmbedder.isEmbeddingPermitted

Alfred created PDFBOX-4882:
------------------------------

             Summary: Two conditions are always false in TrueTypeEmbedder.isEmbeddingPermitted
                 Key: PDFBOX-4882
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4882
             Project: PDFBox
          Issue Type: Bug
            Reporter: Alfred


 

IntelliJ the 2 conditions bellow are always false in TrueTypeEmbedder
{code:java}
private boolean isEmbeddingPermitted(TrueTypeFont ttf) throws IOException
{
    if (ttf.getOS2Windows() != null)
    {
        int fsType = ttf.getOS2Windows().getFsType();
        int exclusive = fsType & 0x8; // bits 0-3 are a set of exclusive bits

        if ((exclusive & OS2WindowsMetricsTable.FSTYPE_RESTRICTED) ==
                         OS2WindowsMetricsTable.FSTYPE_RESTRICTED)
        {
            // restricted License embedding
            return false;
        }
        else if ((exclusive & OS2WindowsMetricsTable.FSTYPE_BITMAP_ONLY) ==
                             OS2WindowsMetricsTable.FSTYPE_BITMAP_ONLY)
        {
            // bitmap embedding only
            return false;
        }
    }
    return true;
}
{code}
Can this be a bug?

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org