Change your encoding to WinANSI
Leonard
On Aug 26, 2008, at 10:34 AM, Jerold Sampson wrote:
> Hi,
>
> I am attaching a simple Type 3 font test program. I build a type
> three font
> with four characters using one of two bitmaps. The first two
> characters are
> 0x20 and 0xa0 which are both defined as whitespace in Unicode. The
> second
> two are 0x31 (1) and 0x32 (2) and they use the same two bitmaps.
> I then write the string {0x20, 0x20, 0xa0, 0xa0, 0x31, 0x31, 0x32,
> 0x32}
>
> I am attaching the jar and the source along with the PDF I create.
> As you can see
> the two white space characters get folded into the same bitmap.
>
> Sorry it took so long to come up with this test. Vacations and
> travel intervened.
> I had to strip this logic out of a fairly extensive code library.
>
> One point I must note, I am using a fairly old version of iText, I
> am trying to avoid
> having to use multiple jars required by the later versions of iText.
>
> Thanks for the help,
>
> Sincerely,
> Jerold Sampson
>
>
> Previous Note:
> I am having some trouble converting an IBM AFP raster font to a Type
> 3 font using iText. I do this quite often with no difficulty however
> I have encountered a strange problem. The IBM font defines more
> than one whitespace character in many of its codepages,
> in this case 0x40 and 0x41 (these are ECDIC encodings). The 0x40
> maps to the standard 0x20 Unicode/ascii space character.
> The 0x41 maps to 0xA0 Unicode value which is also a Unicode
> whitespace character. In the IBM/AFP world these two white space
> characters can have different semantics and character increments/
> widths.
>
> Well so far so good. However when I build the type 3 glyphs for
> these two mapped characters u0020 and u00a0
> (u0020 first) the raster for the second (u00A0) clobbers the raster
> for u0020. Infact, when text is displayed the raster/image
> associated with the u00A0 glyph is displayed for the u0020
> character. The iText defineGlyph () call returns different
> objects for the two characters but the image for the second glyph is
> displayed when showing text using the first glyph.
>
> Now my question becomes this, is this a bug/feature in the iText
> code, that only a single white space character is maintained?
> Or, is there some other reason that the u0020 and u00a0 conflict?
> Is this a PDF/Adobe/PostScript 'feature'?
>
> Any help would be greatly appreciated.
>
> Sincerely,
> Jerold Sampson
>
> <
> Type3FontTest
> .zip
> .attach
> >
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php