You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2020/06/14 16:43:00 UTC
[jira] [Updated] (PDFBOX-4882) Two conditions are always false in
TrueTypeEmbedder.isEmbeddingPermitted
[ https://issues.apache.org/jira/browse/PDFBOX-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr updated PDFBOX-4882:
------------------------------------
Affects Version/s: 2.0.20
> 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
>
>
> 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