Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TTF to PCL5 soft font format 15, Glyphs Problem?

Status
Not open for further replies.

tal6499

Programmer
Nov 9, 2011
42
PK
Hi,

I have extracted glyf data from ttf.

After extracting glyf index from 'cmap' i just copied the whole glyf for char definition command (s#w.

I ve followed the method described here: For extracting glyf id.


But nothing appears when i preveiw the PCL stream.

I tried PCLParaphernalia's analyzer but it crashes when i open my pcl file in it.

Attached is the PCLStream
 
... and are there any other differences between my sample fonts, and what your code generates from the equivalent donor TrueType fonts, except for:

(a) Those optional tables (cvt, fpgm, prep) in the GT segment.

(b) The optional segments I've included in my samples:

- PA (Panose)
- GC (Galley Character)
- CP (CopyRight)
 
... and in the chapter on "Soft Font Creation" in the "PCL5 Technical Reference Manual", the tables expected in the GT segment are described thus:

- The Global TrueType Data for every TrueType font entity must
contain a head, hhea, hmtx and maxp table.

- Another required table is the gdir table (... a size of 0 ...)

- The optional cvt, fpgm and prep tables, as defined in True Type Font Files, typically appear in the Global TrueType Data Segments of
hinted TrueType soft fonts, but should not appear in unhinted fonts.
 
k, thanks

Is there any simple way to detect whether a font is hinted?
If I have the .ttf only.
 
>> Is there any simple way to detect whether a font is hinted?

I don't know (there may be).

But if any of the 'cvt', 'fpgm' or 'prep' tables are present in the donor TrueType font, why not just include them in the generated 'soft' font anyway, as the documentation seems to suggest you should do?
 
>> - The optional cvt, fpgm and prep tables, as defined in True Type Font Files, typically appear in the Global TrueType Data Segments of
hinted TrueType soft fonts, but should not appear in unhinted fonts.

but it also states that it should not appear in unhinted.


Anyways, i have included these tables and noticed slight improvement relating to appearance.


Which PCL veiwer you are using?
I am using Escapee, it also states characters in your sample as unrecognised.


Can you elaborate the GC(Galley Character) segment? I have not found it in PCL 5 HP reference.



 
>> Which PCL veiwer you are using?

I occasionally use PCLWorkx v9.05; with your test_arial.pcl file, it shows a single page, blank except for the text "TEST:".

If the contents of the file are sent to my local (LaserJet 1320) printer, it locks up, and has to be rebooted.

The Galley Character segment is used to define one or more characters to be used as default characters to be printed if the font doesn't contain the character requested.

Most such segments only define one character (usually mapped to glyph 0) which is an overall default, although other characters can be defined as defaults for specific Unicode ranges.

You don't have to provide it, but (if present) it enables you to see if your data IS trying to print a character which is not defined in the font.
 
>> ... should not appear in unhinted fonts ...

I think that the text in the manual is probably slightly misleading.

I suspect that what it really means is that the tables will appear in hinted TrueType fonts, but will not be present in unhinted TrueType fonts, because they are not needed in such fonts.

So if these optional tables:

- cvt: Control Value Table
- fpgm: Font program
- prep: CVT program

ARE present in the donor .TTF, it probably means that the font IS hinted, and the tables should therefore be present in the generated PCL soft font.
 
>> ... characters in your sample as unrecognised ...

If I take the ariblk_ABCDE.sft soft font file from my samples, and (using the 'Font Sample' tool in 'PCL Paraphernalia') generate a test page to demonstrate this font:

(a) My local LJ1320 printer prints some explanatory text, and a grid showing the characters A, B, C, D and E in what (I think) is the Arial Black font.

The printer also shows a few other characters (< > _ | µ) which are NOT defined in the font - I can't explain this, although I have seen the behaviour before when the printer is presented with a font which contains very few characters.

(b) If the Target for the 'Font Sample' tool is changed to a File (rather than the Printer), the captured print stream can be viewed.
PCLWorkx v9.05 shows the same page as was printed on the LJ1320, except that the odd characters (< > _ | µ) which the printer printed are not shown.
 
... I don't seem to be able to upload the file to MadiaFire at the moment.
 
and here's the calibri.
Nothing appears with this font.

I have analyzed the stream.It looks ok to me.


Note:I have used a dummy name(AAAAA) for arial black and calibri.(Hope that must not be the problem, Arial Blk attached in previous posts works fine).
 
 http://www.mediafire.com/?90ks7i5d7f1fa5i
The "Arial Black" and "Times Roman Bold Italic" samples print OK on my LaserJet 1320.

They both print the test "TEST:" (using font Courier?), then the upper-case Latin alphabet and (separated by a form feed) the lower-case Latin alphabet, both using what appears to be the target font.

The "Calibri" sample only prints the text "TEST:"; but at least it doesn't lock up the printer!
I'll try to find some time tomorrow to look at this sample in more detail, and see if I can spot anything wrong.

... and I don't think that the font name is at all relevant in this context.
 
..issue resolved for Calibri font. I have unintentionally used the wrong sub-table for char mapping.


Attached is the working sample of Calibri for reference.
Unable to attached at media fire.


Another thread is open for sub-table Recommendation.
 
 http://www.megaupload.com/?d=TXSAY9E1
Your latest test_CALIBRIZ_all.pcl file prints OK on my local LJ1320.

It show the upper-case and lower-case Latin alphabet, and the digits (0->7 only; 8 and 9 are clipped by the right-margin, as your sample doesn't include cursor positioning , or Carriage Return controls).

... and I'm not sure about the 'underline thickness' value; the analyser reports it as 1024 units, which is perhaps unlikely.
 
yeah , I have used default value 0 for Underline Thickness. It should appear 102. right?
 
>> It should appear 102. right?

Yes, I think so (for the Calibri font).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top