Przeglądaj źródła

merge revision 25136 to release-1.12

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/release-1.12@25137 44c647ce-9c0f-0410-b52a-842ac1e357ba
rob 13 lat temu
rodzic
commit
9adfe74473
1 zmienionych plików z 18 dodań i 6 usunięć
  1. 18 6
      library/Zend/Pdf/FileParser/Font/OpenType.php

+ 18 - 6
library/Zend/Pdf/FileParser/Font/OpenType.php

@@ -582,12 +582,24 @@ abstract class Zend_Pdf_FileParser_Font_OpenType extends Zend_Pdf_FileParser_Fon
              * outlines from fonts yet, so this means no embed.
              */
             $this->isEmbeddable = false;
-        } else if ($this->isBitSet(1, $embeddingFlags)) {
-            /* Restricted license embedding. We currently don't have any way to
-             * enforce this, so interpret this as no embed. This may be revised
-             * in the future...
-             */
-            $this->isEmbeddable = false;
+        } elseif ($this->isBitSet(2, $embeddingFlags)
+                || $this->isBitSet(3, $embeddingFlags)
+                || $this->isBitSet(4)
+            ) {
+                /* One of:
+                 *     Restricted License embedding (0x0002)
+                 *     Preview & Print embedding (0x0004)
+                 *     Editable embedding (0x0008)
+                 * is set.
+                 */
+                $this->isEmbeddable = true;
+        } elseif ($this->isBitSet(1, $embeddingFlags)) {
+                /* Restricted license embedding & no other embedding is set.
+                 * We currently don't have any way to
+                 * enforce this, so interpret this as no embed. This may be revised
+                 * in the future...
+                 */
+                $this->isEmbeddable = false;
         } else {
             /* The remainder of the bit settings grant us permission to embed
              * the font. There may be additional usage rights granted or denied