You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ming Yu <my...@yahoo.com> on 2009/08/14 14:21:06 UTC

font configuration

Hi, I'm trying to make an existing stylesheet to work with my xml file. But it has lines like this:

<fo:block font="bold 8pt arial"> and <fo:table-cell border-bottom=".6pt solid black">, etc. 

When I compile, the engine complains:

SEVERE: Ignoring property: font="bold 16pt arial" (No conversion defined bold; property:'font')

Because neither font nor border-bottom is a valid attribute, I have to define them somewhere. Is it in the font configuration file? I used this to set my font configuration file location in java: 

fopFactory.setFontBaseURL("file:///C:/xslfoFont/fo.xconf");

But I don't know how to define the font="bold 8pt arial" or border-bottom=".6pt solid black" in the file.

Can someone help me on this?

Thanks a lot!

Ming



      

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


Re: font configuration

Posted by Ming Yu <my...@yahoo.com>.
Hi, Andreas,

Thanks a lot for the reply. I did try this: font="bold 16pt 'Arial'" and the build passed. Thanks for the help and submitting the bug.

Ming



----- Original Message ----
From: Andreas Delmelle <an...@telenet.be>
To: fop-users@xmlgraphics.apache.org
Sent: Wednesday, August 19, 2009 2:25:51 PM
Subject: Re: font configuration

On 17 Aug 2009, at 14:55, Ming Yu wrote:

Hi Ming

> Thanks for the reply. Here is the strange thing.
> 
> When I put the order as font="16pt bold arial", the FO engine gives this warning:
> WARNING: Font 'bold arial,normal,400' not found. Substituting with 'any,normal,400'.
> 
> When I put the order as font="bold 16pt arial" , the FO engine gives the SEVERE error:
> SEVERE: Ignoring property: font="bold 16pt arial" (No conversion defined bold; property:'font')

In the meantime, I have checked closer, and this is indeed a bug, still present in FOP Trunk. As soon as you put single quotes around the font-family name, it works as expected. This very simple case, I apparently never included in the corresponding testcase, as it only checks for lists of font-families or quoted names with spaces... If I amend the testcase, the build fails. I have logged Bugzilla 47709 for follow-up[*].

Seems that at the time, I was too focused on making font-family lists work correctly, and forgot to check the most simple cases. :-/

[*] http://issues.apache.org/bugzilla/show_bug.cgi?id=47709



Regards,

Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608

---


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


      

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


Re: font configuration

Posted by Andreas Delmelle <an...@telenet.be>.
On 17 Aug 2009, at 14:55, Ming Yu wrote:

Hi Ming

> Thanks for the reply. Here is the strange thing.
>
> When I put the order as font="16pt bold arial", the FO engine gives  
> this warning:
> WARNING: Font 'bold arial,normal,400' not found. Substituting with  
> 'any,normal,400'.
>
> When I put the order as font="bold 16pt arial" , the FO engine gives  
> the SEVERE error:
> SEVERE: Ignoring property: font="bold 16pt arial" (No conversion  
> defined bold; property:'font')

In the meantime, I have checked closer, and this is indeed a bug,  
still present in FOP Trunk. As soon as you put single quotes around  
the font-family name, it works as expected. This very simple case, I  
apparently never included in the corresponding testcase, as it only  
checks for lists of font-families or quoted names with spaces... If I  
amend the testcase, the build fails. I have logged Bugzilla 47709 for  
follow-up[*].

Seems that at the time, I was too focused on making font-family lists  
work correctly, and forgot to check the most simple cases. :-/

[*] http://issues.apache.org/bugzilla/show_bug.cgi?id=47709



Regards,

Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608

---


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


Re: [!! SPAM] Re: Re: font configuration

Posted by Chris Bowditch <bo...@hotmail.com>.
Ming Yu wrote:

Hi,

> I did try this. But I'm not sure how to use it in the font= representation. This is what I have in my fop.xconf file:

We did discuss this before. Use the following to reference Arial Bold

<quote who="Ming Yu">
Even when I use individual tag as font-size="16pt" font-weight="bold" 
font-family="Arial", FO engine also gives this warning:
 > WARNING: Font 'Arial,normal,700' not found. Substituting with 
'any,normal,700'.
</quote>

> 
>       <font kerning="yes" embed-url="file:///C:/WINDOWS/Fonts/arial.ttf">
>           <font-triplet name="Arial" style="normal" weight="normal"/>
>           <font-triplet name="ArialMT" style="normal" weight="normal"/>
>         </font>
> 
>         <font kerning="yes" embed-url="file:///C:/WINDOWS/Fonts/arialbd.ttf">
>           <font-triplet name="Arial" style="normal" weight="bold"/>
>           <font-triplet name="ArialMT" style="normal" weight="bold"/>
>         </font>
> 
> Thanks!
> 
> Ming

Thanks,

Chris

> 
> 
> 
> ----- Original Message ----
> From: Chris Bowditch <bo...@hotmail.com>
> To: fop-users@xmlgraphics.apache.org
> Sent: Monday, August 17, 2009 11:37:14 AM
> Subject: Re: [!! SPAM]  Re: font configuration
> 
> Ming Yu wrote:
> 
>>Thanks for the reply. Yes, I just configured my fop.xconf file by removing the metrics-url attribute and the Arial font works. 
>>But I still cannot make the "bold" work. Whenever I put bold into the font=, either warning or SEVERE message will appear.
> 
> 
> Arial and Arial Bold are separate Fonts. This isn't clear to Font newbies because of MS Word's ability to mimic Bold and Italic Font variants from the regular Font. So if you need Bold and Italic variants of Arial you must register them separately within fop.xconf, e.g.
> 
> <font kerning="yes"
>        embed-url="file:///C:/windows/fonts/arialbd.ttf">
>       <font-triplet name="Arial" style="normal" weight="bold"/>
>    </font>
> 
>>Do you have any idea how I can configure to make the bold (or the font-weight) work in the shorthand representation?
>>
>>Thanks a lot!
>>
>>Ming
>>
> 
> 
> HTH,
> 
> Chris
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 




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


Re: [!! SPAM] Re: font configuration

Posted by Ming Yu <my...@yahoo.com>.
I did try this. But I'm not sure how to use it in the font= representation. This is what I have in my fop.xconf file:

      <font kerning="yes" embed-url="file:///C:/WINDOWS/Fonts/arial.ttf">
          <font-triplet name="Arial" style="normal" weight="normal"/>
          <font-triplet name="ArialMT" style="normal" weight="normal"/>
        </font>

        <font kerning="yes" embed-url="file:///C:/WINDOWS/Fonts/arialbd.ttf">
          <font-triplet name="Arial" style="normal" weight="bold"/>
          <font-triplet name="ArialMT" style="normal" weight="bold"/>
        </font>

Thanks!

Ming



----- Original Message ----
From: Chris Bowditch <bo...@hotmail.com>
To: fop-users@xmlgraphics.apache.org
Sent: Monday, August 17, 2009 11:37:14 AM
Subject: Re: [!! SPAM]  Re: font configuration

Ming Yu wrote:
> Thanks for the reply. Yes, I just configured my fop.xconf file by removing the metrics-url attribute and the Arial font works. 
> But I still cannot make the "bold" work. Whenever I put bold into the font=, either warning or SEVERE message will appear.

Arial and Arial Bold are separate Fonts. This isn't clear to Font newbies because of MS Word's ability to mimic Bold and Italic Font variants from the regular Font. So if you need Bold and Italic variants of Arial you must register them separately within fop.xconf, e.g.

<font kerning="yes"
       embed-url="file:///C:/windows/fonts/arialbd.ttf">
      <font-triplet name="Arial" style="normal" weight="bold"/>
   </font>

> 
> Do you have any idea how I can configure to make the bold (or the font-weight) work in the shorthand representation?
> 
> Thanks a lot!
> 
> Ming
> 

HTH,

Chris



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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [!! SPAM] Re: font configuration

Posted by Chris Bowditch <bo...@hotmail.com>.
Ming Yu wrote:
> Thanks for the reply. Yes, I just configured my fop.xconf file by removing the metrics-url attribute and the Arial font works. 
> 
> But I still cannot make the "bold" work. Whenever I put bold into the font=, either warning or SEVERE message will appear.

Arial and Arial Bold are separate Fonts. This isn't clear to Font 
newbies because of MS Word's ability to mimic Bold and Italic Font 
variants from the regular Font. So if you need Bold and Italic variants 
of Arial you must register them separately within fop.xconf, e.g.

<font kerning="yes"
        embed-url="file:///C:/windows/fonts/arialbd.ttf">
       <font-triplet name="Arial" style="normal" weight="bold"/>
    </font>

> 
> Do you have any idea how I can configure to make the bold (or the font-weight) work in the shorthand representation?
> 
> Thanks a lot!
> 
> Ming
> 

HTH,

Chris



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


Re: font configuration

Posted by Ming Yu <my...@yahoo.com>.
Thanks for the reply. Yes, I just configured my fop.xconf file by removing the metrics-url attribute and the Arial font works. 

But I still cannot make the "bold" work. Whenever I put bold into the font=, either warning or SEVERE message will appear.

Do you have any idea how I can configure to make the bold (or the font-weight) work in the shorthand representation?

Thanks a lot!

Ming



----- Original Message ----
From: Chris Bowditch <bo...@hotmail.com>
To: fop-users@xmlgraphics.apache.org
Sent: Monday, August 17, 2009 9:22:41 AM
Subject: Re: [!! SPAM]  Re: font configuration

Ming Yu wrote:
> Thanks for the reply. Here is the strange thing.
> 
> When I put the order as font="16pt bold arial", the FO engine gives this warning:
> WARNING: Font 'bold arial,normal,400' not found. Substituting with 'any,normal,400'.
> 
> When I put the order as font="bold 16pt arial" , the FO engine gives the SEVERE error:
> SEVERE: Ignoring property: font="bold 16pt arial" (No conversion defined bold; property:'font')
> 
> Even when I use individual tag as font-size="16pt" font-weight="bold" font-family="Arial", FO engine also gives this warning:
> WARNING: Font 'Arial,normal,700' not found. Substituting with 'any,normal,700'.

At least with this warning FOP is looking for the Font you have 
requested. With previous warnings FOP is not parsing the shorthand 
property correctly.

> 
> According to Apache's documentation, I need to generate the arial.xml file myself like this:

The documentation is either wrong or you are looking at an older version 
of the documentation. In 0.95 and higher it is not necessary to generate 
a metrics file to use a custom font. You simply need to register the 
Font with FOP by adding a line similar to below in fop.xconf file in the 
section for the Renderer you are using:

<font kerning="yes"
       embed-url="file:///C:/windows/fonts/arial.ttf">
      <font-triplet name="Arial" style="normal" weight="normal"/>
   </font>


> 
> 
> java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
>           org.apache.fop.fonts.apps.TTFReader [options]
>           C:\myfonts\cmr10.ttf ttfcm.xml
> 
> I tried to run it but I got errors.
> 
> Do you know how I can get the arial.xml file?
> 
> Thanks a lot!

HTH,

Chris

> 
> Ming
> 
> 
> 
> ----- Original Message ----
> From: Andreas Delmelle <an...@telenet.be>
> To: fop-users@xmlgraphics.apache.org
> Sent: Friday, August 14, 2009 3:18:03 PM
> Subject: Re: font configuration
> 
> On 14 Aug 2009, at 20:43, Ming Yu wrote:
> 
> 
>>Thanks a lot for the reply. I checked my version and found out that it's 0.94. So, I upgraded to 0.95. Now the SEVERE error changes to a warning:
>>
>>WARNING: Font 'bold Arial,normal,400' not found. Substituting with 'any,normal,400'.
> 
> 
> Strange... seems like the font-family is parsed as 'bold Arial'. This may need to be looked into closer. Are you sure this is nowhere specified as such in the FO?
> 
> A value like 'font="16pt bold Arial"' could lead to the above result.
> The right order is style/weight/variant, then size, then font-family, and font-family names with spaces are supported, so formally there is nothing wrong with that value for the shorthand, even though the order is mixed up.
> 
> 
>>Should I install the font myself somewhere? I'm using Eclipse as my IDE.
>>
>>I also have another question regarding empty table-cell. The following lines:
>>
>><fo:table-cell></fo:table-cell>
>><fo:table-cell border-right=".6pt solid black"></fo:table-cell>
>><fo:table-cell border-right=".6pt solid black" border-bottom=".6pt solid black"/>
>>
>>will produce the following error:
>>
>>fo:table-cell is missing child elements.
>>Required Content Model: marker* (%block;)+
>>
>>How can I allow empty cells?
> 
> 
> You can turn off strict validation(*), but that is not recommended, since it will skip a lot of other validation rules as well, which could lead to unpredictable results and makes your FO less portable to other implementations.
> 
> Better would be to make sure that each cell always contains an empty fo:block.
> 
> 
> (*) http://xmlgraphics.apache.org/fop/0.95/configuration.html
> 
> 
> HTH!
> 
> 
> Andreas
> 
> 
> 
> Andreas Delmelle
> mailto:andreas.delmelle.AT.telenet.be
> jabber: mandreas@jabber.org
> skype: adlm0608
> 
> ---
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
>      
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 




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


      

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


Re: [!! SPAM] Re: font configuration

Posted by Chris Bowditch <bo...@hotmail.com>.
Ming Yu wrote:
> Thanks for the reply. Here is the strange thing.
> 
> When I put the order as font="16pt bold arial", the FO engine gives this warning:
> WARNING: Font 'bold arial,normal,400' not found. Substituting with 'any,normal,400'.
> 
> When I put the order as font="bold 16pt arial" , the FO engine gives the SEVERE error:
> SEVERE: Ignoring property: font="bold 16pt arial" (No conversion defined bold; property:'font')
> 
> Even when I use individual tag as font-size="16pt" font-weight="bold" font-family="Arial", FO engine also gives this warning:
> WARNING: Font 'Arial,normal,700' not found. Substituting with 'any,normal,700'.

At least with this warning FOP is looking for the Font you have 
requested. With previous warnings FOP is not parsing the shorthand 
property correctly.

> 
> According to Apache's documentation, I need to generate the arial.xml file myself like this:

The documentation is either wrong or you are looking at an older version 
of the documentation. In 0.95 and higher it is not necessary to generate 
a metrics file to use a custom font. You simply need to register the 
Font with FOP by adding a line similar to below in fop.xconf file in the 
section for the Renderer you are using:

<font kerning="yes"
       embed-url="file:///C:/windows/fonts/arial.ttf">
      <font-triplet name="Arial" style="normal" weight="normal"/>
   </font>


> 
> 
> java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
>           org.apache.fop.fonts.apps.TTFReader [options]
>           C:\myfonts\cmr10.ttf ttfcm.xml
> 
> I tried to run it but I got errors.
> 
> Do you know how I can get the arial.xml file?
> 
> Thanks a lot!

HTH,

Chris

> 
> Ming
> 
> 
> 
> ----- Original Message ----
> From: Andreas Delmelle <an...@telenet.be>
> To: fop-users@xmlgraphics.apache.org
> Sent: Friday, August 14, 2009 3:18:03 PM
> Subject: Re: font configuration
> 
> On 14 Aug 2009, at 20:43, Ming Yu wrote:
> 
> 
>>Thanks a lot for the reply. I checked my version and found out that it's 0.94. So, I upgraded to 0.95. Now the SEVERE error changes to a warning:
>>
>>WARNING: Font 'bold Arial,normal,400' not found. Substituting with 'any,normal,400'.
> 
> 
> Strange... seems like the font-family is parsed as 'bold Arial'. This may need to be looked into closer. Are you sure this is nowhere specified as such in the FO?
> 
> A value like 'font="16pt bold Arial"' could lead to the above result.
> The right order is style/weight/variant, then size, then font-family, and font-family names with spaces are supported, so formally there is nothing wrong with that value for the shorthand, even though the order is mixed up.
> 
> 
>>Should I install the font myself somewhere? I'm using Eclipse as my IDE.
>>
>>I also have another question regarding empty table-cell. The following lines:
>>
>><fo:table-cell></fo:table-cell>
>><fo:table-cell border-right=".6pt solid black"></fo:table-cell>
>><fo:table-cell border-right=".6pt solid black" border-bottom=".6pt solid black"/>
>>
>>will produce the following error:
>>
>>fo:table-cell is missing child elements.
>>Required Content Model: marker* (%block;)+
>>
>>How can I allow empty cells?
> 
> 
> You can turn off strict validation(*), but that is not recommended, since it will skip a lot of other validation rules as well, which could lead to unpredictable results and makes your FO less portable to other implementations.
> 
> Better would be to make sure that each cell always contains an empty fo:block.
> 
> 
> (*) http://xmlgraphics.apache.org/fop/0.95/configuration.html
> 
> 
> HTH!
> 
> 
> Andreas
> 
> 
> 
> Andreas Delmelle
> mailto:andreas.delmelle.AT.telenet.be
> jabber: mandreas@jabber.org
> skype: adlm0608
> 
> ---
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 




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


Re: font configuration

Posted by Ming Yu <my...@yahoo.com>.
Thanks for the reply. Here is the strange thing.

When I put the order as font="16pt bold arial", the FO engine gives this warning:
WARNING: Font 'bold arial,normal,400' not found. Substituting with 'any,normal,400'.

When I put the order as font="bold 16pt arial" , the FO engine gives the SEVERE error:
SEVERE: Ignoring property: font="bold 16pt arial" (No conversion defined bold; property:'font')

Even when I use individual tag as font-size="16pt" font-weight="bold" font-family="Arial", FO engine also gives this warning:
WARNING: Font 'Arial,normal,700' not found. Substituting with 'any,normal,700'.

According to Apache's documentation, I need to generate the arial.xml file myself like this:


java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
          org.apache.fop.fonts.apps.TTFReader [options]
          C:\myfonts\cmr10.ttf ttfcm.xml

I tried to run it but I got errors.

Do you know how I can get the arial.xml file?

Thanks a lot!

Ming



----- Original Message ----
From: Andreas Delmelle <an...@telenet.be>
To: fop-users@xmlgraphics.apache.org
Sent: Friday, August 14, 2009 3:18:03 PM
Subject: Re: font configuration

On 14 Aug 2009, at 20:43, Ming Yu wrote:

> Thanks a lot for the reply. I checked my version and found out that it's 0.94. So, I upgraded to 0.95. Now the SEVERE error changes to a warning:
> 
> WARNING: Font 'bold Arial,normal,400' not found. Substituting with 'any,normal,400'.

Strange... seems like the font-family is parsed as 'bold Arial'. This may need to be looked into closer. Are you sure this is nowhere specified as such in the FO?

A value like 'font="16pt bold Arial"' could lead to the above result.
The right order is style/weight/variant, then size, then font-family, and font-family names with spaces are supported, so formally there is nothing wrong with that value for the shorthand, even though the order is mixed up.

> 
> Should I install the font myself somewhere? I'm using Eclipse as my IDE.
> 
> I also have another question regarding empty table-cell. The following lines:
> 
> <fo:table-cell></fo:table-cell>
> <fo:table-cell border-right=".6pt solid black"></fo:table-cell>
> <fo:table-cell border-right=".6pt solid black" border-bottom=".6pt solid black"/>
> 
> will produce the following error:
> 
> fo:table-cell is missing child elements.
> Required Content Model: marker* (%block;)+
> 
> How can I allow empty cells?

You can turn off strict validation(*), but that is not recommended, since it will skip a lot of other validation rules as well, which could lead to unpredictable results and makes your FO less portable to other implementations.

Better would be to make sure that each cell always contains an empty fo:block.


(*) http://xmlgraphics.apache.org/fop/0.95/configuration.html


HTH!


Andreas



Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608

---


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


      

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


Re: font configuration

Posted by Andreas Delmelle <an...@telenet.be>.
On 14 Aug 2009, at 20:43, Ming Yu wrote:

> Thanks a lot for the reply. I checked my version and found out that  
> it's 0.94. So, I upgraded to 0.95. Now the SEVERE error changes to a  
> warning:
>
> WARNING: Font 'bold Arial,normal,400' not found. Substituting with  
> 'any,normal,400'.

Strange... seems like the font-family is parsed as 'bold Arial'. This  
may need to be looked into closer. Are you sure this is nowhere  
specified as such in the FO?

A value like 'font="16pt bold Arial"' could lead to the above result.
The right order is style/weight/variant, then size, then font-family,  
and font-family names with spaces are supported, so formally there is  
nothing wrong with that value for the shorthand, even though the order  
is mixed up.

>
> Should I install the font myself somewhere? I'm using Eclipse as my  
> IDE.
>
> I also have another question regarding empty table-cell. The  
> following lines:
>
> <fo:table-cell></fo:table-cell>
> <fo:table-cell border-right=".6pt solid black"></fo:table-cell>
> <fo:table-cell border-right=".6pt solid black" border-bottom=".6pt  
> solid black"/>
>
> will produce the following error:
>
> fo:table-cell is missing child elements.
> Required Content Model: marker* (%block;)+
>
> How can I allow empty cells?

You can turn off strict validation(*), but that is not recommended,  
since it will skip a lot of other validation rules as well, which  
could lead to unpredictable results and makes your FO less portable to  
other implementations.

Better would be to make sure that each cell always contains an empty  
fo:block.


(*) http://xmlgraphics.apache.org/fop/0.95/configuration.html


HTH!


Andreas



Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608

---


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


Re: font configuration

Posted by Ming Yu <my...@yahoo.com>.
Thanks a lot for the reply. I checked my version and found out that it's 0.94. So, I upgraded to 0.95. Now the SEVERE error changes to a warning:

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

Should I install the font myself somewhere? I'm using Eclipse as my IDE.

I also have another question regarding empty table-cell. The following lines:

<fo:table-cell></fo:table-cell>
<fo:table-cell border-right=".6pt solid black"></fo:table-cell>
<fo:table-cell border-right=".6pt solid black" border-bottom=".6pt solid black"/>

will produce the following error:

fo:table-cell is missing child elements. 
Required Content Model: marker* (%block;)+

How can I allow empty cells?

Thanks a lot!

Ming



----- Original Message ----
From: Andreas Delmelle <an...@telenet.be>
To: fop-users@xmlgraphics.apache.org
Sent: Friday, August 14, 2009 12:43:24 PM
Subject: Re: font configuration

On 14 Aug 2009, at 14:21, Ming Yu wrote:

Hi Ming

> Hi, I'm trying to make an existing stylesheet to work with my xml file. But it has lines like this:
> 
> <fo:block font="bold 8pt arial"> and <fo:table-cell border-bottom=".6pt solid black">, etc.
> 
> When I compile, the engine complains:
> 
> SEVERE: Ignoring property: font="bold 16pt arial" (No conversion defined bold; property:'font')

Which version are you using exactly. The 'font' shorthand was implemented rather late (as of 0.94, IIC).
It should definitely work correctly with 0.95.


Regards,

Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608

---


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


      

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


Re: font configuration

Posted by Andreas Delmelle <an...@telenet.be>.
On 14 Aug 2009, at 14:21, Ming Yu wrote:

Hi Ming

> Hi, I'm trying to make an existing stylesheet to work with my xml  
> file. But it has lines like this:
>
> <fo:block font="bold 8pt arial"> and <fo:table-cell border-bottom=". 
> 6pt solid black">, etc.
>
> When I compile, the engine complains:
>
> SEVERE: Ignoring property: font="bold 16pt arial" (No conversion  
> defined bold; property:'font')

Which version are you using exactly. The 'font' shorthand was  
implemented rather late (as of 0.94, IIC).
It should definitely work correctly with 0.95.


Regards,

Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608

---


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


Re: [!! SPAM] font configuration

Posted by Chris Bowditch <bo...@hotmail.com>.
Ming Yu wrote:
> Hi, I'm trying to make an existing stylesheet to work with my xml file. But it has lines like this:
> 
> <fo:block font="bold 8pt arial"> and <fo:table-cell border-bottom=".6pt solid black">, etc. 
> 
> When I compile, the engine complains:
> 
> SEVERE: Ignoring property: font="bold 16pt arial" (No conversion defined bold; property:'font')
> 
> Because neither font nor border-bottom is a valid attribute, I have to define them somewhere. Is it in the font configuration file? I used this to set my font configuration file location in java: 

font and border-bottom are shorthand properties. To use them you must 
specify the values list in the correct order. Looking at the spec the 
order seems correct. I suggest you try specifying the properties 
individually instead, e.g. font-weight="bold" font-size="16pt" 
font-family="arial"

> 
> fopFactory.setFontBaseURL("file:///C:/xslfoFont/fo.xconf");
> 
> But I don't know how to define the font="bold 8pt arial" or border-bottom=".6pt solid black" in the file.

Try using the individual properties instead of the shorthands.

> 
> Can someone help me on this?
> 
> Thanks a lot!

Thanks,

Chris



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