2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-07-22 12:09:30 +00:00
|
|
|
<!-- $Revision: 1.7 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
|
|
|
|
<refentry id="function.pdf-findfont">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>pdf_findfont</refname>
|
2004-07-27 04:48:55 +00:00
|
|
|
<refpurpose>Prepare font for later use with <function>pdf_setfont</function></refpurpose>
|
2002-04-15 00:12:54 +00:00
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>int</type><methodname>pdf_findfont</methodname>
|
2003-08-09 04:31:34 +00:00
|
|
|
<methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
<methodparam><type>string</type><parameter>fontname</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
|
2004-08-13 12:05:17 +00:00
|
|
|
<methodparam><type>int</type><parameter>embed</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2003-08-09 04:31:34 +00:00
|
|
|
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.
|
2005-07-22 12:09:30 +00:00
|
|
|
Parameter <parameter>embed</parameter> is optional before PHP 4.3.5 or
|
|
|
|
with PDFlib less than 5.
|
2002-04-15 00:12:54 +00:00
|
|
|
</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
|
|
|
|
-->
|