[ 
https://issues.apache.org/jira/browse/FOP-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17892065#comment-17892065
 ] 

Julien Lacour edited comment on FOP-3202 at 12/31/24 8:35 AM:
--------------------------------------------------------------

[~jgoncalves] I simply use fop-2.10\fop\conf\fop.xconf with the following file:
{code:xml}
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="sample">
            <fo:region-body margin="1in"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="sample">
        <fo:flow flow-name="xsl-region-body">
            <fo:block font-family="Arial">Sample FO document</fo:block>
            <fo:block font-family="Montserrat">Sample FO document</fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>
{code}
By default I obtain a warning:
{code:java}
WARNING: Font "Montserrat,normal,400" not found. Substituting with 
"any,normal,400"
{code}
But if I set the directory I get the correct PDF:
{code:xml}
<directory>C:\Users\[USERNAME]\AppData\Local\Microsoft\Windows\Fonts</directory>
{code}
I did not succeed to set <font-base>, if I use a drive letter it fails.


was (Author: JIRAUSER300900):
[~jgoncalves] I simply use fop-2.10\fop\conf\fop.xconf with the following file:
{code:xml}
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="sample">
            <fo:region-body margin="1in"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="sample">
        <fo:flow flow-name="xsl-region-body">
            <fo:block font-family="Arial">Sample FO document</fo:block>
            <fo:block font-family="Montserrat">Sample FO document</fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>
{code}
By default I obtain a warning:
{code:java}
WARNING: Font "Montserrat,normal,400" not found. Substituting with 
"any,normal,400"
{code:xml}
But if I set the directory I get the correct PDF:
{code:java}
<directory>C:\Users\[USERNAME]\AppData\Local\Microsoft\Windows\Fonts</directory>
{code}
I did not succeed to set <font-base>, if I use a drive letter it fails.

> Fonts installed in AppData/Local are not used
> ---------------------------------------------
>
>                 Key: FOP-3202
>                 URL: https://issues.apache.org/jira/browse/FOP-3202
>             Project: FOP
>          Issue Type: Bug
>            Reporter: Julien Lacour
>            Assignee: Joao Goncalves
>            Priority: Minor
>
> I have some fonts installed in {{%localAppData%\Microsoft\Windows\Fonts}} and 
> they are not used by FOP unless I add them into {{fop.xconf}} as {{<directory 
> recursive="true">...</directory>}}.
> The fonts are installed in this directory if the user doesn't have rights to 
> install in {{C:\Windows\Fonts}}. That could be nice to have.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to