Doube Height / Double Width font support

80 views
Skip to first unread message

Rich Mellor

unread,
Jan 22, 2019, 7:01:30 AM1/22/19
to libHaru
If I am using libHaru to create a PDF file from C, what is the best method of switching to a double height font (or double width).

I know you can change the font size, but that will not work if I want to simply make the characters double width (but with the same height), or vice versa, as you can do on an Epson printer

Adalbert Michelic

unread,
Jan 22, 2019, 7:09:13 AM1/22/19
to lib...@googlegroups.com
Hi Rich,

On 1/22/19 12:33 PM, Rich Mellor wrote:
> If I am using libHaru to create a PDF file from C, what is the best
> method of switching to a double height font (or double width).

I haven't actually verified that it works, but it should be posssible to
do that via changing the transformation matrix. Use HPDF_Page_Concat to
apply a transformation matrix. Double height should come up if you call
HPDF_Page_Concat(page, 1, 0, 0, 2, x, y) (x, y being the coordinates for
the text), and then draw the text at (0, 0). Surround the text drawing
block with HPDF_Page_GSave and HPDF_Page_GRestore.


Adalbert
Reply all
Reply to author
Forward
0 new messages