Invalid property value encountered in font="Open Sans"

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Invalid property value encountered in font="Open Sans"

Post by Boreas »

Hello,

we successfully changed the use of the fonts in our plugin, well sort of.
The Open Sans font is generated in the PDF but we get the following error message

Invalid property value encountered in font="Open Sans"

each time the font is encountered. I did not really bother with the error message, my bad, because I though everything was under control since I was getting my PDF with Open Sans font. Well, of course error messages are issued for a reason.... So things got nasty when we generated our reference guide that has over 1000 pages(yup, 1000 pages and growing because it includes all of our settings ) We get an error log of 2.5 gig , which of course causes memory issues, and then nothing generates.

To implement the use of the Open Sans font, I used Add a Font to the Built-in FO Processor - The Simple Version procedure, provided in Oxygen's user guide . But I guess when the font is used, I am missing something, but what?

This is my font mappings file

Code: Select all

<font-mappings>
<font-table>

<!-- Backwards compatibility aliases -->
<aliases>
<alias name="serif">Serif</alias>
</aliases>
<aliases>
<alias name="sans-serif">sans-serif</alias>
</aliases>
<aliases>
<alias name="monospace">Monospaced</alias>
</aliases>
<aliases>
<alias name="Helvetica">Normal</alias>
</aliases>
<aliases>
<alias name="Courier">Monospaced</alias>
</aliases>

<logical-font name="Sans">
<physical-font char-set="default">
<!--DITA for Print-->
<font-face>Open Sans,Open Sans Light, Trebuchet MS, Helvetica, Arial Unicode MS, Calibri Light</font-face>
</physical-font>
<physical-font char-set="Simplified Chinese">
<font-face>AdobeSongStd-Light</font-face>
</physical-font>
<physical-font char-set="Japanese">
<font-face>KozMinProVI-Regular</font-face>
</physical-font>
<physical-font char-set="Korean">
<font-face>AdobeMyungjoStd-Medium</font-face>
</physical-font>
<physical-font char-set="Symbols">
<font-face>ZapfDingbats</font-face>
</physical-font>
<physical-font char-set="SubmenuSymbol">
<font-face>ZapfDingbats</font-face>
</physical-font>
<physical-font char-set="SymbolsSuperscript">
<!--DITA for Print-->
<font-face>Trebuchet MS, Helvetica, Arial Unicode MS, Open Sans</font-face>
<baseline-shift>20%</baseline-shift>
<override-size>smaller</override-size>
</physical-font>
</logical-font>

<logical-font name="Serif">
<physical-font char-set="default">
<!--DITA for Print-->
<font-face>Open Sans,Open Sans Light,Book Antiqua, Helvetica, Times New Roman, Times </font-face>
</physical-font>
<physical-font char-set="Simplified Chinese">
<font-face>AdobeSongStd-Light, Open Sans</font-face>
</physical-font>
<physical-font char-set="Japanese">
<font-face>KozMinProVI-Regular, Open Sans</font-face>
</physical-font>
<physical-font char-set="Korean">
<font-face>AdobeMyungjoStd-Medium, Open Sans</font-face>
</physical-font>
<physical-font char-set="Symbols">
<font-face>ZapfDingbats</font-face>
</physical-font>
<physical-font char-set="SubmenuSymbol">
<font-face>ZapfDingbats</font-face>
</physical-font>
<physical-font char-set="SymbolsSuperscript">
<!--DITA for Print-->
<font-face>Book Antiqua, Times New Roman, Times, Open Sans</font-face>
<baseline-shift>20%</baseline-shift>
<override-size>smaller</override-size>
</physical-font>
</logical-font>

<logical-font name="Monospaced">
<physical-font char-set="default">
<font-face>Courier New, Courier</font-face>
</physical-font>
<physical-font char-set="Simplified Chinese">
<font-face>AdobeSongStd-Light</font-face>
</physical-font>
<physical-font char-set="Japanese">
<font-face>KozMinProVI-Regular</font-face>
</physical-font>
<physical-font char-set="Korean">
<font-face>AdobeMyungjoStd-Medium</font-face>
</physical-font>
<physical-font char-set="Symbols">
<font-face>ZapfDingbats</font-face>
</physical-font>
<physical-font char-set="SymbolsSuperscript">
<font-face>Courier New, Courier</font-face>
<baseline-shift>20%</baseline-shift>
<override-size>smaller</override-size>
</physical-font>
</logical-font>
</font-table>

</font-mappings>

And this is an example of a font definition for one of our elements

in the commons file

Code: Select all

  <xsl:attribute-set name="heading.one">
<xsl:attribute name="font-family">Sans</xsl:attribute>
<xsl:attribute name="font">Open Sans</xsl:attribute>
<xsl:attribute name="font-size">22pt</xsl:attribute>
</xsl:attribute-set>
So, the big question, is how can I get rid of the error messages?

Regards
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Invalid property value encountered in font="Open Sans"

Post by radu_pisoi »

Hi,

I think the problem is with XSL-FO font property that you emit from your customization. The XSL-FO font property is a shorthand/composed property and it should have a form like:

Code: Select all

font - font-style, font-variant, font-weight, font-size, line-height, font-family
See also http://www.dpawson.co.uk/xsl/sect3/shorthands.html.

The solution is simply remove the addition of font property because the font is already set with font-family property.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply