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 Chris Bowditch <bo...@hotmail.com> on 2015/10/23 17:43:37 UTC

font question (was Re: alternate text extension not working in FOP version 2.0)

Hi Eva,

style supports only normal or italic currently. Condensed is not a valid 
value for the style attribute. I suggest changing it to normal and 
putting condensed into the font Triplet name within the fop.xconf along 
with changing the font-family in the FO

Thanks,

Chris

On 22/10/2015 20:59, Eva Chang wrote:
> Thanks a lot! my config works now. I don't know if you are familiar with
> adding custom fonts in the config. I'm having trouble with a custom font
> that I add in the config.  I reference apache fop 2.0 website for custom
> fonts and still no luck, not sure which step is causing the issue that the
> font is not register properly.
>
> Config:
>   
> <font-triplet name="Trade Gothic" style="condensed" weight="normal"/>
>   
>
> xsl:
> <fo:block padding-top="0.11in" font-family="Eurostile"
> font-style="condensed" font-weight="normal" font-size="8pt">
>
>
> Error:
> Invalid property value encountered in font-style="condensed": org.apache
> .fop.fo.expr.PropertyException
>
>
>
>
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/alternate-text-extension-not-working-in-FOP-version-2-0-tp42921p42987.html
> Sent from the FOP - Users mailing list archive at Nabble.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: font question (was Re: alternate text extension not working in FOP version 2.0)

Posted by Pascal Sancho <ps...@gmail.com>.
Hi,
You don't need metric files anymore since v0.95 (or earlier, don't
remember exactly).

To have both normal, extended, or condensed fonts, you have to name
them differently, style attribute is only used to distinguish regular
Vs italic.

The main improvement in font variations, between v0.2.x and after, is
the weight attribute that support numeric values, allowing to map
'light', 'normal', 'medium', 'bold', etc. to 300, 400, 500, 700, etc.

2015-10-26 16:20 GMT+01:00 Eva <di...@hotmail.com>:
> Hi Chris,
>
> I'm in the process of converting fop from version 0.25 to version 2. There
> are several custom fonts and I had no problem registering custom fonts when
> I specify style with "normal" or "italic" in font-triplet. However, I've a
> font with different styles which registered as below where style is being
> used to distinguish the difference from the same font. I assume I can put
> any style name in font-triplet and I should be able to use it in fo where I
> need to specify the matching font-family and style. My current work around
> would be register each style with a unique name in font-triplet and change
> all the corresponding references in fo. I just want to verify if the newer
> version of FOP won't be able to specific any other styles other than
> "normal" and "italic" in <font-triplet> in the config. Or I'm missing
> something in the config in order to add a new style. Do I need a metric-url
> in this case??
>
> fop.xconf:
>
>  <font-triplet name="Eurostile" style="condensed" weight="bold"/>
>
> <font-triplet name="Eurostile" style="extended" weight="normal"/>
>
>
> fo:
> (Error: Invalid property value encountered in font-style="condensed" )
> <fo:block text-align="center" space-after.optimum="3pt"
> font-family="Eurostile" font-style="condensed" font-weight="normal"
> font-size="8pt" color="white">April 30, 2015</fo:block>
>
> (No error produce when having the same config, but changing the font-style
> from condense to normal in fo then it works)
> <fo:block text-align="center" space-after.optimum="3pt"
> font-family="Eurostile" font-style="normal" font-weight="normal"
> font-size="8pt" color="white">April 30, 2015</fo:block>
>
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/alternate-text-extension-not-working-in-FOP-version-2-0-tp42921p42992.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



-- 
pascal

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


Re: font question (was Re: alternate text extension not working in FOP version 2.0)

Posted by Eva <di...@hotmail.com>.
Hi Chris,

I'm in the process of converting fop from version 0.25 to version 2. There
are several custom fonts and I had no problem registering custom fonts when
I specify style with "normal" or "italic" in font-triplet. However, I've a
font with different styles which registered as below where style is being
used to distinguish the difference from the same font. I assume I can put
any style name in font-triplet and I should be able to use it in fo where I
need to specify the matching font-family and style. My current work around
would be register each style with a unique name in font-triplet and change
all the corresponding references in fo. I just want to verify if the newer
version of FOP won't be able to specific any other styles other than
"normal" and "italic" in <font-triplet> in the config. Or I'm missing
something in the config in order to add a new style. Do I need a metric-url
in this case??

fop.xconf:

 <font-triplet name="Eurostile" style="condensed" weight="bold"/>

<font-triplet name="Eurostile" style="extended" weight="normal"/>


fo:
(Error: Invalid property value encountered in font-style="condensed" )
<fo:block text-align="center" space-after.optimum="3pt"
font-family="Eurostile" font-style="condensed" font-weight="normal"
font-size="8pt" color="white">April 30, 2015</fo:block>

(No error produce when having the same config, but changing the font-style
from condense to normal in fo then it works)
<fo:block text-align="center" space-after.optimum="3pt"
font-family="Eurostile" font-style="normal" font-weight="normal"
font-size="8pt" color="white">April 30, 2015</fo:block>
					



--
View this message in context: http://apache-fop.1065347.n5.nabble.com/alternate-text-extension-not-working-in-FOP-version-2-0-tp42921p42992.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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