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

Kerning does not work for user-specified CID fonts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.5
    • None
    • font/unqualified
    • None
    • Operating System: other
      Platform: Other
    • 40724

    Description

      Testing this in revision 462741, I have created a font file with only two glyphs
      A and V, and set kerning between them.

      The XML metrics file (excerpt below) shows that the indexes in <kerning> are
      glyph indexes, but AFAICS the layout code expects unicode indexes. I'll change
      that in the TTFFile font decoder class, to have unicode indexes in the <kerning>
      section.

      <multibyte-extras>
      <cid-type>CIDFontType2</cid-type>
      <default-width>0</default-width>
      <bfranges>
      <!-- mapping of glyph indexes to unicode -->
      <bf gi="0" ue="0" us="0"/>
      <bf gi="3" ue="65" us="65"/>
      <bf gi="4" ue="86" us="86"/>
      <bf gi="0" ue="65535" us="65535"/>
      </bfranges>
      <cid-widths start-index="0">
      <wx w="684"/>
      <wx w="1000"/>
      <wx w="1000"/>
      <wx w="684"/>
      <wx w="684"/>
      </cid-widths>
      </multibyte-extras>
      <!-- glyph index 3 is A in my font, 4 is V -->
      <kerning kpx1="3">
      <pair kern="-279" kpx2="4"/>
      </kerning>

      Attachments

        Issue Links

          Activity

            People

              fop-dev@xmlgraphics.apache.org fop-dev
              bdelacretaz@codeconsult.ch Bertrand Delacretaz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: