DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26590>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26590

last character width in winansi font is missed

           Summary: last character width in winansi font is missed
           Product: Fop
           Version: 0.20.5
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: pdf renderer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Hi to everybody who takes care on this beautiful software !

  Environment:
         GNU/Debian Linux 3.0
         FOP 0.20.5

  As I working with cyrrilic fonts I have troubles with winansi fonts.
  I know it doesn't support cyrrilic encoding (WINDOWS-1251), and
  supports only Latin1 character set. Meanwhile CID fonts are not
  supported properly as for copy-paste/find operation is PDF. So I was
  forced to make "cyrrilic" ttf within first 256 character and replace
  last 128 ones with "cyrrilic" symbols.

  Now I can work (copy-paste/find) with latin characters and see
  cyrrilic characters in winansi encoding. While I was experimenting I
  found a bug. Fop 0.20.5 doesn't calculate the width of the last
  character (0xFF). Since, there is no need in the latin charset to
  see this character, nobody knows about this bug.

  I found the solution:
  please refer
  
  src/org/apache/fop/render/pdf/fonts/SingleByteFont.java line 268
  System.arraycopy(width, 0, arr, 0, width.length - 1);
  
  and

  src/org/apache/fop/render/pdf/fonts/MultiByteFont.java line 328
  System.arraycopy(width, 0, arr, 0, width.length - 1);

  I belive there should be "width.length" instead of "width.length - 1".

  However it doesn't resolve the problem in full. I can see cyrrilic
  characters, but still can't operate with them. 
  Can anybody advise me ?
  Should I wait for official release which works with CID properly ?
  or there is another solution ?

Thanks
-------
Pavel Kud

Reply via email to