Thanks a lot for looking into this. The issue is resolved now. It seems if additional font families are used in the XSL, they cause this issue. In my case we needed only English & Hindi together on the PDF, we removed the other fonts used from the XSL & it is now producing the correct output.
On Sat, May 22, 2021 at 1:21 AM Csaba Nánai <szea...@gmail.com> wrote: > Hi, > > Have you installed the Amiko font set to app server correctly? > > Try to use one of the bulk font configuration ( > https://xmlgraphics.apache.org/fop/2.6/fonts.html#bulk). > > <renderers> > <renderer mime="application/pdf"> > <fonts> > <!-- register all the fonts found in a directory --> > <directory>C:\MyFonts1</directory> > > <!-- register all the fonts found in a directory and all of its sub > directories (use with care) --> > <directory recursive="true">C:\MyFonts2</directory> > > <!-- automatically detect operating system installed fonts --> > <auto-detect/> > </fonts> > </renderer></renderers> > > Csaba > > > Aejaz Muslim <aejaz.mus...@gmail.com> ezt írta (időpont: 2021. máj. 22., > Szo, 5:06): > >> Hi, >> >> I have a standalone program which uses Apache FOP 2.6 to write hindi text >> to a PDF using Amiko font using the following font metric configuration(On >> CentOS 7 / Java 11), >> >> <fop version="2.6"> >> >> <renderers> >> >> <renderer mime="application/pdf"> >> >> <fonts> >> >> <font metrics-url="Fonts/Amiko.xml" kerning="yes" >> embed-url="Fonts/Amiko.ttf" embedding-mode="full"> >> >> <font-triplet name="any" style="normal" weight="normal" /> >> >> </font> >> >> <auto-detect/> >> >> </fonts> >> >> </renderer> >> >> </renderers> >> >> </fop> >> >> >> The Hindi text produced by the above is correct & shows up as follows in >> the PDF, >> >> >> [image: image.png] >> >> If I remove <auto-detect/>, it changes to, >> >> [image: image.png] >> >> which is incorrect in almost every word. So, with the auto-detect tag in >> place & using the same method with generates the PDF but called from an >> application server(Wildfly 18 in my case), it always generates the >> incorrect hindi text as in the last image above. I have tried putting >> script attribute with deva/dev2 values but it further deteriorates the >> hindi text in the PDF. >> >> Please help me understand what is missing when the same code is run >> through app server. >> >> >> Thanks in advance, >> >> Aejaz >> >