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

Non-embedded fonts are incorrectly assumed to be single byte, even when they are multi byte

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5
    • None
    • font/unqualified
    • None
    • Operating System: All
      Platform: All
    • 53142

    Description

      the following code in o.a.f.fonts.truetype.TTFFontLoader incorrectly assumes that a non-embedded font is a single byte font:

      boolean isCid = this.embedded;
      if (this.encodingMode == EncodingMode.SINGLE_BYTE)

      { isCid = false; }

      if (isCid)

      { multiFont = new MultiByteFont(); returnFont = multiFont; multiFont.setTTCName(ttcFontName); }

      else

      { singleFont = new SingleByteFont(); returnFont = singleFont; }

      this prevents the use of non-embedded (referenced only) multibyte fonts

      the attached input FO file and corresponding FOP configuration make use of the simsun.ttf font (a multibyte font) which can be downloaded from [1]

      [1] http://jumal.is.free.fr/SimSun.ttf

      Attachments

        1. console.log
          0.5 kB
          Glenn Adams
        2. fop.xconf
          0.4 kB
          Glenn Adams
        3. test.fo.xml
          0.5 kB
          Glenn Adams
        4. test.pdf
          6 kB
          Glenn Adams

        Activity

          People

            Unassigned Unassigned
            gadams Glenn Adams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: