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

search for in the

printer_create_pen> <printer_create_dc
[edit] Last updated: Thu, 23 May 2013

view this page in

printer_create_font

(PECL printer SVN)

printer_create_fontCria uma nova fonte

Descrição

mixed printer_create_font ( string $face , int $height , int $width , int $font_weight , bool $italic , bool $underline , bool $strikeout , int $orientaton )

Esta função cria uma nova fonte e retorna um manipulador para ela. Uma fonte é usada para desenhar texto. Para um exemplo veja printer_select_font(). face deve ser uma string especificando a face da fonte. height especifica a altura da fonte, e width a largura da fonte. O font_weight especifica a espessura da fonte (400 é o normal), e pode ser uma das seguintes constantes pré-definidas.

  • PRINTER_FW_THIN: define a espessura para fino (100).
  • PRINTER_FW_ULTRALIGHT: define a espessura para ultra leve (200).
  • PRINTER_FW_LIGHT: define a espessura para leve (300).
  • PRINTER_FW_NORMAL: define a espessura para normal (400).
  • PRINTER_FW_MEDIUM: define a espessura para medium (500).
  • PRINTER_FW_BOLD: define a espessura para negrito (700).
  • PRINTER_FW_ULTRABOLD: define a espessura para ultra negrito (800).
  • PRINTER_FW_HEAVY: define a espessura para pesada (900).

italic pode ser TRUE ou FALSE, e define se a fonte deve ser itálica.

underline pode ser TRUE ou FALSE, e define se a fonte deve ser sublinhada.

strikeout pode ser TRUE ou FALSE, e define se a fonte deve ser riscada.

orientation especifica a rotação. Para um exemplo veja printer_select_font().



add a note add a note User Contributed Notes printer_create_font - [2 notes]
up
0
extremesanity
6 years ago
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.
up
0
josh at engledental dot com
10 years ago
Note that the orientation value is a 3-digit number where, for instance, an orientation of 90° requires a value of 900.

 
show source | credits | sitemap | contact | advertising | mirror sites