- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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,
SD 7,
Other than the tables printed in the back of the Comparison Guide I can't find a way, given the font name,to get
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page