AFP with custom font TTF generates space-letter-space

"Jocelin HEINEN (ext)" <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <AS8PR02MB856596239A6A6B0EEDEC5ACBD66A9@AS8PR02MB8565.eurprd02.prod.outlook.com>
Hi,

I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.

AFPexplorer
MDR:  1= A r i a l  2= a r i a l N  3= a r i a l N

PTX tag:
 A  r  i  a  l  a  r  i  a  l  N  a  r  i  a  l  N  B
ESC
AMB   223
AMI   236
SCFL  1
SVI   11

I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo

fo.xconf
<?xml version="1.0" encoding="UTF-8"?>

<fop version="1.0">

<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>

<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>


<renderers>
<renderer mime="application/x-afp">

<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>

</renderers>

</fop>

XSL file

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>

</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>


Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.

This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.