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

Image disappears if its AFP file uses True Type fonts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.5
    • None
    • renderer/afp
    • None
    • Operating System: Windows XP Service Pack 3
      Platform: PC
    • Important

    Description

      Hello,

      In the latest FOP 2.0 Release, it does not support True Type fonts (ex: Trebuchet MS) in AFP and could not display special characters (ex: Euro sign ) or barcodes. Then we tried with FOP Trunk - a version more recent than the latest release - and it supports well True Type fonts and can display Euro sign character in AFP output. But this Trunk version throws the other issue: "Gif images cannot display if its AFP file uses True Type fonts".

      Could you please have a look? and How can I work around this?

      Thank you!

      An example to reproduce the issue:
      Run test: >fop -fo test.out.fo -afp test.out.afp -c fop_with_TrueTypeFonts.xconf

      --Start: test.out.fo--
      <?xml version="1.0" encoding="UTF-8"?>
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ext="http://exslt.org/common">
      <fo:layout-master-set>
      <fo:simple-page-master page-width="209.90mm"
      page-height="301.98mm" margin-top="4.59mm" margin-left="5mm"
      margin-right="10mm" master-name="0">
      <fo:region-body />
      </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="0">
      <fo:flow flow-name="xsl-region-body">
      <fo:block-container absolute-position="absolute"
      left="10mm" top="19.91mm">
      <fo:block>
      <fo:external-graphic src="file:./bgimg72dpi.gif" />
      </fo:block>
      </fo:block-container>
      <fo:block font-size="12pt"
      font-family="Trebuchet MS">
      <fo:block-container absolute-position="absolute"
      left="15.17mm" top="29.18mm">
      <fo:block text-align="center">
      <fo:inline>Euro Sign: €</fo:inline>
      </fo:block>
      </fo:block-container>
      </fo:block>
      </fo:flow>
      </fo:page-sequence>
      </fo:root>
      --End: test.out.fo--

      --Start: fop_with_TrueTypeFonts.xconf--
      <renderer mime="application/x-afp">
      ...
      <fonts>
      <!-- declare TrueType fonts: Trebuchet MS font family-->
      <font kerning="yes" embed-url="file:./TREBUC.TTF" name="Trebuchet MS">
      <font-triplet name="Trebuchet MS" style="normal" weight="normal"/>
      </font>
      <font kerning="yes" embed-url="file:./TREBUCBD.TTF" name="Trebuchet MS Bold">
      <font-triplet name="Trebuchet MS" style="normal" weight="bold"/>
      </font>
      <font kerning="yes" embed-url="file:./TREBUCIT.TTF" name="Trebuchet MS Italic">
      <font-triplet name="Trebuchet MS" style="italic" weight="normal"/>
      </font>
      <font kerning="yes" embed-url="file:./TREBUCBI.TTF" name="Trebuchet MS Bold Italic">
      <font-triplet name="Trebuchet MS" style="italic" weight="bold"/>
      </font>
      </fonts>
      </renderer>
      --End: fop_with_TrueTypeFonts.xconf--

      Attachments

        1. trebucit.ttf
          136 kB
          Le Duy Nhac
        2. trebucbi.ttf
          128 kB
          Le Duy Nhac
        3. trebucbd.ttf
          120 kB
          Le Duy Nhac
        4. trebuc.ttf
          131 kB
          Le Duy Nhac
        5. test.out.modif.afp
          240 kB
          Le Duy Nhac
        6. test.out.fo
          1.0 kB
          Le Duy Nhac
        7. test.out.afp
          110 kB
          Le Duy Nhac
        8. fop-trunk-20151013.jar
          3.93 MB
          Le Duy Nhac
        9. fop.xconf
          28 kB
          Le Duy Nhac
        10. fop_with_TrueTypeFonts.xconf
          29 kB
          Le Duy Nhac
        11. fop_with_TrueTypeFonts.modif.xconf
          29 kB
          Le Duy Nhac
        12. bgimg72dpi.gif
          19 kB
          Le Duy Nhac
        13. AFP_issue_20151111.png
          30 kB
          Le Duy Nhac

        Activity

          People

            Unassigned Unassigned
            leduynhac Le Duy Nhac
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: