簡體   English   中英

Apache FOP和Arial字體

[英]Apache FOP and Arial font

我的XSL樣式使用Arial字體

<fo:block font-family="Arial" font-size="8pt" font-weight="normal"> 

配置文件fonts.xml:

<?xml version="1.0"?>
<fop>
  <renderers>
    <renderer mime="application/pdf">
      <fonts>   
        <base>file:///C:/windows/fonts</base>
      </fonts>
    </renderer>
  </renderers>
</fop> 

也試過用這個:

 <auto-detect/>

 <directory>C:\windows\fonts</directory>

我總是得到:

WARNING: Font "Arial,normal,400" not found. Substituting with "any,normal,400".

我應該修復什么才能使用Arial字體?

這對我有用,需要在配置文件中明確指定Arial字體:

<?xml version="1.0"?>
    <fop>
      <renderers>
        <renderer mime="application/pdf">       
          <fonts>                           
                <font kerning="yes"  embed-url="file:///C:/windows/fonts/arial.ttf">
                      <font-triplet name="Arial" style="normal" weight="normal"/>
                    </font>                     
            </fonts>
        </renderer>
      </renderers>     
</fop> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM