The Create_font method in Php-extension-php_printer.dll, the relationship between the font width and the width of the printing paper

Source: Internet
Author: User
Connect a printer using Php_printer.dll, which has a way to create fonts

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

What is the height of the second parameter and the width of the third parameter, and what is the relation to the printer print width?

Because you want the text to be centered on the print paper, you need to calculate the x, Y coordinate value when printing using Printer_draw_text, so you need to know the width of the printer's width relative to the font size. Please advise!

Reply content:

Connect a printer using Php_printer.dll, which has a way to create fonts

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

What is the height of the second parameter and the width of the third parameter, and what is the relation to the printer print width?

Because you want the text to be centered on the print paper, you need to calculate the x, Y coordinate value when printing using Printer_draw_text, so you need to know the width of the printer's width relative to the font size. Please advise!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.