Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2969

Accented Letters of DIN SPEC 91379 composed of Unicode base letter and combining accent are rendered wrong as the first letter of a word.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5, 2.4, 2.6
    • 2.8
    • font/opentype, renderer/pdf
    • None

    Description

      E.g. with 0041 030B LATIN CAPITAL LETTER A WITH COMBINING DOUBLE ACUTE ACCENT the accent E.g. with 0041 030B LATIN CAPITAL LETTER A WITH COMBINING DOUBLE ACUTE ACCENT the accent appears at the right hand side of the letter A, not above the letter A.

      If e.g. an "X" is prepended, the sequence is rendered correctly - with the exception of the COMBINING HORN which should be at the right side of the base letter.

      The tested sequences are used in the following specification:

      DIN SPEC 91379: Characters in Unicode for the electronic processing of names and dataexchange in Europe; with digital attachment

      https://www.xoev.de/downloads-2316#StringLatin

      https://www.din.de/de/wdc-beuth:din21:301228458

      The output of FOP is provided in test-din-spec-sequences.fo.pdf, which is created by running TestFop.java that processes test-din-spec-sequences.fo.  

      Font used for testing: NotoSansMono-Regular.ttf, see https://www.google.com/get/noto/ 
      download: https://noto-website-2.storage.googleapis.com/pkgs/NotoSansMono-hinted.zip

       The following patch seems to resolve the problem for my test case:

      (delete "&& (unscaledWidths[index] != 0").

       

      --- ./trunk/fop-core/src/main/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java 2020-09-03 16:20:03.442089088 +0200
      +++ /home/volker/software/xmlgraphics-fop-trunk/fop-core/src/main/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java 2020-09-03 16:37:40.781775907 +0200
      @@ -151,7 +151,7 @@
           }      
      protected boolean isReorderedMark(GlyphDefinitionTable gdef, int[] glyphs, int[] unscaledWidths, int index) {
      -        return gdef.isGlyphClass(glyphs[index], GlyphDefinitionTable.GLYPH_CLASS_MARK) && (unscaledWidths[index] != 0);
      +        return gdef.isGlyphClass(glyphs[index], GlyphDefinitionTable.GLYPH_CLASS_MARK);      
      
      

      See also PDFBOX-4951

      Attachments

        1. TestFop.java
          2 kB
          Volker Kunert
        2. test-din-spec-sequences.fo-patched.pdf
          32 kB
          Volker Kunert
        3. test-din-spec-sequences.fo.pdf
          32 kB
          Volker Kunert
        4. test-din-spec-sequences.fo
          40 kB
          Volker Kunert
        5. fop-2969.patch
          1 kB
          Volker Kunert
        6. fop.xconf
          0.4 kB
          Volker Kunert
        7. DIN_SPEC_91379_Sequences-hb-view.txt
          10 kB
          Volker Kunert
        8. DIN_SPEC_91379_Sequences-ac-hb-view.pdf
          18 kB
          Volker Kunert
        9. DIN_SPEC_91379_Sequences-ab-hb-view.pdf
          16 kB
          Volker Kunert
        10. DIN_SPEC_91379_Sequences-aa-hb-view.pdf
          15 kB
          Volker Kunert
        11. DefaultScriptProcessor.java
          6 kB
          Volker Kunert

        Issue Links

          Activity

            People

              ssteiner Simon Steiner
              vk.lists@gmail.com Volker Kunert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: