[ https://issues.apache.org/jira/browse/PDFBOX-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17136066#comment-17136066 ]
ASF subversion and git services commented on PDFBOX-4882: --------------------------------------------------------- Commit 1878862 from Tilman Hausherr in branch 'pdfbox/trunk' [ https://svn.apache.org/r1878862 ] PDFBOX-4882: correct FSTYPE_RESTRICTED constant; remove segment that disabled the detection code > 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 > Affects Versions: 2.0.20 > Reporter: Alfred > Priority: Minor > Fix For: 2.0.21, 3.0.0 PDFBox > > > > IntelliJ says 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-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org