PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

printer_create_pen> <printer_create_dc
Last updated: Fri, 03 Oct 2008

view this page in

printer_create_font

(No version information available, might be only in CVS)

printer_create_font新規フォントを作成する

説明

resource printer_create_font ( string $face , int $height , int $width , int $font_weight , bool $italic , bool $underline , bool $strikeout , int $orientation )

この関数は、新しいフォントを作成してそのハンドルを返します。作成したフォントは テキストの描画に使用されます。使用例は printer_select_font() を参照ください。

パラメータ

face

face はフォントフェースを指定する文字列である必要があります。

height

height でフォントの高さを指定します。

width

width でフォントの幅を指定します。

font_weight

font_weight ではフォントのウェイト (通常は 400)を指定し、以下の定数のうちのいずれかを使用することが可能です。

  • PRINTER_FW_THIN: フォントウェイトを thin (100) に設定します。
  • PRINTER_FW_ULTRALIGHT: フォントウェイトを ultra light (200) に設定します。
  • PRINTER_FW_LIGHT: フォントウェイトを light (300) に設定します。
  • PRINTER_FW_NORMAL: フォントウェイトを normal (400) に設定します。
  • PRINTER_FW_MEDIUM: フォントウェイトを medium (500) に設定します。
  • PRINTER_FW_BOLD: フォントウェイトを bold (700) に設定します。
  • PRINTER_FW_ULTRABOLD: フォントウェイトを ultra bold (800) に設定します。
  • PRINTER_FW_HEAVY: フォントウェイトをheavy (900) に設定します。

italic

italic には、 フォントを斜体にするかどうかを TRUE あるいは FALSE で指定します。

underline

underline には、 フォントに下線を引くかどうかを TRUE あるいは FALSE で指定します。

strikeout

strikeout には、 フォントに打ち消し線を引くかどうかを TRUE あるいは FALSE で指定します。

orientaton

orientation ではフォントの回転を指定します。

返り値

成功した場合にフォントのハンドル、エラー時に FALSE を返します。



add a note add a note User Contributed Notes
printer_create_font
extremesanity
19-Sep-2006 10:12
Two tips:

- An orientation of -900 is up and down.

- You can print barcodes by installing a free barcode font like Code39 on the window machine with php installed and then selecting it as a font.
josh at engledental dot com
29-Jun-2002 08:30
Note that the orientation value is a 3-digit number where, for instance, an orientation of 90 requires a value of 900.

printer_create_pen> <printer_create_dc
Last updated: Fri, 03 Oct 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites