略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SWFFont::__construct

2024-12-22

SWFFont::__construct

(PHP 5 < 5.3.0, PECL ming SVN)

SWFFont::__constructLoads a font definition

说明

SWFFont::__construct ( string $filename )
Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

If filename is the name of an FDB file (i.e., it ends in ".fdb"), load the font definition found in said file. Otherwise, create a browser-defined font reference.

FDB ("font definition block") is a very simple wrapper for the SWF DefineFont2 block which contains a full description of a font. One may create FDB files from SWT Generator template files with the included makefdb utility- look in the util directory off the main ming distribution directory.

Browser-defined fonts don't contain any information about the font other than its name. It is assumed that the font definition will be provided by the movie player. The fonts _serif, _sans, and _typewriter should always be available. For example:

<?php
$f 
newSWFFont("_sans"); 
?>
will give you the standard sans-serif font, probably the same as what you'd get with <font name="sans-serif"> in HTML.

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/swffont.construct.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3