mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166268 c90b9560-bf6c-de11-be94-00142212c4b1
71 lines
2.2 KiB
XML
71 lines
2.2 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
|
|
<refentry id="function.pdf-findfont">
|
|
<refnamediv>
|
|
<refname>pdf_findfont</refname>
|
|
<refpurpose>Prepare font for later use with <function>pdf_setfont</function></refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>pdf_findfont</methodname>
|
|
<methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>fontname</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>embed</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Prepare a font for later use with <function>pdf_setfont</function>.
|
|
The metrics will be loaded, and if <parameter>embed</parameter> is
|
|
nonzero, the font file will be checked, but not yet used.
|
|
<parameter>encoding</parameter> is one of <literal>builtin</literal>,
|
|
<literal>macroman</literal>, <literal>winansi</literal>,
|
|
<literal>host</literal>, a user-defined encoding name or the name of
|
|
a CMap.
|
|
Parameter <parameter>embed</parameter> was optional before PHP 5.
|
|
</para>
|
|
<para>
|
|
<function>pdf_findfont</function> returns a font handle or &false;
|
|
on error.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>pdf_findfont</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$font = pdf_findfont($pdf, "Times New Roman", "winansi", 1);
|
|
if ($font) {
|
|
pdf_setfont($pdf, $font, 10);
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|