PHP Velho Oeste 2024

SWFTextField::setFont

(PHP 5 < 5.3.0, PECL ming SVN)

SWFTextField::setFontDéfinit la police d'un champ texte

Description

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

Cette fonction est EXPERIMENTALE. Le comportement de cette fonction, son nom, et toute la documentation autour de cette fonction peut changer sans préavis dans une prochaine version de PHP. Cette fonction doit être utilisée à vos risques et périls.

swftextfield::setfont() définit la police d'un champ texte à font.

Valeurs de retour

Aucune valeur n'est retournée.

add a note add a note

User Contributed Notes 2 notes

up
0
jerryscript at aol dot com
20 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
20 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.
To Top