×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

TTF to PCL soft font format 15, Correct segment data format ?

TTF to PCL soft font format 15, Correct segment data format ?

TTF to PCL soft font format 15, Correct segment data format ?

(OP)
Hi,

I am in process of converting donor TTF to PCL soft TrueType Scalable Format 15 font.

I have managed to extract following data from ttf:

--PCL Font header till 72 bytes. Segment data missing (Found with an analyzer)
--Character Code Data : still confused whether the glyf data from ttf work, if I extract it as it's in ttf?

I also need to know about the CheckSum field in character code as well as in font header.

Could anyone tell me exact format of Segment data for header with tables from tff, whether its cmap or any other?


Thanks in advance
 

RE: TTF to PCL soft font format 15, Correct segment data format ?

(OP)
I am following HP's PCL 5 manual. Didn't find any concrete info for segment data. It only mentioned what tables to be included. Not their format.

RE: TTF to PCL soft font format 15, Correct segment data format ?

Creating a downloaded PCL Encapsulated TrueType Outline (PCLETTO) format font from a 'donor' TrueType font is not a trivial process.

What may help is to look at the equivalent mechanism (including sample 'C' code) for PCL XL (PCL6) fonts, as described in one of the HP documents available for PCL6 (see the 'PCL6 documentation' FAQ for details of where to get access to this).

The PCL5 process is very similar, the main difference being in the 'wrappers' round the bulk of the extracted header and character descriptions.

RE: TTF to PCL soft font format 15, Correct segment data format ?

As regards segmented data: for a PCL Encapsulated TrueType Outline (PCLETTO) soft font, the segmented data (which is expected to follow the font header bytes) MUST include at least the GT segment, and the Null segment.

The GT segment must include the following TrueType tables:

gdir - as an empty placeholder table
head
maxp
hhea
hmtx
cvt - if it exists in donor font
fpgm - if it exists in donor font
prep - if it exists in donor font

The cmap table will be used to construct glyph->CharacterCode mappings, and so determine how to construct the TrueType characters required for whichever coded character set (symbol set) the font is to be associated with.

... and you'll need to extract information from some of the other TrueType tables as well - can't remember which ones, at present, but the sample code I mentioned in an earlier post should tell you.

RE: TTF to PCL soft font format 15, Correct segment data format ?

(OP)
thanks,

and can you explain check sum for font header,character codes & GT tables?

RE: TTF to PCL soft font format 15, Correct segment data format ?

The "PCL5 Technical Reference" manual indicates that the checksum byte for font headers should be set to the value which provides a modulo-256 sum of zero if all bytes from byte 64 to the end of the header (which includes the segmented data) are summed.

Similar mechanism for the Character data.

Explaining how to construct the font header, including segmented data, is far beyond what can reasonably be answered in a simple post.


As I mentioned before, it is far better to examine the available documentation and source code; navigate to the developer web site:

http://www.hpdevelopersolutions.com

Then select the "Public Software Development Kits" option.

Then select the "LaserJet and Digital Sender" kit area.

Then select the "Printer Languages | PCL 6 | PCL 6 documents" folder, which gives access to various PCL6 documents (most are in PDF format).

in particular, look for:
PCL6 Soft Font Download Specification
xlttlib Tool Documentation
xlttlib Font Tool


Whilst these documents (and the sample source code) related to generating soft fonts are for PCL XL, rather than PCL5, there is little difference, other than in the 'wrappers' - the format of the embedded font headers is (more-or-less) the same.

Use this information in conjunction with what is documented in the "PCL5 Technical Reference" and "PCL5 Comparison Guide" manuals, and you should be able to work out what is required - although it is quite hard work.

RE: TTF to PCL soft font format 15, Correct segment data format ?

... and to see some sample soft formats:

(a) Use an application (e.g. MS Word), in conjunction with a suitable printer driver, to generate a sample print job which includes embedded soft fonts.

This will usually happen if your source document uses a font (e.g. Calibri) which is not ordinarily resident on the target PCL5 printer (although the character coding will be obfuscated - i.e. will use seemingly random character codes, rather than the standard (extended) ASCII ones).

(b) When generating the sample print job, select the 'print to file' option in the Print dialogue to divert the generated print stream to a nominated file, instead of to the printer.

(c) Examine the captured .PRN print file with a suitable hexadecimal editor to see just what has been generated.

(d) To help with this examination, use the 'PRN File Analyse' tool, part of the (free) "PCL Paraphernalia" application, which can be downloaded from the "Downloads" page of http://www.pclparaphernalia.eu , together with a 'compiled-HTML' help file.

The application requires the .NET 4.0 runtime.

The 'PRN File Analyse' tool has an options dialogue to set various levels of analysis (e.g. Analyse Font Header) for PCL streams.

RE: TTF to PCL soft font format 15, Correct segment data format ?

Here's a sample report from the analyser:

CODE

*** Prn Analysis ***:

Date/Time:  2011-10-06 10:40:58
File:       D:\PCLTestData\output\LJ2420_02.prn
Size:       31513 bytes
Report:     282 rows (excluding header and trailer lines)

Offset       Type                   Sequence          Description
-----------  ---------------------  ----------------  ----------------------------------------------------

0000000000   PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
             Comment                                  Switch language to PJL
0000000009   PJL Command            @PJL JOB           NAME="Microsoft Word - Document1"[0a]
0000000052   PJL Command            @PJL SET           STRINGCODESET=UTF8[0a]
0000000080   PJL Command            @PJL COMMENT       "HP LaserJet 2420 PCL 5 (61.53.25.9); Windows 7 P
                                                      rofessional 6.1.7600.1; Unidrv 0.3.7600.16385"[0a]
0000000189   PJL Command            @PJL COMMENT       "Username: chris; App Filename: Microsoft Word -
                                                      Document1; 3-31-2011"[0a]
0000000273   PJL Command            @PJL DMINFO        ASCIIHEX="0400040101020D1010011532303131303333313
                                                      13631303436"[0a]
             >>>>>>>>>>>>>>>>>>>>                     >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
             Comment                                  Start analysis of embedded PML string
             Comment                                  of size 50 ASCIIHEX characters (25 bytes)
0000000000   PML Request            0x04              SetRequest
0000000001   PML Data Type/Length   0x0004            Object Identifier / 4
0000000003            Value         0x0101020d        1.1.2.13
0000000007   PML Data Type/Length   0x1010            String / 16
0000000009            Symbol Set    0x0115            277 (= 8U)
0000000011            Value         0x323031..        20110331161046
             Comment                                  End analysis of embedded PML string
             Comment                                  of size 50 ASCIIHEX characters (25 bytes)
             <<<<<<<<<<<<<<<<<<<<                     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
0000000347   PJL Command            @PJL SET           HOLD=OFF[0a]
0000000365   PJL Command            @PJL SET           USERNAME="chris"[0a]
0000000391   PJL Command            @PJL SET           JOBNAME="Microsoft Word - Document1"[0a]
0000000437   PJL Command            @PJL SET           QTY=1[0a]
0000000452   PJL Command            @PJL SET           PROCESSINGTYPE="STAPLING"[0a]
0000000487   PJL Command            @PJL SET           PROCESSINGOPTION="NONE"[0a]
0000000520   PJL Command            @PJL SET           PROCESSINGBOUNDARY=MOPY[0a]
0000000553   PJL Command            @PJL SET           RESOLUTION=600[0a]
0000000577   PJL Command            @PJL ENTER         LANGUAGE=PCL[0a]
             Comment                                  Switch language to PCL
0000000601   Data                                     [0d]
0000000602   PCL Simple             <Esc>E            Printer Reset
0000000604   PCL Parameterised      <Esc>*t600R       Raster Graphics Resolution (600 dots per inch)
0000000611   PCL Parameterised      <Esc>&u600D       Unit-of-Measure (600 PCL units per inch)
0000000618   PCL Parameterised      <Esc>*r0F         Raster Graphics Presentation: Logical
0000000623   PCL Parameterised      <Esc>&l0o         Orientation: Portrait
             *** Warning ***                          <Esc> found before end of complex sequence:
0000000628   PCL Parameterised      <Esc>&l26A        Page Size: A4
0000000634   PCL Parameterised      <Esc>&l7H         Paper Source: Automatic Selection
0000000639   PCL Parameterised      <Esc>&l0S         Simplex/Duplex: Simplex
0000000644   PCL Parameterised      <Esc>&l1X         Number of Copies (1)
0000000649   PCL Parameterised      <Esc>&l8c         Vertical Motion Index (8/48 inches)
0000000654                                 1E         Top Margin (1 lines)
0000000656   PCL Parameterised      <Esc>*p0x         Cursor Position Horizontal (0 PCL units)
0000000661                                 0Y         Cursor Position Vertical   (0 PCL units)
0000000663   PCL Parameterised      <Esc>*c0t         Set Picture Frame Anchor Point
0000000668                                 5611x      Picture Frame Size Width  (5611 decipoints)
0000000673                                 8178Y      Picture Frame Size Height (8178 decipoints)
0000000678   PCL Parameterised      <Esc>*b0M         Set Compression Mode: Unencoded
0000000683   Data                                     [0d]
0000000684   PCL Parameterised      <Esc>*v1N         Source Transparency Mode: Opaque
0000000689   PCL Parameterised      <Esc>*v1O         Pattern Transparency Mode: Opaque
0000000694   PCL Parameterised      <Esc>*l1R         Pixel Placement: Grid Centred
0000000699   PCL Parameterised      <Esc>*v0N         Source Transparency Mode: Transparent
0000000704   Data                                     [0d]
0000000705   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000000710   PCL Parameterised      <Esc>*v0O         Pattern Transparency Mode: Transparent
0000000715   PCL Parameterised      <Esc>*l240O       Logical Operation (ROP3): 240: T
0000000722   PCL Parameterised      <Esc>*c1D         Assign Font ID Number (identifier = 1)
0000000727   PCL Parameterised      <Esc>)s28700W     Download Font Header (data length = 28700)
0000000736   PCL Binary             [ 72 bytes ]      Font header descriptor
             Descriptor Size:                         72
             Header Format:                           15: Truetype Scalable
             Font Type:                               2: Bound; PC-8 (0x01-06, 0x10-1a, 0x1c-ff printable)
             First Code:                              32
             Last Code:                               255
             Symbol Set:            Kind1 value:      17
                  ---->             Identifier:       0Q
             Spacing:                                 1: Proportional
             Scaling:               Technology:       1: TrueType
                                    Variety:          0
             Scale Factor:                            2048 design units per Em
             Master Design:         Space Width:      463 design units
             Style:                 Value:            992
                                    Structure:        >=576: Unknown (Reserved)
                                    Width:            0: Normal
                                    Posture:          0: Upright
             Stroke Weight:                           0: Medium (Book or Text)
             Typeface:              Family Code:      254
             Font Name:                               Calibri         
             Orientation:                             0: Portrait
             Serif Style:                             0: Sans Serif Square
             Width Type:                              0: Normal
             Quality:                                 2: Letter Quality
             Placement:                               0: Normal
             Cell Width:                              3570 design units
             Text Width:                              1067 design units
             Cell Height:                             2603 design units
             Text Height:                             2500 design units
             Cap Height:                              1312 design units
             Underline:             Thickness:        102 design units
                                    Position:         409 design units below baseline
0000000808   PCL Binary             [ 28626 bytes ]   Font header segmented data
0000000808   Segment type:                            PA: Panose Description
0000000810           size:                            10 (14 including type & size fields)
0000000812           data:          Panose Class:     2-15-5-2-2-2-4-3-2-4
0000000822   Segment type:                            GT: Global TrueType
0000000824           size:                            28604 (28608 including type & size fields)
0000000826           data:          SFNT version:     0x00010000
0000000830           data:          Table Count:      8
0000000832           data:          Search Range:     128
0000000834           data:          Entry Selector:   3
0000000836           data:          Range Shift:      0
0000000838           data:          Table Tag:        cvt
0000000842           data:                Checksum:   0xB09BC4D2
0000000846           data:                Offset:     172 relative (= 998 absolute)
0000000850           data:                Size:       1308
0000000854           data:          Table Tag:        fpgm
0000000858           data:                Checksum:   0xF6F64D0C
0000000862           data:                Offset:     1480 relative (= 2306 absolute)
0000000866           data:                Size:       2330
0000000870           data:          Table Tag:        gdir
0000000874           data:                Checksum:   0x00000000
0000000878           data:                Offset:     0
0000000882           data:                Size:       0
0000000886           data:          Table Tag:        head
0000000890           data:                Checksum:   0xCC8B46AE
0000000894           data:                Offset:     3812 relative (= 4638 absolute)
0000000898           data:                Size:       54
0000000902           data:          Table Tag:        hhea
0000000906           data:                Checksum:   0x0DAD1244
0000000910           data:                Offset:     3868 relative (= 4694 absolute)
0000000914           data:                Size:       36
0000000918           data:          Table Tag:        hmtx
0000000922           data:                Checksum:   0x0B0CADC0
0000000926           data:                Offset:     3904 relative (= 4730 absolute)
0000000930           data:                Size:       15434
0000000934           data:          Table Tag:        maxp
0000000938           data:                Checksum:   0x21430397
0000000942           data:                Offset:     19340 relative (= 20166 absolute)
0000000946           data:                Size:       32
0000000950           data:          Table Tag:        prep
0000000954           data:                Checksum:   0x6BAF02FE
0000000958           data:                Offset:     19372 relative (= 20198 absolute)
0000000962           data:                Size:       9232
0000000966   Segment data           [ 1082 bytes ]    
0000002048   Segment data           [ 2048 bytes ]    
0000004096   Segment data           [ 2048 bytes ]    
0000006144   Segment data           [ 2048 bytes ]    
0000008192   Segment data           [ 2048 bytes ]    
0000010240   Segment data           [ 2048 bytes ]    
0000012288   Segment data           [ 2048 bytes ]    
0000014336   Segment data           [ 2048 bytes ]    
0000016384   Segment data           [ 2048 bytes ]    
0000018432   Segment data           [ 2048 bytes ]    
0000020480   Segment data           [ 2048 bytes ]    
0000022528   Segment data           [ 2048 bytes ]    
0000024576   Segment data           [ 2048 bytes ]    
0000026624   Segment data           [ 2048 bytes ]    
0000028672   Segment data           [ 758 bytes ]     
0000029430   Segment type:                            Null
0000029432           size:                            0 (4 including type & size fields))
0000029434   Reserved byte          [ 1 byte ]        0x00
0000029435   Checksum               [ 1 byte ]        0x16
0000029436   PCL Parameterised      <Esc>(s11V        Primary Font: Height (11 points)
0000029442   PCL Parameterised      <Esc>(1X          Primary Font: Select by ID (identifier = 1)
0000029446   PCL Parameterised      <Esc>&d@          Underline Disable
0000029450   PCL Parameterised      <Esc>*c32E        Character Code (code-point = 32)
0000029456   PCL Parameterised      <Esc>(s10W        Download Character (data length = 10)
0000029462   PCL Binary             [ 10 bytes ]      
0000029472   PCL Parameterised      <Esc>*p587Y       Cursor Position Vertical   (587 PCL units)
0000029479   PCL Parameterised      <Esc>*p458X       Cursor Position Horizontal (458 PCL units)
0000029486   Data                                      [0d]
0000029488   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000029493   PCL Parameterised      <Esc>*c1D         Assign Font ID Number (identifier = 1)
0000029498   PCL Parameterised      <Esc>*c33E        Character Code (code-point = 33)
0000029504   PCL Parameterised      <Esc>(s250W       Download Character (data length = 250)
0000029511   PCL Binary             [ 250 bytes ]     
0000029761   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000029768   PCL Parameterised      <Esc>*p458X       Cursor Position Horizontal (458 PCL units)
0000029775   Data                                     ![0d]
0000029777   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000029782   PCL Parameterised      <Esc>*c1D         Assign Font ID Number (identifier = 1)
0000029787   PCL Parameterised      <Esc>*c34E        Character Code (code-point = 34)
0000029793   PCL Parameterised      <Esc>(s376W       Download Character (data length = 376)
0000029800   PCL Binary             [ 376 bytes ]     
0000030176   PCL Parameterised      <Esc>*c35E        Character Code (code-point = 35)
0000030182   PCL Parameterised      <Esc>(s360W       Download Character (data length = 360)
0000030189   PCL Binary             [ 360 bytes ]     
0000030549   PCL Parameterised      <Esc>*c36E        Character Code (code-point = 36)
0000030555   PCL Parameterised      <Esc>(s144W       Download Character (data length = 144)
0000030562   PCL Binary             [ 144 bytes ]     
0000030706   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000030713   PCL Parameterised      <Esc>*p519X       Cursor Position Horizontal (519 PCL units)
0000030720   Data                                     "#$[0d]
0000030724   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030729   PCL Parameterised      <Esc>*c1D         Assign Font ID Number (identifier = 1)
0000030734   PCL Parameterised      <Esc>*c37E        Character Code (code-point = 37)
0000030740   PCL Parameterised      <Esc>(s154W       Download Character (data length = 154)
0000030747   PCL Binary             [ 154 bytes ]     
0000030901   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000030908   PCL Parameterised      <Esc>*p626X       Cursor Position Horizontal (626 PCL units)
0000030915   Data                                     %[0d]
0000030917   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030922   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000030929   PCL Parameterised      <Esc>*p650X       Cursor Position Horizontal (650 PCL units)
0000030936   Data                                      [0d]
0000030938   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030943   PCL Parameterised      <Esc>*p1011Y      Cursor Position Vertical   (1011 PCL units)
0000030951   PCL Parameterised      <Esc>*p458X       Cursor Position Horizontal (458 PCL units)
0000030958   Data                                      [0d]
0000030960   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030965   PCL Parameterised      <Esc>*c0T         Set Picture Frame Anchor Point
0000030970   PCL Parameterised      <Esc>%1B          Enter HP-GL/2 Mode: Pen = PCL
             Comment                                  Switch language to HP-GL/2
0000030974   HP-GL/2 Command        IN;               Initialise
0000030977   HP-GL/2 Command        TR0               Transparency Mode
0000030980   HP-GL/2 Command        SC0,1.693333,0,-  
0000030996                            1.693333,2;     Scale
0000031007   HP-GL/2 Command        RO0               Rotate Coordinate System
0000031010   HP-GL/2 Command        IR0,100,100,0;    Input Relative P1 and P2
0000031024   HP-GL/2 Command        WU0;              Pen Width Unit Selection
0000031028   HP-GL/2 Command        PW0.084667;       Pen Width
0000031039   HP-GL/2 Command        LT;               Line Type
0000031042   HP-GL/2 Command        LA2,1;            Line Attributes
0000031048   HP-GL/2 Command        LA1,1;            Line Attributes
0000031054   HP-GL/2 Command        LA3,0.000000;     Line Attributes
0000031067   HP-GL/2 Command        SP1               Select Pen
0000031070   HP-GL/2 Command        PP1;              Pixel Placement
0000031074   HP-GL/2 Command        FT1;              Fill Type
0000031078   HP-GL/2 Command        AC0,0;            Anchor Corner
0000031084   HP-GL/2 Command        IW;               Input Window
0000031087   HP-GL/2 Command        PA;               Plot Absolute
0000031090   HP-GL/2 Command        PU1567,1331;      Pen Up
0000031102   HP-GL/2 Command        PM0;              Polygon Mode
0000031106   HP-GL/2 Command        PD;               Pen Down
0000031109   HP-GL/2 Command        BZ1044,1331,620,  
0000031125                            1514,620,1741;  Bezier Absolute
0000031139   HP-GL/2 Command        PD;               Pen Down
0000031142   HP-GL/2 Command        BZ620,1967,1044,  
0000031158                            2150,1567,2150  
0000031172                            ;               Bezier Absolute
0000031173   HP-GL/2 Command        PD;               Pen Down
0000031176   HP-GL/2 Command        BZ2090,2150,2514  
0000031192                            ,1967,2514,174  
0000031206                            1;              Bezier Absolute
0000031208   HP-GL/2 Command        PD;               Pen Down
0000031211   HP-GL/2 Command        BZ2514,1514,2090  
0000031227                            ,1331,1567,133  
0000031241                            1;              Bezier Absolute
0000031243   HP-GL/2 Command        PM2;              Polygon Mode
0000031247   HP-GL/2 Command        FT10,0;           Fill Type
0000031254   HP-GL/2 Command        FP0;              Fill Polygon
0000031258   HP-GL/2 Command        LA2,4;            Line Attributes
0000031264   HP-GL/2 Command        LA1,4;            Line Attributes
0000031270   HP-GL/2 Command        WU0;              Pen Width Unit Selection
0000031274   HP-GL/2 Command        PW0.254000;       Pen Width
0000031285   HP-GL/2 Command        LA3,10.000000;    Line Attributes
0000031299   HP-GL/2 Command        SV1,100           Screened Vectors
0000031306   HP-GL/2 Command        PU1567,1331;      Pen Up
0000031318   HP-GL/2 Command        PD;               Pen Down
0000031321   HP-GL/2 Command        BZ1044,1331,620,  
0000031337                            1514,620,1741;  Bezier Absolute
0000031351   HP-GL/2 Command        PD;               Pen Down
0000031354   HP-GL/2 Command        BZ620,1967,1044,  
0000031370                            2150,1567,2150  
0000031384                            ;               Bezier Absolute
0000031385   HP-GL/2 Command        PD;               Pen Down
0000031388   HP-GL/2 Command        BZ2090,2150,2514  
0000031404                            ,1967,2514,174  
0000031418                            1;              Bezier Absolute
0000031420   HP-GL/2 Command        PD;               Pen Down
0000031423   HP-GL/2 Command        BZ2514,1514,2090  
0000031439                            ,1331,1567,133  
0000031453                            1;              Bezier Absolute
0000031455   HP-GL/2 Command        SV0;              Screened Vectors
             Comment                                  Switch language to PCL
0000031459   PCL Parameterised      <Esc>%0A          Enter PCL Mode: Cursor = PCL
0000031463   PCL Parameterised      <Esc>*v0o         Pattern Transparency Mode: Transparent
0000031468                                 0T         Select Current Pattern: Solid Black
0000031470   PCL Parameterised      <Esc>*p6815Y      Cursor Position Vertical   (6815 PCL units)
0000031478   Form Feed                                [0c]
0000031479   PCL Parameterised      <Esc>*c0Q         Pattern Control: Delete All Patterns
0000031484   PCL Simple             <Esc>E            Printer Reset
0000031486   PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
             Comment                                  Switch language to PJL
0000031495   PJL Command            @PJL EOJ          [0a]
             Comment                                  Switch language to PCL
0000031504   PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
             Comment                                  Switch language to PJL

*** End of Report ***

RE: TTF to PCL soft font format 15, Correct segment data format ?

... sample above has been truncated (Tek-Tips obviously sets a limit on length of data).

RE: TTF to PCL soft font format 15, Correct segment data format ?

... so here's the remainder of it:

CODE

0000000930           data:                Size:       15434
0000000934           data:          Table Tag:        maxp
0000000938           data:                Checksum:   0x21430397
0000000942           data:                Offset:     19340 relative (= 20166 absolute)
0000000946           data:                Size:       32
0000000950           data:          Table Tag:        prep
0000000954           data:                Checksum:   0x6BAF02FE
0000000958           data:                Offset:     19372 relative (= 20198 absolute)
0000000962           data:                Size:       9232
0000000966   Segment data           [ 1082 bytes ]    
0000002048   Segment data           [ 2048 bytes ]    
0000004096   Segment data           [ 2048 bytes ]    
0000006144   Segment data           [ 2048 bytes ]    
0000008192   Segment data           [ 2048 bytes ]    
0000010240   Segment data           [ 2048 bytes ]    
0000012288   Segment data           [ 2048 bytes ]    
0000014336   Segment data           [ 2048 bytes ]    
0000016384   Segment data           [ 2048 bytes ]    
0000018432   Segment data           [ 2048 bytes ]    
0000020480   Segment data           [ 2048 bytes ]    
0000022528   Segment data           [ 2048 bytes ]    
0000024576   Segment data           [ 2048 bytes ]    
0000026624   Segment data           [ 2048 bytes ]    
0000028672   Segment data           [ 758 bytes ]     
0000029430   Segment type:                            Null
0000029432           size:                            0 (4 including type & size fields))
0000029434   Reserved byte          [ 1 byte ]        0x00
0000029435   Checksum               [ 1 byte ]        0x16
0000029436   PCL Parameterised      <Esc>(s11V        Primary Font: Height (11 points)
0000029442   PCL Parameterised      <Esc>(1X          Primary Font: Select by ID (identifier = 1)
0000029446   PCL Parameterised      <Esc>&d@          Underline Disable
0000029450   PCL Parameterised      <Esc>*c32E        Character Code (code-point = 32)
0000029456   PCL Parameterised      <Esc>(s10W        Download Character (data length = 10)
0000029462   PCL Binary             [ 10 bytes ]      
0000029472   PCL Parameterised      <Esc>*p587Y       Cursor Position Vertical   (587 PCL units)
0000029479   PCL Parameterised      <Esc>*p458X       Cursor Position Horizontal (458 PCL units)
0000029486   Data                                      [0d]
0000029488   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000029493   PCL Parameterised      <Esc>*c1D         Assign Font ID Number (identifier = 1)
0000029498   PCL Parameterised      <Esc>*c33E        Character Code (code-point = 33)
0000029504   PCL Parameterised      <Esc>(s250W       Download Character (data length = 250)
0000029511   PCL Binary             [ 250 bytes ]     
0000029761   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000029768   PCL Parameterised      <Esc>*p458X       Cursor Position Horizontal (458 PCL units)
0000029775   Data                                     ![0d]
0000029777   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000029782   PCL Parameterised      <Esc>*c1D         Assign Font ID Number (identifier = 1)
0000029787   PCL Parameterised      <Esc>*c34E        Character Code (code-point = 34)
0000029793   PCL Parameterised      <Esc>(s376W       Download Character (data length = 376)
0000029800   PCL Binary             [ 376 bytes ]     
0000030176   PCL Parameterised      <Esc>*c35E        Character Code (code-point = 35)
0000030182   PCL Parameterised      <Esc>(s360W       Download Character (data length = 360)
0000030189   PCL Binary             [ 360 bytes ]     
0000030549   PCL Parameterised      <Esc>*c36E        Character Code (code-point = 36)
0000030555   PCL Parameterised      <Esc>(s144W       Download Character (data length = 144)
0000030562   PCL Binary             [ 144 bytes ]     
0000030706   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000030713   PCL Parameterised      <Esc>*p519X       Cursor Position Horizontal (519 PCL units)
0000030720   Data                                     "#$[0d]
0000030724   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030729   PCL Parameterised      <Esc>*c1D         Assign Font ID Number (identifier = 1)
0000030734   PCL Parameterised      <Esc>*c37E        Character Code (code-point = 37)
0000030740   PCL Parameterised      <Esc>(s154W       Download Character (data length = 154)
0000030747   PCL Binary             [ 154 bytes ]     
0000030901   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000030908   PCL Parameterised      <Esc>*p626X       Cursor Position Horizontal (626 PCL units)
0000030915   Data                                     %[0d]
0000030917   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030922   PCL Parameterised      <Esc>*p799Y       Cursor Position Vertical   (799 PCL units)
0000030929   PCL Parameterised      <Esc>*p650X       Cursor Position Horizontal (650 PCL units)
0000030936   Data                                      [0d]
0000030938   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030943   PCL Parameterised      <Esc>*p1011Y      Cursor Position Vertical   (1011 PCL units)
0000030951   PCL Parameterised      <Esc>*p458X       Cursor Position Horizontal (458 PCL units)
0000030958   Data                                      [0d]
0000030960   PCL Parameterised      <Esc>*p0Y         Cursor Position Vertical   (0 PCL units)
0000030965   PCL Parameterised      <Esc>*c0T         Set Picture Frame Anchor Point
0000030970   PCL Parameterised      <Esc>%1B          Enter HP-GL/2 Mode: Pen = PCL
             Comment                                  Switch language to HP-GL/2
0000030974   HP-GL/2 Command        IN;               Initialise
0000030977   HP-GL/2 Command        TR0               Transparency Mode
0000030980   HP-GL/2 Command        SC0,1.693333,0,-  
0000030996                            1.693333,2;     Scale
0000031007   HP-GL/2 Command        RO0               Rotate Coordinate System
0000031010   HP-GL/2 Command        IR0,100,100,0;    Input Relative P1 and P2
0000031024   HP-GL/2 Command        WU0;              Pen Width Unit Selection
0000031028   HP-GL/2 Command        PW0.084667;       Pen Width
0000031039   HP-GL/2 Command        LT;               Line Type
0000031042   HP-GL/2 Command        LA2,1;            Line Attributes
0000031048   HP-GL/2 Command        LA1,1;            Line Attributes
0000031054   HP-GL/2 Command        LA3,0.000000;     Line Attributes
0000031067   HP-GL/2 Command        SP1               Select Pen
0000031070   HP-GL/2 Command        PP1;              Pixel Placement
0000031074   HP-GL/2 Command        FT1;              Fill Type
0000031078   HP-GL/2 Command        AC0,0;            Anchor Corner
0000031084   HP-GL/2 Command        IW;               Input Window
0000031087   HP-GL/2 Command        PA;               Plot Absolute
0000031090   HP-GL/2 Command        PU1567,1331;      Pen Up
0000031102   HP-GL/2 Command        PM0;              Polygon Mode
0000031106   HP-GL/2 Command        PD;               Pen Down
0000031109   HP-GL/2 Command        BZ1044,1331,620,  
0000031125                            1514,620,1741;  Bezier Absolute
0000031139   HP-GL/2 Command        PD;               Pen Down
0000031142   HP-GL/2 Command        BZ620,1967,1044,  
0000031158                            2150,1567,2150  
0000031172                            ;               Bezier Absolute
0000031173   HP-GL/2 Command        PD;               Pen Down
0000031176   HP-GL/2 Command        BZ2090,2150,2514  
0000031192                            ,1967,2514,174  
0000031206                            1;              Bezier Absolute
0000031208   HP-GL/2 Command        PD;               Pen Down
0000031211   HP-GL/2 Command        BZ2514,1514,2090  
0000031227                            ,1331,1567,133  
0000031241                            1;              Bezier Absolute
0000031243   HP-GL/2 Command        PM2;              Polygon Mode
0000031247   HP-GL/2 Command        FT10,0;           Fill Type
0000031254   HP-GL/2 Command        FP0;              Fill Polygon
0000031258   HP-GL/2 Command        LA2,4;            Line Attributes
0000031264   HP-GL/2 Command        LA1,4;            Line Attributes
0000031270   HP-GL/2 Command        WU0;              Pen Width Unit Selection
0000031274   HP-GL/2 Command        PW0.254000;       Pen Width
0000031285   HP-GL/2 Command        LA3,10.000000;    Line Attributes
0000031299   HP-GL/2 Command        SV1,100           Screened Vectors
0000031306   HP-GL/2 Command        PU1567,1331;      Pen Up
0000031318   HP-GL/2 Command        PD;               Pen Down
0000031321   HP-GL/2 Command        BZ1044,1331,620,  
0000031337                            1514,620,1741;  Bezier Absolute
0000031351   HP-GL/2 Command        PD;               Pen Down
0000031354   HP-GL/2 Command        BZ620,1967,1044,  
0000031370                            2150,1567,2150  
0000031384                            ;               Bezier Absolute
0000031385   HP-GL/2 Command        PD;               Pen Down
0000031388   HP-GL/2 Command        BZ2090,2150,2514  
0000031404                            ,1967,2514,174  
0000031418                            1;              Bezier Absolute
0000031420   HP-GL/2 Command        PD;               Pen Down
0000031423   HP-GL/2 Command        BZ2514,1514,2090  
0000031439                            ,1331,1567,133  
0000031453                            1;              Bezier Absolute
0000031455   HP-GL/2 Command        SV0;              Screened Vectors
             Comment                                  Switch language to PCL
0000031459   PCL Parameterised      <Esc>%0A          Enter PCL Mode: Cursor = PCL
0000031463   PCL Parameterised      <Esc>*v0o         Pattern Transparency Mode: Transparent
0000031468                                 0T         Select Current Pattern: Solid Black
0000031470   PCL Parameterised      <Esc>*p6815Y      Cursor Position Vertical   (6815 PCL units)
0000031478   Form Feed                                [0c]
0000031479   PCL Parameterised      <Esc>*c0Q         Pattern Control: Delete All Patterns
0000031484   PCL Simple             <Esc>E            Printer Reset
0000031486   PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
             Comment                                  Switch language to PJL
0000031495   PJL Command            @PJL EOJ          [0a]
             Comment                                  Switch language to PCL
0000031504   PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
             Comment                                  Switch language to PJL

*** End of Report ***

RE: TTF to PCL soft font format 15, Correct segment data format ?

FYI - We developed (200+ hrs. of Sr. Sfwr. Engineering) a UTF-8 text to PCL5e converter which extracts the appropriate glyphs from various types of TTF's and embeds them in PCLETTO (SFT) format into the PCL5e generated.  It's in use by millions of people in a governement application that supports Chinese, Farsi, Kymer, etc.  Our program also supports some of the most important word processing functions (ie. word-wrap, etc.).

If you want to consider a Buy vs Build decision, give me a call to describe your application, workflow, integration and distribution requirements.  

Regards,
Bob Pooley
bp@pagetech.com

RE: TTF to PCL soft font format 15, Correct segment data format ?

>> ... Didn't find any concrete info for segment data. It only
>> mentioned what tables to be included. Not their format ...

The tables which you have to include in the GT segment (with their sizes, offsets and checksums in the table directory) are just copies of those tables from the donor TrueType font.

You'll have to interrogate some other tables (e.g. cmap, OS/2) to obtain certain items which are needed for the header, or for character->glyph mapping.

... and the format of TrueType font tables is given in the Microsoft specification - see http://www.microsoft.com/typography/otspec/

Note that the specification refers to OpenType - this is just a updated version of the original TrueType format, one which caters for embedded Type 1 fonts.

RE: TTF to PCL soft font format 15, Correct segment data format ?

(OP)
k, thanks

RE: TTF to PCL soft font format 15, Correct segment data format ?

(OP)
I ve the correct segment data now

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close