Patch for enhancement of PDF backend

"Nicolas Grilly" <nicolas.grilly@...475...> writes:

Here is a patch I promised some time ago, to improve the PDF backend.

Thanks; on first look this seems really nice! So far I have one
request to you and one to John:

Nicolas: would it be easy for you to strip the ^M (carriage-return)
characters from your files and then re-run diff? I see in your patch
several parts where the only change seems to be an addition of ^M at
the end of each line, but there could be significant changes hidden
within these parts. (Perhaps just give the -b option to diff? Though
that might backfire if some other whitespace changes are significant,
e.g. if you have changed the indentation of some code blocks.)

John: Is Adobe's licensing of the AFM files compatible with
matplotlib's license? I think it is, but I'm no license expert. The
readme file distributed with the files contains the following text:

  Font Metrics for the 14 PDF Core Fonts

···

======================================

  This directory contains font metrics for the 14 PDF Core Fonts (files with .afm
  extension), downloaded from http://partners.adobe.com/public/developer/font/index.html.

  This file and the 14 PostScript(R) AFM files it accompanies may be used, copied,
  and distributed for any purpose and without charge, with or without modification,
  provided that all copyright notices are retained; that the AFM files are not
  distributed without this file; that all modifications to this file or any of
  the AFM files are prominently noted in the modified file(s); and that this
  paragraph is not modified. Adobe Systems has no responsibility or obligation
  to support the use of the AFM files.

--
Jouni K. Sepp�nen
http://www.iki.fi/jks

Thanks; on first look this seems really nice! So far I have one
request to you and one to John:

You're welcome; I'm happy to contribute to matplotlib when I can! :slight_smile:

Nicolas: would it be easy for you to strip the ^M (carriage-return)
characters from your files and then re-run diff? I see in your patch
several parts where the only change seems to be an addition of ^M at
the end of each line, but there could be significant changes hidden
within these parts. (Perhaps just give the -b option to diff? Though
that might backfire if some other whitespace changes are significant,
e.g. if you have changed the indentation of some code blocks.)

Ok. I've removed the carriage-return characters and added property
svn:eol-style = native to backend.pdf. Now the patch looks right (see
the attached file).

I hope there is no license issue with the AFM files. I'm pretty sure
I've seen them integrated in some TeX distributions.

-- Nicolas Grilly

mpl_pdf_backend.patch (48.5 KB)

···

On 2/14/07, Jouni K. Seppänen <jks@...278...> wrote:

Apparently all we have to do is include the README along with the
licensing terms. You probably should do that in the the same
directory the fonts live to ensure that they are always distributed
together. We also have a licenses directory.

JDH

···

On 2/14/07, Nicolas Grilly <nicolas.grilly@...475...> wrote:

I hope there is no license issue with the AFM files. I'm pretty sure
I've seen them integrated in some TeX distributions.

In this purpose, I've provided a readme.txt file, located in the same
directory as the AFM files, and containing this text:

"""
Font Metrics for the 14 PDF Core Fonts

···

On 2/14/07, John Hunter <jdh2358@...149...> wrote:

Apparently all we have to do is include the README along with the
licensing terms. You probably should do that in the the same
directory the fonts live to ensure that they are always distributed
together. We also have a licenses directory.

======================================

This directory contains font metrics for the 14 PDF Core Fonts (files with .afm
extension), downloaded from
http://partners.adobe.com/public/developer/font/index.html.

This file and the 14 PostScript(R) AFM files it accompanies may be
used, copied,
and distributed for any purpose and without charge, with or without
modification,
provided that all copyright notices are retained; that the AFM files are not
distributed without this file; that all modifications to this file or any of
the AFM files are prominently noted in the modified file(s); and that this
paragraph is not modified. Adobe Systems has no responsibility or obligation
to support the use of the AFM files.
"""

The original file from Adobe just contained the last paragraph; I
added the first one to make clear the files origin.

NG

Hello Jouni,

Have you had time to look at my patch regarding the PDF backend? :slight_smile:

Regards,

Nicolas