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 Stephen Clarke <an...@longusername.worldonline.co.uk> on 2002/02/22 04:03:03 UTC

individual character in symbol font?

Hi,
Here's the sitch. I got an element, let's say
<element>Interdum volgus rectum videt, est ubi peccat. Si veteres ita
miratur laudatque poetas, ut nihil anteferat, nihil illis comparet, errat.
Si quaedam nimis antique, si peraque dure dicere credit eos, ignave multa
fatetur, et sapit et mecum facit et Iova iudicat aequo.
</element>

Now. Let's say I have a greek symbol in the middle of that lot, and I want
to render it in symbol font. I know about <character font-family="Symbol">
but how do i pick out that character and leave the rest in normal font, if
you see what i mean. It's really an xsl question, but i though perhaps
somebody could help. I know about copy-of, but that copies only the text and
leaves out the sybol.

Could i mark up the symbol with, eg. <s>N</s> and then convert it
individually. What would the xsl markup look like.

Thanks,
--
Best,
Stephen Clarke


RE: individual character in symbol font?

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Youd would have one template that picks up "element", as in

<xsl:template match="element">
<fo:block>
	<xsl:apply-templates/>
</fo:block>
</xsl:template>

and then if you supply another for "greek" it will get picked up as
necessary:

<xsl:template match="greek">
<fo:character character="{.}"/>
</xsl:template>

Regards,
AHS

-----Original Message-----
From: Stephen Clarke [mailto:any@longusername.worldonline.co.uk]
Sent: February 22, 2002 1:37 AM
To: fop-user@xml.apache.org
Subject: Re: individual character in symbol font?


----- Original Message -----
From: "Arved Sandstrom" <Ar...@chebucto.ns.ca>
To: <fo...@xml.apache.org>
Sent: Friday, February 22, 2002 3:15 AM
Subject: RE: individual character in symbol font?


> Ideally, and I don't think FOP does this yet, this is what
> "font-selection-strategy" (and other font properties) are for. In
practical
> terms this really comes down to specifying your "font-family" property in
> such a way that when the processor sees that character (the Greek
> character), it makes its first glyph match using the Symbol font.
>



Hi Arved,

Thanks for the reply.

> Failing that you have to do a workaround at the moment of the kind you
> suggest. Doing the <greek>S</greek> kind of thing is probably easiest;
your
> XSLT template can turn that into an fo:character.


OK. Good. But you wouldn't believe how stoopid I am. I don't even know the
xsl to turn

<element>Non equidem insector delendave carmina Livi esse reor, memini quae
plagosum mihi parvo Orbilium dictare; <greek>S</greek>sed emendata videri
pulchraque et exactis minimum distantia miror. Inter quae verbum emicuit si
forte decorum, et si versus paulo concinnior unus et alter, venditque
poema.</element>

into

<fo:block>Non equidem insector delendave carmina Livi esse reor, memini quae
plagosum mihi parvo Orbilium dictare; <fo:character character="S"
font-family="Symbol"/>sed emendata videri pulchraque et exactis minimum
distantia miror. Inter quae verbum emicuit si forte decorum, et si versus
paulo concinnior unus et alter, venditque poema.</element>

Do you happen to know what would be the xsl:fo to do that? There must be a
way but i can't think what it is. {:-(

let's see...
<fo:block><xsl:value-of select="element"><xsl:apply-templates
select="greek"/></xsl:value-of></fo:block>

.. would that be it. But I don't think it would even parse. Can see where
I'm at with this? {:-(

Grateful for any further assistance.
--
Best,
Stephen



Re: individual character in symbol font?

Posted by Stephen Clarke <an...@longusername.worldonline.co.uk>.
----- Original Message -----
From: "Arved Sandstrom" <Ar...@chebucto.ns.ca>
To: <fo...@xml.apache.org>
Sent: Friday, February 22, 2002 3:15 AM
Subject: RE: individual character in symbol font?


> Ideally, and I don't think FOP does this yet, this is what
> "font-selection-strategy" (and other font properties) are for. In
practical
> terms this really comes down to specifying your "font-family" property in
> such a way that when the processor sees that character (the Greek
> character), it makes its first glyph match using the Symbol font.
>



Hi Arved,

Thanks for the reply.

> Failing that you have to do a workaround at the moment of the kind you
> suggest. Doing the <greek>S</greek> kind of thing is probably easiest;
your
> XSLT template can turn that into an fo:character.


OK. Good. But you wouldn't believe how stoopid I am. I don't even know the
xsl to turn

<element>Non equidem insector delendave carmina Livi esse reor, memini quae
plagosum mihi parvo Orbilium dictare; <greek>S</greek>sed emendata videri
pulchraque et exactis minimum distantia miror. Inter quae verbum emicuit si
forte decorum, et si versus paulo concinnior unus et alter, venditque
poema.</element>

into

<fo:block>Non equidem insector delendave carmina Livi esse reor, memini quae
plagosum mihi parvo Orbilium dictare; <fo:character character="S"
font-family="Symbol"/>sed emendata videri pulchraque et exactis minimum
distantia miror. Inter quae verbum emicuit si forte decorum, et si versus
paulo concinnior unus et alter, venditque poema.</element>

Do you happen to know what would be the xsl:fo to do that? There must be a
way but i can't think what it is. {:-(

let's see...
<fo:block><xsl:value-of select="element"><xsl:apply-templates
select="greek"/></xsl:value-of></fo:block>

.. would that be it. But I don't think it would even parse. Can see where
I'm at with this? {:-(

Grateful for any further assistance.
--
Best,
Stephen



RE: individual character in symbol font?

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Ideally, and I don't think FOP does this yet, this is what
"font-selection-strategy" (and other font properties) are for. In practical
terms this really comes down to specifying your "font-family" property in
such a way that when the processor sees that character (the Greek
character), it makes its first glyph match using the Symbol font.

Failing that you have to do a workaround at the moment of the kind you
suggest. Doing the <greek>S</greek> kind of thing is probably easiest; your
XSLT template can turn that into an fo:character.

Regards,
Arved Sandstrom

-----Original Message-----
From: Stephen Clarke [mailto:any@longusername.worldonline.co.uk]
Sent: February 21, 2002 11:03 PM
To: fop
Subject: individual character in symbol font?


Hi,
Here's the sitch. I got an element, let's say
<element>Interdum volgus rectum videt, est ubi peccat. Si veteres ita
miratur laudatque poetas, ut nihil anteferat, nihil illis comparet, errat.
Si quaedam nimis antique, si peraque dure dicere credit eos, ignave multa
fatetur, et sapit et mecum facit et Iova iudicat aequo.
</element>

Now. Let's say I have a greek symbol in the middle of that lot, and I want
to render it in symbol font. I know about <character font-family="Symbol">
but how do i pick out that character and leave the rest in normal font, if
you see what i mean. It's really an xsl question, but i though perhaps
somebody could help. I know about copy-of, but that copies only the text and
leaves out the sybol.

Could i mark up the symbol with, eg. <s>N</s> and then convert it
individually. What would the xsl markup look like.

Thanks,
--
Best,
Stephen Clarke