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

[PATCH] Character not found in AFP font but no warning is issued

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.5
    • None
    • font/unqualified
    • None

    Description

      I noticed that the AFP font system never files a warning whenever a character was not found in the font, unlike font systems for other output formats where a warning is always displayed whenever FOP detects a possible error.

      Apparently, this is mainly happening because there is no defined mapping between Unicode values and font code points for AFP, as can be seen in CharacterSet.mapChar(). That's why I propose to change it to:

      public char mapChar(char c) {
      //TODO This is not strictly correct but we'll let it be for the moment
      if (this.encoder.canEncode(c))

      { return c; }

      return 0;
      }

      So we can check later in AbstractOutlineFont.mapChar() whenever a character was found or not and display a warning if necessary.

      Any thoughts?

      Thanks

      Attachments

        1. patch.diff
          2 kB
          Seifeddine Dridi

        Activity

          People

            Unassigned Unassigned
            sdridi Seifeddine Dridi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: