IO_SWF 2.1.6 をリリースしました

不具合修正

  • purgeUselessContents の不具合修正です。
    • purgeUselessContents で(デバイスフォントでなく)組み込みフォントを使ったテキストオブジェクトが表示出来なくなる(具体的には DefineFont, DefineFont2 が削除される)事のある不具合を修正しました。

修正コード

IO_SWF/trunk/IO/SWF/Editor.php
@@ -132,6 +132,23 @@
$tag->referenceId = $refIds;
}
break;
+        case 11: // DefineText
+        case 33: // DefineText2
+            if ($tag->parseTagContent() === false) {
+                throw new IO_SWF_Exception("failed to parseTagContent");
+            }
+            if (is_null($tag->tag->_TextRecords) === false) {
+                $refIds = array();
+                foreach ($tag->tag->_TextRecords as $textRecord) {
+                    if (isset($textRecord['FontID'])) {
+                        $refIds []= $textRecord['FontID'];
+                    }
+                }
+                if (count($refIds) > 0) {
+                    $tag->referenceId = $refIds;
+                }
+            }
+            break;
}
return true;
}