Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 1338

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>HaruFont::measureText</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="Haru PDF Functions"
HREF="ref.haru.html"><LINK
REL="PREVIOUS"
TITLE="HaruFont::getXHeight"
HREF="function.harufont-getxheight.html"><LINK
REL="NEXT"
TITLE="HaruImage::getBitsPerComponent"
HREF="function.haruimage-getbitspercomponent.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.harufont-getxheight.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.haruimage-getbitspercomponent.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.harufont-measuretext"
></A
>HaruFont::measureText</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN70098"
></A
><P
>    (no version information, might be only in CVS)</P
>HaruFont::measureText&nbsp;--&nbsp;Calculate the number of characters which can be included within the specified width</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN70101"
></A
><H2
>说明</H2
>int <B
CLASS="methodname"
>HaruFont::measureText</B
> ( string text, float width, float font_size, float char_space, float word_space [, bool word_wrap] )<BR
></BR
><P
>&#13;   Returns the number of characters which can be included within the
   specified width.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN70125"
></A
><H2
>参数</H2
><P
>&#13;   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><CODE
CLASS="parameter"
>text</CODE
></DT
><DD
><P
>&#13;       The text to fit the width.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>width</CODE
></DT
><DD
><P
>&#13;       The width of the area to put the text to.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>font_size</CODE
></DT
><DD
><P
>&#13;       The size of the font.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>char_space</CODE
></DT
><DD
><P
>&#13;       The character spacing.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>word_space</CODE
></DT
><DD
><P
>&#13;       The word spacing.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>word_wrap</CODE
></DT
><DD
><P
>&#13;       When this parameter is set to <TT
CLASS="constant"
><B
>TRUE</B
></TT
> the function "emulates" word
       wrapping and doesn't include the part of the current word if reached
       the end of the area. Defaults to <TT
CLASS="constant"
><B
>FALSE</B
></TT
>.
      </P
></DD
></DL
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN70161"
></A
><H2
>错误/异常</H2
><P
>&#13;   Throws <B
CLASS="classname"
>HaruException</B
> on error. 
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.harufont-getxheight.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.haruimage-getbitspercomponent.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>HaruFont::getXHeight</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.haru.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>HaruImage::getBitsPerComponent</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>