You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Sjur Moshagen <sj...@mac.com> on 2008/09/16 08:28:11 UTC
$rootFontFamily (was: PDF plugin update)
Den 5. sep. 2008 kl. 20.35 skrev Thorsten Scherler:
>> There are still two issues:
>>
>> $rootFontFamily - I have found no counterpart to this in the
>> dispatcher. The variable is used on the fo:root element, and sets the
>> default font family for the whole pdf document
>>
>> $versionFontFamily - the version info found in the skins are not
>> available in dispatcher as far as I could see. Perhaps this needs a
>> new template/contract?
>
> I need to review their usage in skins and will then see how we can add
> them to the dispatcher.
With the update to fop 0.95, the font family specification is working
as planned (for me, at least, more testing needed). *Except* the two
above in dispatcher :)
$rootFontFamily is really problematic, because without it the body
text will be left unchanged and untouched by the customisation. This
means e.g. that in my texts, I now get the headings with proper
characters/glyphs, whereas the body text is interspersed with #'s.
It would be great if somebody could give me a hint on where fo:root is
specified within the dispatcher pdf processing - it is definitely
specified somewhere, since the final *.fo document is correct, and
renders otherwise nicely into pdf.
Best regards,
Sjur
Re: $rootFontFamily (was: PDF plugin update)
Posted by Sjur Moshagen <sj...@mac.com>.
Den 16. sep. 2008 kl. 10.45 skrev Thorsten Scherler:
> On Tue, 2008-09-16 at 09:43 +0300, Sjur Moshagen wrote:
>> Den 16. sep. 2008 kl. 09.28 skrev Sjur Moshagen:
>>
>>> Den 5. sep. 2008 kl. 20.35 skrev Thorsten Scherler:
>>>
>>>>> There are still two issues:
>>>>>
>>>>> $rootFontFamily - I have found no counterpart to this in the
>>>>> dispatcher. The variable is used on the fo:root element, and sets
>>>>> the
>>>>> default font family for the whole pdf document
Done, see below.
>>>>> $versionFontFamily - the version info found in the skins are not
>>>>> available in dispatcher as far as I could see. Perhaps this
>>>>> needs a
>>>>> new template/contract?
Still TBD.
>> Hm, sorry, I got fooled by the filename of the second dispatcher
>> match. strip-dispatcher-remains.xsl actually adds fo:root and some
>> other things:)
>>
>> I'll try to add $rootFontFamily to it.
>
> Perfect, I was on my way to track that down, but you have been
> faster. :)
:)
With the latest commit, it is working.
The solution is kind of hacky, but I could not find a better way.
I also looked at an alternative (passing in the font family as a
parameter from the sitemap to the post-prosessing xsl), but that
turned out to be much more ugly.
Feel free to improve the code (as always!).
There's still one more thing to be done to bring the dispatcher pdf
generation completely up to par with the skins-based one, which is to
add a version info fo contract (and the corresponding font family
variable, see above). But for me, this latest commit together with the
FOP 0.95 update concludes the font family part of the pdf plugin
updates - it works really well for me now (but as said elsewhere[1],
more testing on other platforms are needed, there are at least one
report of remaining problems[2]).
Best regards,
Sjur
[1] http://marc.info/?l=forrest-dev&m=122150015606235&w=2 (bottom of
mail)
[2] http://marc.info/?l=forrest-dev&m=122095601402008&w=2 (bottom of
mail)
Re: $rootFontFamily (was: PDF plugin update)
Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Tue, 2008-09-16 at 09:43 +0300, Sjur Moshagen wrote:
> Den 16. sep. 2008 kl. 09.28 skrev Sjur Moshagen:
>
> > Den 5. sep. 2008 kl. 20.35 skrev Thorsten Scherler:
> >
> >>> There are still two issues:
> >>>
> >>> $rootFontFamily - I have found no counterpart to this in the
> >>> dispatcher. The variable is used on the fo:root element, and sets
> >>> the
> >>> default font family for the whole pdf document
> >>>
> >>> $versionFontFamily - the version info found in the skins are not
> >>> available in dispatcher as far as I could see. Perhaps this needs a
> >>> new template/contract?
> >>
> >> I need to review their usage in skins and will then see how we can
> >> add
> >> them to the dispatcher.
> >
> > With the update to fop 0.95, the font family specification is
> > working as planned (for me, at least, more testing needed). *Except*
> > the two above in dispatcher :)
> >
> > $rootFontFamily is really problematic,
>
> The lack of support for it, that is.
>
> > because without it the body text will be left unchanged and
> > untouched by the customisation. This means e.g. that in my texts, I
> > now get the headings with proper characters/glyphs, whereas the body
> > text is interspersed with #'s.
> >
> > It would be great if somebody could give me a hint on where fo:root
> > is specified within the dispatcher pdf processing - it is definitely
> > specified somewhere, since the final *.fo document is correct, and
> > renders otherwise nicely into pdf.
>
> By grepping after fo:root in whiteboard/plugins, I get the following
> hits:
>
> org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/
> common/xslt/fo/document2fo.xsl
> org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/fo/
> strip-dispatcher-remains.xsl
> rtf-output/src/documentation/content/xdocs/samples/minimal.fo
>
> The first dispatcher hit (document2fo.xsl) does not seem to be used
> AFAICT, the second is, well, the name is quite describing.
>
> ...
>
> Hm, sorry, I got fooled by the filename of the second dispatcher
> match. strip-dispatcher-remains.xsl actually adds fo:root and some
> other things:)
>
> I'll try to add $rootFontFamily to it.
Perfect, I was on my way to track that down, but you have been
faster. :)
Nice work Sjur, keep it coming.
salu2
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions
Re: $rootFontFamily (was: PDF plugin update)
Posted by Sjur Moshagen <sj...@mac.com>.
Den 16. sep. 2008 kl. 09.28 skrev Sjur Moshagen:
> Den 5. sep. 2008 kl. 20.35 skrev Thorsten Scherler:
>
>>> There are still two issues:
>>>
>>> $rootFontFamily - I have found no counterpart to this in the
>>> dispatcher. The variable is used on the fo:root element, and sets
>>> the
>>> default font family for the whole pdf document
>>>
>>> $versionFontFamily - the version info found in the skins are not
>>> available in dispatcher as far as I could see. Perhaps this needs a
>>> new template/contract?
>>
>> I need to review their usage in skins and will then see how we can
>> add
>> them to the dispatcher.
>
> With the update to fop 0.95, the font family specification is
> working as planned (for me, at least, more testing needed). *Except*
> the two above in dispatcher :)
>
> $rootFontFamily is really problematic,
The lack of support for it, that is.
> because without it the body text will be left unchanged and
> untouched by the customisation. This means e.g. that in my texts, I
> now get the headings with proper characters/glyphs, whereas the body
> text is interspersed with #'s.
>
> It would be great if somebody could give me a hint on where fo:root
> is specified within the dispatcher pdf processing - it is definitely
> specified somewhere, since the final *.fo document is correct, and
> renders otherwise nicely into pdf.
By grepping after fo:root in whiteboard/plugins, I get the following
hits:
org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/
common/xslt/fo/document2fo.xsl
org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/fo/
strip-dispatcher-remains.xsl
rtf-output/src/documentation/content/xdocs/samples/minimal.fo
The first dispatcher hit (document2fo.xsl) does not seem to be used
AFAICT, the second is, well, the name is quite describing.
...
Hm, sorry, I got fooled by the filename of the second dispatcher
match. strip-dispatcher-remains.xsl actually adds fo:root and some
other things:)
I'll try to add $rootFontFamily to it.
Best regards,
Sjur