php-extension - create_font method in php_printer.dll, the relationship between font width and height units and printing paper width

WBOY
Release: 2016-07-06 13:54:07
Original
1138 people have browsed it

Use php_printer.dll to connect to the printer, which has a method to create fonts

<code>printer_create_font ( string face, int height, int width, int font_weight, bool italic, bool underline, bool strikeout, int orientaton)</code>
Copy after login
Copy after login

What are the units of the second parameter height and the third parameter width, and what is their relationship with the width and height of the printer paper?

Because you want to center the text on the printing paper, you need to calculate the x and y coordinate values ​​when printing using the printer_draw_text method, so you need to know the width value of the printing paper relative to the width of this font size. Please advise!

Reply content:

Use php_printer.dll to connect to the printer, which has a method to create fonts

<code>printer_create_font ( string face, int height, int width, int font_weight, bool italic, bool underline, bool strikeout, int orientaton)</code>
Copy after login
Copy after login

What are the units of the second parameter height and the third parameter width, and what is their relationship with the width and height of the printer paper?

Because you want to center the text on the printing paper, you need to calculate the x and y coordinate values ​​when printing using the printer_draw_text method, so you need to know the width value of the printing paper relative to the width of this font size. Please advise!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!