Fireball1977
Programmer
Hello, I have to write a java program that creates pcl files. Now I have to embed an external font (Arial Unicode MS) in the file. As I'm relatively new to PCL I'm stuck now with several questions. Hopefully they are easy to answer for you guys. If I refer to "the manual" I mean the "PCL 5 Printer Language Technical Reference Manual" from HP.
1.) The manual says that for unbound fonts (10 and 11) the first code / last code can be set to 0. Does this apply for TrueType (15) too? If not, what values do I have to use? From the OS/2 table for Arial Unicode MS I get 0 and 65535 as firstCharIndex and lastCharIndex?
2.) For calculating the checksum in the font header do I have to take every single byte from 64 to the last reserved byte as one single value or every "value field" as one value e.g. master underline position (0xFE, 0x67 = 2byte) => values = 254 + 103 (FE + 67) or value = 65127 (FE67)?
3.) What are the "design units" from the manual?
4.) Where do I get the font numbers from? Does it matter, if the number is set to zero?
5.) Symbol Set: The manual says it must be set to 56 for fonts 10 and 11 (unbound Intellifont scalable). => Applies for TrueType?
6.) Pitch: Where do I get this value from?
7.) Character Download: How do I determine the GlyphID?
8.) Are reserved bytes always set to 0 or doesn't it matter?
9.) The data written in the TrueType Glyph Data part is the data from the glyf table from the TrueTypeFont file?
10.) Among others I'm using escapeE from RedTitan as a PCLViewer, PCLAnalzyer. It always says that my checksum for my character download is not correct. Right now I'm converting every byte from Character Data Size, Glyph ID and TrueType Glyph Data to an unsigned integer. So the values of my bytes have a range of 0 to 255. I add all resulting integers, calculate result = sum mod 256 and convert the result back to a byte value and write it into the checksum field. Is this way right?
Hopefully someone can help me. I'm stuck with theese questions for quite a while as I don't find any precise information. Of course I searched the forum prior to posting this.
Regards
Alex
1.) The manual says that for unbound fonts (10 and 11) the first code / last code can be set to 0. Does this apply for TrueType (15) too? If not, what values do I have to use? From the OS/2 table for Arial Unicode MS I get 0 and 65535 as firstCharIndex and lastCharIndex?
2.) For calculating the checksum in the font header do I have to take every single byte from 64 to the last reserved byte as one single value or every "value field" as one value e.g. master underline position (0xFE, 0x67 = 2byte) => values = 254 + 103 (FE + 67) or value = 65127 (FE67)?
3.) What are the "design units" from the manual?
4.) Where do I get the font numbers from? Does it matter, if the number is set to zero?
5.) Symbol Set: The manual says it must be set to 56 for fonts 10 and 11 (unbound Intellifont scalable). => Applies for TrueType?
6.) Pitch: Where do I get this value from?
7.) Character Download: How do I determine the GlyphID?
8.) Are reserved bytes always set to 0 or doesn't it matter?
9.) The data written in the TrueType Glyph Data part is the data from the glyf table from the TrueTypeFont file?
10.) Among others I'm using escapeE from RedTitan as a PCLViewer, PCLAnalzyer. It always says that my checksum for my character download is not correct. Right now I'm converting every byte from Character Data Size, Glyph ID and TrueType Glyph Data to an unsigned integer. So the values of my bytes have a range of 0 to 255. I add all resulting integers, calculate result = sum mod 256 and convert the result back to a byte value and write it into the checksum field. Is this way right?
Hopefully someone can help me. I'm stuck with theese questions for quite a while as I don't find any precise information. Of course I searched the forum prior to posting this.
Regards
Alex