略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SWFTextField::setFont

2024-12-21

SWFTextField::setFont

(PHP 5 < 5.3.0, PECL ming SVN)

SWFTextField::setFontSets the text field font

说明

SWFTextField::setFont ( SWFFont $font ) : void
Warning

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

swftextfield::setfont() sets the text field font to the [browser-defined?] font font.

返回值

没有返回值。

add a note add a note

User Contributed Notes 2 notes

up
0
jerryscript at aol dot com
15 years ago
Ming 0.3 (current cvs) allows you to embed fonts using addChars().

$t-new SWFTextField();
$t->setFont(new SWFFont("font_file.fdb"));
$lowercase="abcdefghijklmnopqrstuvwxyz";
$uppercase="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$numbers="1234567890";
$charsToAdd="$lowercase$uppercase$numbers";
$t->addChars($charsToAdd);

I'm not sure if you can use regExp to addChars?
[note-I broke the char list up due to this board's wordwrap]
up
0
Anze
15 years ago
From what I could gather, version 0.2a of Ming only allows to set browser font (that is, font is used only if user has it on his/her computer, otherwise some default is used). Embedding fonts does not work in this version, but judging from ChangeLog in CVS any CVS version from 2002-11-19 should be able to embed fdb font of your liking. Haven't tried it though.

官方地址:https://www.php.net/manual/en/swftextfield.setfont.php

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