ADC Home > Reference Library > Technical Q&As > Legacy Documents > Printing >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q: We are close to releasing the Kanji Macintosh version of our application, but we are experiencing some unexpected behavior when attempting to print Single Byte Characters (SBC) using a Double Byte Font (DB) on a PostScript printer. We are trying to print vertically rotated text, which looks more or less like the following example (on the display), except that each letter is rotated 90 degrees (lying on its side): - - | T | | E | | X | | T | - - - We are doing this by using the following pseudo code:
When printing rotated single or double- byte characters to a postscript printer using a double- byte font, such as Osaka, we get the results that look something like this (except that each letter is also lying on its side): - - - - - - - - - - - - - - - - - - - - || | TEXT | || - - - - - - - - - - - - - - - - - - - - - In all cases, the rotated text displays properly on screen. The problem occurs while printing SB or DBC using a DB font. Printing rotated SBC using an SB font works properly. It appears that each character is rotated around its own center, rather than around the center given by the offset (for the box containing just the text). Is this the proper approach? A: The approach in your pseudo code looks correct, but there are other things you need to know about. Two-byte characters don't print correctly when using the There are some techniques you can use to avoid this limitation in the driver. These approaches reflect the methods that many developers are using to resolve this problem: Rotating with Since the data is in bitmap format, you can use the
Bear in mind that you only need to use this approach when you are printing
two-byte Japanese bitmap fonts. Therefore, you have to check the type of data
that is to be printed, and send the appropriate Use the following
The The technique described above has one problem -- if you record the previous
For more information on using picture comments, see Inside Macintosh: Imaging with QuickDraw, and the Macintosh Technote: QD 10 - Picture Comments The Real Deal. Rotating Characters Individually When you rotate a string of Japanese characters 90 degrees, the orientation of the characters stays the same. In other words, the entire string rotates, but the characters within the string retain the orientation they had before rotation. Therefore, each character in the string must be rotated back 90 degrees for it to be typographically correct. Most developers need to do their own line layout for rotated DBC. That is, move to a position, draw a character, move to the next position, draw the next character, and so on until the string is complete. |
|