You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jason Harrop <jh...@gmail.com> on 2008/03/21 07:26:29 UTC

PATCH - autodetection of TTC fonts, and placement in cache

Hi

http://dev.plutext.org/trac/docx4j/browser/trunk/docx4j/src/main/resources/fop-fonts.patch
adds support for *.ttc to the auto-detection mechanism.  Click one of
the links at the bottom of the page for the patch file itself.

Demand for this capability may increase as usage of Microsoft's
proprietary ClearType Collection fonts increases, since Cambria is the
default font for Word 2007 headings, and its delivered in a .ttc

The font cache is modified to accommodate TTC files.

You'll see there's a bit of extra stuff in the patch, which is not
strictly relevant - especially Panose.java.  That file comes from the
foray project, and may need to be deleted.  The TTC autodetection
doesn't need it.

Finally, I'm using the fonts package by itself - principally for its
autodetection capabilities.   So I don't use PrintRendererConfigurator
- that will need to be altered further to properly use the patch.

cheers

Jason

Re: PATCH - autodetection of TTC fonts, and placement in cache

Posted by Jason Harrop <jh...@gmail.com>.
Hi Jeremias

Thanks for considering my patch, and sorry for the delay in responding.

On Thu, Mar 27, 2008 at 7:25 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> Jason, would you mind attaching your patch to a new Bugzilla issue [1]?

Done - https://issues.apache.org/bugzilla/show_bug.cgi?id=44737

>  This is to establish that you agree to republish your changes under the
>  ALv2.0, especially since the location of the current patch generally
>  contains code published under the GPL. Explicitely stating this in the
>  Bugzilla issue would be a nice bonus.

Done

>
>  I will then take a closer look at your patch. However, I'd prefer not to
>  add the Panose class taken from FOray unless Victor explicitely donates
>  it to the FOP project like he did for other code on prior occasions. I
>  don't like to mix external source classes with our own if it can be
>  avoided. Without integrating the Panose functionality with our font
>  substitution code, it has little use for us anyway.

Understood.  I have been working a little with Victor on FOray's
Panose class, but for now, rather than ask him to consider explicitly
donating it, I have removed it from the patch (given, as you note,
that it is of little use to FOP by itself).

>  Furthermore, would you please:
>  - remove the generics from the patch before uploading the patch file as
>  we're still on Java 1.4?

Done

>  - make sure you follow all the sections (especially section 4,
>  redistribution) of the ALv2 when you get to a point where you do
>  releases of docx4j?

Will do.

kind regards

Jason

Re: PATCH - autodetection of TTC fonts, and placement in cache

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Jason, would you mind attaching your patch to a new Bugzilla issue [1]?
This is to establish that you agree to republish your changes under the
ALv2.0, especially since the location of the current patch generally
contains code published under the GPL. Explicitely stating this in the
Bugzilla issue would be a nice bonus.

[1] https://issues.apache.org/bugzilla/

I will then take a closer look at your patch. However, I'd prefer not to
add the Panose class taken from FOray unless Victor explicitely donates
it to the FOP project like he did for other code on prior occasions. I
don't like to mix external source classes with our own if it can be
avoided. Without integrating the Panose functionality with our font
substitution code, it has little use for us anyway.

Furthermore, would you please:
- remove the generics from the patch before uploading the patch file as
we're still on Java 1.4?
- make sure you follow all the sections (especially section 4,
redistribution) of the ALv2 when you get to a point where you do
releases of docx4j?

Thanks.

On 21.03.2008 07:26:29 Jason Harrop wrote:
> Hi
> 
> http://dev.plutext.org/trac/docx4j/browser/trunk/docx4j/src/main/resources/fop-fonts.patch
> adds support for *.ttc to the auto-detection mechanism.  Click one of
> the links at the bottom of the page for the patch file itself.
> 
> Demand for this capability may increase as usage of Microsoft's
> proprietary ClearType Collection fonts increases, since Cambria is the
> default font for Word 2007 headings, and its delivered in a .ttc
> 
> The font cache is modified to accommodate TTC files.
> 
> You'll see there's a bit of extra stuff in the patch, which is not
> strictly relevant - especially Panose.java.  That file comes from the
> foray project, and may need to be deleted.  The TTC autodetection
> doesn't need it.
> 
> Finally, I'm using the fonts package by itself - principally for its
> autodetection capabilities.   So I don't use PrintRendererConfigurator
> - that will need to be altered further to properly use the patch.
> 
> cheers
> 
> Jason




Jeremias Maerki