Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28712 Discussions

(Slightly OT) Writing Font data info to HPGL/2 and PCL files - from Fortran

Les_Neilson
Valued Contributor II
439 Views
Sorry if this is too much OT I am just wondering if anyone has experience of creating HPGL/2 or PCL files and can point me in the right direction.

I have an app which reads our neutral format drawing files which contain labelling data e.g.
Text flag
x,y,angle,height, other data
"The text string"
Font name, bold,italic flags

This is used for labelling and dimension text as well as Bill of Material lists and so onwhich appear on the drawing. There can be up to 9 different fonts specified in a drawing.

In the past we generated our own vectors for each character in the text string. The font data is a recent addition and I have it working fine with the Windows printer driver. However the system also allows for HPGL2 andPCL5file output.

The problem I now have is : how to specify the font info?
The PCL code has a "switch to HPGL2" written to the outputfile atinitialisation.
According to the Technical Reference and PCL5 Comparison Guides the font commands are :
SD 1, for the Symbol Set
SD 7, for the typeface

Other than the tables printed in the back of the Comparison Guide I can't find a way, given the font name,to get or programatically.
I triedthe LOGFONT and (get)TEXTMETRIC structures but the typeface numbers don't match anything in the table :-(

Does anyone have any experience of doing this sort of thing or can point me to some examples?

Thanks
Les
0 Kudos
1 Reply
Steven_L_Intel1
Employee
439 Views
I doubt that there is any direct connection between fonts Windows knows about and HPGL or PCL fonts. From what I read, the printers have a predefined set of fonts and it is possible to load your own font. The Windows printer driver probably just renders fonts as a bitmap. when printing to an HPGL or PCL printer, but that's only when you're using the Windows printing mechanism.
0 Kudos
Reply