-
1
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
1
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Printers Archive
- How can I create a soft font file (sfp)?

Create an account on the HP Community to personalize your profile and ask a question

07-06-2016 07:27 PM
I have been using a proprietary program (pcx2sfp) for years to create sfp files from a pcx image of a signature or logo.
However, this program is 16-bit only, and as such will not run under Windows 10 (64-bit).
I can get the image in many different formats, but I need a program to convert the image to sfp.
Does anyone know what software can be used for this purpose?
07-07-2016 04:09 AM - edited 07-07-2016 04:56 AM
I don't personally know of any package that will convert a .pcx image to a character data entry in a LaserJet .sfp bitmap font file - but that's not to say that there may not be (many) such applications available.
The MKPCL application (see http://spectracolorservices.com/) can convert .pcx images to PCL raster images, and embed them in PCL macros.
There are applications available (e.g. Font Creator - see http://www.high-logic.com/font-editor/fontcreator.html) to convert images to entries in a TrueType font.
... and the Soft Font Generate tool in the PCL Paraphernalia application (see http://www.pclparaphernalia.eu/) can then generate a .sft (PCL scalable TrueType) font from a donor Truetype font.
07-07-2016 10:53 AM
Thank you for the reply.
The package using the file requires it be an .sfp file. The company that wrote the package wrote their own utility to convert pcx-to-sfp, but do not provide any updates to that conversion program. The company has in fact come out with a new package that eliminates the need for .sfp files and can now embed bmp or tiff files. We have much invested in the existing package so are not all that interested in converting to their newer package (with all the added expense).
So, the search continues.
07-08-2016 04:51 AM - edited 07-08-2016 04:52 AM
>> ... The package using the file requires it be an .sfp file ...
Is this because:
- The package actually reads and interprets the content of the .sfp file?
- Or is it just that it wants to send the content (unaltered) of a named file (historically / conventionally assumed to be a bitmap .sfp font file) direct to the printer, in order to make a soft font (containing the required signature/logo) available?
If the latter, then you could probably subsititute a .sft file (perhaps first renaming it with a .sfp extension to satisfy the package requirements).
Unless your printer is older than LaserJet 4, it should understand the .sft soft font format.
The only remaining complication then might be the PCL font selection sequence which the package includes in the print job in order to select the downloaded soft font.
If you can't change this sequence (i.e. it's hard-coded in the package), then we'd have to discover (perhaps by analysing a 'captured' print job) what this sequence is, then use this knoweldge to 'tailor' the font header in the generated .sft font.
07-08-2016 09:51 AM - edited 07-08-2016 09:55 AM
Three files received:
- logo_apb.pcx - the source pcx image file
- LOGO_APB.SFP - the (soft font) logo file generated
- LOGO_APB.MAC - apparently the same contents for every logo file that is generated
LOGO_APB.SFP : analysis of content:
Offset: dec Type Sequence Description ----------- --------------------- ---------------- ---------------------------------------------------- 0000000000 PCL Parameterised <Esc>)s105W Download Font Header (data length = 105) 0000000007 PCL Binary [ 64 bytes ] Font header descriptor Descriptor Size: 64 Header Format: 0: PCL Bitmap Font Type: 0: Bound; 7-bit (96 charset: 0x20-7f printable) First Code: 0 (0x0) Last Code: 0 (0x0) Symbol Set: Kind1 value: 277 (0x115) ----> Identifier: 8U (Roman-8) Spacing: 0: Fixed-pitch Pitch: 1.875 characters per inch Height: 72.00 PCL (1/72 inch) points Style: Value: 0 Structure: 0: Solid (Normal, Black) Width: 0: Normal Posture: 0: Upright Stroke Weight: 0: Medium (Book or Text) Typeface: Family Code: 658 Vendor Code: 4: Monotype Corporation Identifier: 17042 Font Name: LOGO_APB Orientation: 0: Portrait Serif Style: 0: Sans Serif Square Width Type: 0: Normal Quality: 0: Data Processing (Draft) Placement: 0: Normal Cell Width: 160 dots Text Width: 160 quarter dots ----> Average Spacing: 7.5 characters per inch Cell Height: 300 dots Text Height: 300 quarter dots ----> Optimum Spacing: 4.0 lines per inch Cap Height: Default (70.87% of Em) Baseline: 225 rows below top of cell Underline: Thickness: 3 dots 0000000071 Font Copyright (c) 1997 by Bottomline Technologies, Inc. 0000000112 PCL Parameterised <Esc>*c33E Character Code (code-point = 33 (0x21)) 0000000118 PCL Parameterised <Esc>(s6016W Download Character (data length = 6016) 0000000126 PCL Binary [ 1922 bytes ] 0000002048 PCL Binary [ 2048 bytes ] 0000004096 PCL Binary [ 2046 bytes ] 0000006142 PCL Parameterised <Esc>*c34E Character Code (code-point = 34 (0x22)) 0000006148 PCL Parameterised <Esc>(s5416W Download Character (data length = 5416) 0000006156 PCL Binary [ 2034 bytes ] 0000008190 PCL Binary [ 2048 bytes ] 0000010238 PCL Binary [ 1334 bytes ]
This shows:
- It is a Format 0 (bitmap) soft font definition; note that this is now a deprecated format (in fact, since the advent of the Laserjet 4 printer) although it is still supported by most LaserJet printers.
- It is bound to symbol set 8U.
- It is a fixed-pitch font, with pitch = 1.875 characters-per-inch, and height = 72 point.
- It has typeface identifier 17042.
- Two characters are defined.
- The first character is associated with decimal code-point 33 (= hexadecimal 21); i.e. the ASCII character !
- The second character is associated with decimal code-point 34 (= hexadecimal 22); i.e. the ASCII character "
LOGO_APB.MAC : analysis of content:
Offset: dec Type Sequence Description ----------- --------------------- ---------------- ---------------------------------------------------- 0000000000 PCL Parameterised <Esc>&f32002y Macro Control ID (identifer = 32002) 0000000009 0X Macro Control: Start Macro Definition 0000000011 PCL Parameterised <Esc>*p+0x Cursor Position Horizontal (+0 PCL units) 0000000017 p Palette Stack: Push (Store) 0000000018 +0Y Cursor Position Vertical (+0 PCL units) 0000000021 PCL Parameterised <Esc>(8U Primary Font: Symbol Set (8U = Roman-8) 0000000025 PCL Parameterised <Esc>(s0p Primary Font: Spacing: Fixed 0000000030 1.87h Primary Font: Pitch (1.87 characters per inch) 0000000035 72.00v Primary Font: Height (72.00 points) 0000000041 0s Primary Font: Style (Upright, solid) 0000000043 0b Primary Font: Stroke Weight: Medium 0000000045 17042T Primary Font: Typeface (identifier = 17042) 0000000051 Data !" 0000000053 PCL Parameterised <Esc>&f1x Macro Control: Stop Macro Definition 0000000058 10X Macro Control: Make Macro Permanent
This shows:
- Definition of a PCL macro, with macro identifier 32002
- It appears to contain a syntax error, in that the 'p' shown as representing a Palette Stack Push command is almost certainly (> 99.9999999999999%) erroneous.
- It issues a font selection sequence (which matches the characterisics of the .SFP soft font above), and prints the two characters associated with the two characters !" from that font - these are presumably your logo or signature.
So what the package probably does is to copy the content of these two files to the printer (probably just after any print job initialisation sequences), then issues a PCL seqeunce to call (or execute) macro 32002 wherever it wants to print your logo / signature.
So substituting a format 15 PCL Encapsulated TrueType Outline font definiiton instead of the format 0 one will almost certainly work, provided that the font header in this PCLETTO font is set up with the same selection characteristics.
07-08-2016 10:31 AM
Using your information as a base, I examined a signature file. It appears to contain the characters represented by hexadecimal values 21, 22, 23, 24 and 25:
Dec 33 Hex 21 Length 6576
Dec 34 Hex 22 Length 6576
Dec 35 Hex 23 Length 6576
Dec 36 Hex 24 Length 6576
Dec 37 Hex 25 Length 4608
The signature file contains a single signature, but perhaps it needs to be broken up into several "characters" due to some limitation in the format 0 of the soft font definition? It appears that 6576 bytes is some kind of upper limit.
The point being that it appears that the software package using these mac and sfp files are simply copying PCL data to the printer (we have had a combination of LaserJet 5, LaserJet 8000N, LaserJet 8150 and LaserJet 9050 printers over time).
Knowing that, how would I go about constructing something I can use to replace these sfp files?
07-08-2016 10:46 AM - edited 07-08-2016 10:50 AM
>> ... how would I go about constructing something I can use to replace these sfp files?
As I mentioned in my initial post, you'd have to create suitable TrueType fonts containing your logo(s) and signature(s).
You'd have to make sure that the fonts you created were fixed-pitch, rather than proportionally-spaced, to match the existing setup.
It may be the case (I can't remember what size limitations there may be, off-hand) that the whole logo or signature could be associated with just one character code, and the other character codes could then just be set to null glyph shapes.
I've used Font Creator in the past for this purpose (although not for some years now); it was relatively easy to use, but not free.
Then convert the TrueType font(s) to the equivalent PCLETTO .sft downloadable soft font(s).
I use (because I designed and wrote it) the Soft Font Generate tool in the PCL Paraphernalia application for this purpose; the dialogue allows the required symbol set and typeface identifiers to be set in the font header.
