本文整理汇总了PHP中Font::d方法的典型用法代码示例。如果您正苦于以下问题:PHP Font::d方法的具体用法?PHP Font::d怎么用?PHP Font::d使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Font
的用法示例。
在下文中一共展示了Font::d方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _encode
protected function _encode(){
if (empty($this->data)) {
Font::d(" >> Table is empty");
return 0;
}
return $this->getFont()->pack($this->def, $this->data);
}
示例2: encode
function encode($entry_offset)
{
Font::d("\n==== {$this->tag} ====");
$data = $this->font_table;
$font = $this->font;
$table_offset = $font->pos();
$table_length = $data->encode();
$font->seek($table_offset);
$table_data = $font->read($table_length);
$font->seek($entry_offset);
$font->write($this->tag, 4);
$font->writeUInt32(self::computeChecksum($table_data));
$font->writeUInt32($table_offset);
$font->writeUInt32($table_length);
Font::d("Bytes written = {$table_length}");
$font->seek($table_offset + $table_length);
}
开发者ID:EfncoPlugins,项目名称:web-portal-lite-client-portal-secure-file-sharing-private-messaging,代码行数:17,代码来源:font_table_directory_entry.cls.php
示例3: encode
function encode($tags = array())
{
if (!self::$raw) {
$tags = array_merge(array("head", "hhea", "cmap", "hmtx", "maxp", "glyf", "loca", "name", "post"), $tags);
} else {
$tags = array_keys($this->directory);
}
$num_tables = count($tags);
$n = 16;
// @todo
Font::d("Tables : " . implode(", ", $tags));
/** @var Font_Table_Directory_Entry[] $entries */
$entries = array();
foreach ($tags as $tag) {
if (!isset($this->directory[$tag])) {
Font::d(" >> '{$tag}' table doesn't exist");
continue;
}
$entries[$tag] = $this->directory[$tag];
}
$this->header->data["numTables"] = $num_tables;
$this->header->encode();
$directory_offset = $this->pos();
$offset = $directory_offset + $num_tables * $n;
$this->seek($offset);
$i = 0;
foreach ($entries as $entry) {
$entry->encode($directory_offset + $i * $n);
$i++;
}
}