The code in the last email I sent you was incorrect, but I did get Tahoma font 
working by using ditac.options.
________________________________
From: Caroline Leccese <[email protected]>
Sent: Wednesday, January 17, 2024 6:23 PM
To: '[email protected]' <[email protected]>
Subject: Re: [ditac] fonts with fop in ditac

Thank you so much M Shafie!!! I never would have figured this out!

We had an antlib macrodef so I added:
<attribute name="fop-xconf" 
default="${base.lib}/ditac-3_14_0/plus/fop-2.8/fop/conf/fop.xconf"/>

and another argument to the executable:
<exec
                        executable="@{dita-processor}"
                        output="@{logfile}"
                        append="true"
                        failonerror="true">
                        ...
                        <arg line="-foconverter FOP pdf '${fo.processor.fop} -c 
@{fop-xconf}'" unless:blank="@{fop-xconf}" />
                        ...
                  </exec>                 
________________________________
From: Hussein Shafie <[email protected]>
Sent: Saturday, January 13, 2024 5:18 AM
To: Caroline Leccese <[email protected]>
Cc: '[email protected]' <[email protected]>
Subject: Re: [ditac] fonts with fop in ditac

On 1/13/24 03:11, Caroline Leccese wrote:
>
> Does ditac register the fop.xconf file?

No. How could it do that?



> I can't figure out why fop is
> not using the Tahoma font in the PDF, Tahoma is in my system and
> fop.xconf is set to auto-detect system fonts.
>
> Using Antenna House, Tahoma displays in the PDF, but we have to use fop.
>
> We installed the ditac version with fop.
>

ditac invokes FOP as an external command-line tool. Therefore you must
make sure that this FOP external command-line tool has access to your
fop.xconf.

When ditac is installed with the bundled FOP, ditac auto-detects the
bundled FOP and will invoke it as if ditac command-line option

-fop DITAC_INSTALL_DIR/plus/fop-2.9/fop/fop

(-fop DITAC_INSTALL_DIR/plus/fop-2.9/fop/fop.bat on Windows)

were implicitly specified.

Note that:

-fop DITAC_INSTALL_DIR/plus/fop-2.9/fop/fop

is a shorthand for low-level options:

-foconverter FOP pdf '"DITAC_INSTALL_DIR/plus/fop-2.9/fop/fop" -q -r -fo
"%I" -pdf "%O"'

and:

-foconverter FOP ps '"DITAC_INSTALL_DIR/plus/fop-2.9/fop/fop" -q -r -fo
"%I" -ps "%O"'

--> It's these low-level command line options, not the shorthand option,
which may be used for example to specify a configuration file for Apache
FOP.

For example (on Linux):

-foconverter FOP pdf '"DITAC_INSTALL_DIR/plus/fop-2.9/fop/fop" -q -r -c
"/home/john/conf/fop.xconf" -fo "%I" -pdf "%O"'

More information in:

- "Making Configuration Available to FOP",
https://xmlgraphics.apache.org/fop/2.9/configuration.html

- "Command-line options used to configure ditac",
https://www.xmlmind.com/ditac/_distrib/doc/manual/webhelp/commandLine.html#commandLine__I_ypiuz4_

- "The ditac.options file",
https://www.xmlmind.com/ditac/_distrib/doc/manual/webhelp/commandLine.html#commandLine__ditac_options_file

which is convenient to store long options like "-foconverter FOP pdf ...".

For example, creating "/home/hussein/.ditac/ditac.options" on my Linux
box where "ditac.options" contains:
---
-foconverter FOP pdf
'"/home/hussein/ditac_site/site/_download/ditac-3_14_1/plus/fop-2.9/fop/fop"
-q -r -c "/home/hussein/.xxe10/fop/fop.conf" -fo "%I" -pdf "%O"'
---

allowed me to automatically pass configuration file
"/home/hussein/.xxe10/fop/fop.conf" to FOP when ditac+bundled FOP is
used to generate a PDF file.




[www.cadituk.com] <https://www.cadituk.com>
Caroline Leccese
Stylesheet Developer
[email protected]

CADIT Inc





Confidentiality Statement: This e-mail may contain confidential information and 
may be legally privileged. It is intended solely for the addressee. Access to 
this e-mail by anyone else is unauthorized. If you are not the intended 
recipient you must not use, disclose, distribute, copy, print or rely on this 
e-mail. If an addressing or transmission error has misdirected this e-mail, 
please notify the author by replying to this e-mail.
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to