Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5808

Add support for GSUB Lookup Type 3

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.2 PDFBox
    • 4.0.0, 3.0.3 PDFBox
    • FontBox

    Description

      Add support for the lookup type 3, Alternate Substitution when handling GSUB:

      https://learn.microsoft.com/en-us/typography/opentype/spec/gsub#AS

      The first available substitution glyph can be used (as done in other libraries)

       

      Also, the current implementation of CompoundCharacterTokenizer doesn't account for collision in ligatures

      For example, if a font supports ligatures for att and en, the current implementation will not tokenize properly for the word attention. This is because the regex implementation doesn't allow for a proper split

       

      I'll open a proposed implementation for the above

      Attachments

        1. image-2024-04-30-14-06-16-298.png
          212 kB
          Tilman Hausherr
        2. screenshot-1.png
          2 kB
          Tilman Hausherr
        3. screenshot-2.png
          2 kB
          Tilman Hausherr
        4. screenshot-3.png
          48 kB
          Tilman Hausherr
        5. screenshot-4.png
          2 kB
          Tilman Hausherr
        6. screenshot-5.png
          2 kB
          Tilman Hausherr

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              fabricec Fabrice Calafat
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: