Hi,

I use oXygen ti edit my documents, with the Noto fonts and I get correct printing;

see: https://git.yojik.eu/eric/FSI-Chinese-docbook/src/master/out/pdf/FSI-Chinese.pdf

So it "works".

I use Linux; I made a custom layer with this:

excerpt from my: framework/docbook/xsl/fo/mon-docbook-chinois.xsl

It's my version of:

framework/docbook/xsl/fo/docbook_custom.xsl


************
    <xsl:template match="d:foreignphrase">
        <fo:inline font-family="DejaVu Serif">
            <xsl:call-template name="inline.charseq"/>
        </fo:inline>
    </xsl:template>

    <xsl:template match="d:foreignphrase[@xml:lang='cmn-Hani']">
        <!--<fo:inline font-family="UKIJ CJK"> -->
        <fo:inline font-family="NotoSansCJKjp-Light">
<!--<fo:inline font-family="AR PL KaitiM GB"> jolie fonte mais moins lisible--> <!--<xsl:attribute name="background-color">#FFFFFF</xsl:attribute> -->
            <xsl:attribute name="color">#FF0000</xsl:attribute>
            <xsl:attribute name="font-size">1.3em</xsl:attribute>
            <xsl:call-template name="inline.charseq"/>
        </fo:inline>
    </xsl:template>

    <xsl:template match="d:foreignphrase[@xml:lang='cmn-Latn-pinyin']">
        <fo:inline>
            <xsl:attribute name="color">#0000FF</xsl:attribute>
<!--<xsl:attribute name="background-color">#FFFF00</xsl:attribute>-->
            <xsl:call-template name="inline.charseq"/>

        </fo:inline>
    </xsl:template>
*********************


I too configure the ./lib/fop.xconf to include the path of my fonts

*************
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
  <base>./</base>

  <font-base>file:/home/eric/.loca/share/fonts</font-base>


  <default-page-settings height="11in" width="8.26in"/>

  <renderers>
    <renderer mime="application/pdf">
      <filterList>
        <value>flate</value>
      </filterList>

      <fonts>
<directory recursive="true">/home/eric/.local/share/fonts</directory>
        <auto-detect/>
      </fonts>
    </renderer>
  </renderers>
</fop>
*************

Hope this help

Eric

Le 16/02/2021 à 15:13, Martin Furek a écrit :
I am using multiple fonts SansSerif,NotoSans,NotoSansCJK,Symbola to
get Chinese, Greek and Emoji characters. When I try to print a fop
that contains these following characters, I get an error. How should I
achieve the printing in multiple languages?
Text to Print:
"type🆕https://t.co/123 https://t.co/456";

Error:
Feb. 16, 2021 3:02:48 NACHM. org.apache.fop.cli.Main startFOP
SEVERE: Exception
org.apache.fop.apps.FOPException:
java.lang.ArrayIndexOutOfBoundsException: Index 13 out of bounds for
length 13
java.lang.ArrayIndexOutOfBoundsException: Index 13 out of bounds for length 13
         at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)
         at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)
         at org.apache.fop.cli.Main.startFOP(Main.java:183)
         at org.apache.fop.cli.Main.main(Main.java:214)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 13 out of
bounds for length 13
         at 
org.apache.fop.fonts.GlyphMapping.processWordMapping(GlyphMapping.java:172)
         at 
org.apache.fop.fonts.GlyphMapping.doGlyphMapping(GlyphMapping.java:92)
         at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:960)
         at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:819)
         at 
org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:698)
         at 
org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:627)
         at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
         at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:292)
         at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
         at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:223)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:148)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:116)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:69)
         at 
org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:252)
         at 
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:675)
         at 
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:179)
         at 
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:159)
         at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:385)
         at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:113)
         at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:143)
         at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
         at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:139)
         at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:362)
         at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
         at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
         at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown 
Source)
         at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
         at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
         at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)
         ... 3 more

---------

java.lang.ArrayIndexOutOfBoundsException: Index 13 out of bounds for length 13
         at 
org.apache.fop.fonts.GlyphMapping.processWordMapping(GlyphMapping.java:172)
         at 
org.apache.fop.fonts.GlyphMapping.doGlyphMapping(GlyphMapping.java:92)
         at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:960)
         at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:819)
         at 
org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:698)
         at 
org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:627)
         at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
         at 
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:292)
         at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
         at 
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:223)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:148)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:116)
         at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:69)
         at 
org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:252)
         at 
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:675)
         at 
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:179)
         at 
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:159)
         at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:385)
         at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:113)
         at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:143)
         at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
         at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:139)
         at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:362)
         at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
         at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
         at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown 
Source)
         at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
         at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
         at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)
         at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)
         at org.apache.fop.cli.Main.startFOP(Main.java:183)
         at org.apache.fop.cli.Main.main(Main.java:214)

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to