new font_manager.py in Enable

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

new font_manager.py in Enable

bryce hendrix-2
Enable uses a modified, borrowed version of matplotlib's font_manager.py. Previously it was based on a version that was probably 4-5 years old. I've updated it to the most recent version from matplotlib's svn to improve the detection of fonts. Most users won't notice any difference, though if you got the Comic Sans font by default and you still want it, you're going to have to set it specifically.

For those that care about the details
-------------------------------------------------------
The default font family is a sans-serif and previously the font manager for me would default to MS Arial. Now it prefers several fonts with more open licenses. On a new Ubuntu install DejaVu Sans will be the default font. Here is the list of preferred fonts for each family

preferred_fonts = {
    'fantasy': ['Comic Sans MS', 'Chicago', 'Charcoal', 'ImpactWestern', 'fantasy'],
    'cursive': ['Apple Chancery', 'Textile', 'Zapf Chancery', 'Sand', 'cursive'],
    'monospace': ['Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Andale Mono', 
                         'Nimbus Mono L', 'Courier New', 'Courier', 'Fixed', 'Terminal', 'monospace'],
    'serif': ['Bitstream Vera Serif', 'DejaVu Serif', 'New Century Schoolbook', 
              'Century Schoolbook L', 'Utopia', 'ITC Bookman', 'Bookman', 
              'Nimbus Roman No9 L', 'Times New Roman', 'Times', 'Palatino', 'Charter', 'serif'],
    'sans-serif': ['Bitstream Vera Sans', 'DejaVu Sans', 'Lucida Grande', 'Verdana', 'Geneva', 
                      'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif']
}

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

Peter Wang
On Tue, Nov 16, 2010 at 6:37 PM, bryce hendrix <[hidden email]> wrote:
> Most users won't notice any difference, though if you
> got the Comic Sans font by default and you still want it, you're going to
> have to set it specifically.

Furthermore, if you are actually using Comic Sans in your
in-production Chaco plots, please share some screenshots - I'm sure
many folks would love to see that!

> 'fantasy': ['Comic Sans MS', 'Chicago',

Chicago is considered to be in the "fantasy" family of fonts?
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
On Tue, Nov 16, 2010 at 9:39 PM, Peter Wang <[hidden email]> wrote:
On Tue, Nov 16, 2010 at 6:37 PM, bryce hendrix <[hidden email]> wrote:
> Most users won't notice any difference, though if you
> got the Comic Sans font by default and you still want it, you're going to
> have to set it specifically.

Furthermore, if you are actually using Comic Sans in your
in-production Chaco plots, please share some screenshots - I'm sure
many folks would love to see that!

> 'fantasy': ['Comic Sans MS', 'Chicago',

Chicago is considered to be in the "fantasy" family of fonts?

I got the list of fonts from matplotlib. I too thought Chicago seems questionable for fantasy. 

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

fred-2
In reply to this post by bryce hendrix-2
Le 17/11/2010 01:37, bryce hendrix a écrit :
> Enable uses a modified, borrowed version of matplotlib's
> font_manager.py. Previously it was based on a version that was probably
> 4-5 years old. I've updated it to the most recent version from
> matplotlib's svn to improve the detection of fonts. Most users won't
> notice any difference, though if you got the Comic Sans font by default
> and you still want it, you're going to have to set it specifically.
>
Hi Bryce,

My Traits apps do not work anymore, and I get the same issue for
cmap_image_plot.py for instance.

Please see attached log file.

TIA.

Cheers,

--
Fred

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
On Wed, Nov 17, 2010 at 1:44 AM, Fred <[hidden email]> wrote:
Le 17/11/2010 01:37, bryce hendrix a écrit :
Enable uses a modified, borrowed version of matplotlib's
font_manager.py. Previously it was based on a version that was probably
4-5 years old. I've updated it to the most recent version from
matplotlib's svn to improve the detection of fonts. Most users won't
notice any difference, though if you got the Comic Sans font by default
and you still want it, you're going to have to set it specifically.

Hi Bryce,

My Traits apps do not work anymore, and I get the same issue for cmap_image_plot.py for instance.


Fred,

My guess is that we need to update the afm.py module as well. Unfortunately, I don't know how to exercise it. Do you know how you are getting the plot to use afm.py (Adobe Font Manager)?

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

fred-2
Le 17/11/2010 17:37, bryce hendrix a écrit :

> My guess is that we need to update the afm.py module as well.
> Unfortunately, I don't know how to exercise it. Do you know how you are
> getting the plot to use afm.py (Adobe Font Manager)?
Hum, no idea :-/

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
On Wed, Nov 17, 2010 at 11:29 AM, Fred <[hidden email]> wrote:
Le 17/11/2010 17:37, bryce hendrix a écrit :

> My guess is that we need to update the afm.py module as well.
> Unfortunately, I don't know how to exercise it. Do you know how you are
> getting the plot to use afm.py (Adobe Font Manager)?
Hum, no idea :-/


Do you ever explicitly set a font? Which Linux distro are you running?

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

Robert Kern
On Wed, Nov 17, 2010 at 11:40 AM, bryce hendrix <[hidden email]> wrote:

> On Wed, Nov 17, 2010 at 11:29 AM, Fred <[hidden email]> wrote:
>>
>> Le 17/11/2010 17:37, bryce hendrix a écrit :
>>
>> > My guess is that we need to update the afm.py module as well.
>> > Unfortunately, I don't know how to exercise it. Do you know how you are
>> > getting the plot to use afm.py (Adobe Font Manager)?
>> Hum, no idea :-/
>>
>
> Do you ever explicitly set a font? Which Linux distro are you running?

Judging from the traceback, it gets invoked while the font manager is
building the list of available fonts. That means that Fred has some
fonts with associated Adobe Font Metrics files laying about.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

fred-2
In reply to this post by bryce hendrix-2
Le 17/11/2010 18:40, bryce hendrix a écrit :

> Do you ever explicitly set a font? Which Linux distro are you running?
Mmmh, non, I run the Chaco example as it.

I use a Debian squeeze distro, 32 & 64 bits.

I have a lot of so not common TrueType fonts installed in
/usr/X11R6/lib/X11/fonts/TrueType which my Chaco Traits app can get
without problem.

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

fred-2
In reply to this post by Robert Kern
Le 17/11/2010 18:49, Robert Kern a écrit :

> Judging from the traceback, it gets invoked while the font manager is
> building the list of available fonts. That means that Fred has some
> fonts with associated Adobe Font Metrics files laying about.
May be something related with my LaTeX stuff installed?


--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]> wrote:
Le 17/11/2010 18:49, Robert Kern a écrit :

> Judging from the traceback, it gets invoked while the font manager is
> building the list of available fonts. That means that Fred has some
> fonts with associated Adobe Font Metrics files laying about.
May be something related with my LaTeX stuff installed?


Could be. There has to be somewhere that a font with the extension .afm is installed...

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

Robert Kern
On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix <[hidden email]> wrote:

> On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]> wrote:
>>
>> Le 17/11/2010 18:49, Robert Kern a écrit :
>>
>> > Judging from the traceback, it gets invoked while the font manager is
>> > building the list of available fonts. That means that Fred has some
>> > fonts with associated Adobe Font Metrics files laying about.
>> May be something related with my LaTeX stuff installed?
>>
>
> Could be. There has to be somewhere that a font with the extension .afm is
> installed...

So why don't you just update the afm.py to the latest version, too?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
On Wed, Nov 17, 2010 at 12:24 PM, Robert Kern <[hidden email]> wrote:
On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix <[hidden email]> wrote:
> On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]> wrote:
>>
>> Le 17/11/2010 18:49, Robert Kern a écrit :
>>
>> > Judging from the traceback, it gets invoked while the font manager is
>> > building the list of available fonts. That means that Fred has some
>> > fonts with associated Adobe Font Metrics files laying about.
>> May be something related with my LaTeX stuff installed?
>>
>
> Could be. There has to be somewhere that a font with the extension .afm is
> installed...

So why don't you just update the afm.py to the latest version, too?


I will, but I want to test it afterwards :)



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

Robert Kern
On Wed, Nov 17, 2010 at 12:26 PM, bryce hendrix <[hidden email]> wrote:

> On Wed, Nov 17, 2010 at 12:24 PM, Robert Kern <[hidden email]> wrote:
>>
>> On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix <[hidden email]>
>> wrote:
>> > On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]> wrote:
>> >>
>> >> Le 17/11/2010 18:49, Robert Kern a écrit :
>> >>
>> >> > Judging from the traceback, it gets invoked while the font manager is
>> >> > building the list of available fonts. That means that Fred has some
>> >> > fonts with associated Adobe Font Metrics files laying about.
>> >> May be something related with my LaTeX stuff installed?
>> >>
>> >
>> > Could be. There has to be somewhere that a font with the extension .afm
>> > is
>> > installed...
>>
>> So why don't you just update the afm.py to the latest version, too?
>>
>
> I will, but I want to test it afterwards :)

I'm sure Fred's happy to. :-)

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
On Wed, Nov 17, 2010 at 12:27 PM, Robert Kern <[hidden email]> wrote:
On Wed, Nov 17, 2010 at 12:26 PM, bryce hendrix <[hidden email]> wrote:
> On Wed, Nov 17, 2010 at 12:24 PM, Robert Kern <[hidden email]> wrote:
>>
>> On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix <[hidden email]>
>> wrote:
>> > On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]> wrote:
>> >>
>> >> Le 17/11/2010 18:49, Robert Kern a écrit :
>> >>
>> >> > Judging from the traceback, it gets invoked while the font manager is
>> >> > building the list of available fonts. That means that Fred has some
>> >> > fonts with associated Adobe Font Metrics files laying about.
>> >> May be something related with my LaTeX stuff installed?
>> >>
>> >
>> > Could be. There has to be somewhere that a font with the extension .afm
>> > is
>> > installed...
>>
>> So why don't you just update the afm.py to the latest version, too?
>>
>
> I will, but I want to test it afterwards :)

I'm sure Fred's happy to. :-)


It takes a bit of crafting to get rid of all other matpliblib imports, so its not a simple cut & paste.

I did just install a bunch of afm fonts, and I don't have any issues. Maybe one of Fred's fonts didn't get parsed correctly?

Fred, can you wrap afm.py, line 380 in a try/except and print out what self._heading when catching the exception?

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

fred-2
In reply to this post by Robert Kern
Le 17/11/2010 19:27, Robert Kern a écrit :

>> I will, but I want to test it afterwards :)
>
> I'm sure Fred's happy to. :-)
Sure! :-)


--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

Robert Kern
In reply to this post by bryce hendrix-2
On Wed, Nov 17, 2010 at 1:04 PM, bryce hendrix <[hidden email]> wrote:

> On Wed, Nov 17, 2010 at 12:27 PM, Robert Kern <[hidden email]> wrote:
>>
>> On Wed, Nov 17, 2010 at 12:26 PM, bryce hendrix <[hidden email]>
>> wrote:
>> > On Wed, Nov 17, 2010 at 12:24 PM, Robert Kern <[hidden email]>
>> > wrote:
>> >>
>> >> On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix
>> >> <[hidden email]>
>> >> wrote:
>> >> > On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]> wrote:
>> >> >>
>> >> >> Le 17/11/2010 18:49, Robert Kern a écrit :
>> >> >>
>> >> >> > Judging from the traceback, it gets invoked while the font manager
>> >> >> > is
>> >> >> > building the list of available fonts. That means that Fred has
>> >> >> > some
>> >> >> > fonts with associated Adobe Font Metrics files laying about.
>> >> >> May be something related with my LaTeX stuff installed?
>> >> >>
>> >> >
>> >> > Could be. There has to be somewhere that a font with the extension
>> >> > .afm
>> >> > is
>> >> > installed...
>> >>
>> >> So why don't you just update the afm.py to the latest version, too?
>> >>
>> >
>> > I will, but I want to test it afterwards :)
>>
>> I'm sure Fred's happy to. :-)
>>
>
> It takes a bit of crafting to get rid of all other matpliblib imports, so
> its not a simple cut & paste.

There's just the one import of a data table from _mathtext_data.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

fred-2
In reply to this post by bryce hendrix-2
Le 17/11/2010 20:04, bryce hendrix a écrit :

> On Wed, Nov 17, 2010 at 12:27 PM, Robert Kern <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On Wed, Nov 17, 2010 at 12:26 PM, bryce hendrix
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      > On Wed, Nov 17, 2010 at 12:24 PM, Robert Kern
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      >>
>      >> On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix
>     <[hidden email] <mailto:[hidden email]>>
>      >> wrote:
>      >> > On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      >> >>
>      >> >> Le 17/11/2010 18:49, Robert Kern a écrit :
>      >> >>
>      >> >> > Judging from the traceback, it gets invoked while the font
>     manager is
>      >> >> > building the list of available fonts. That means that Fred
>     has some
>      >> >> > fonts with associated Adobe Font Metrics files laying about.
>      >> >> May be something related with my LaTeX stuff installed?
>      >> >>
>      >> >
>      >> > Could be. There has to be somewhere that a font with the
>     extension .afm
>      >> > is
>      >> > installed...
>      >>
>      >> So why don't you just update the afm.py to the latest version, too?
>      >>
>      >
>      > I will, but I want to test it afterwards :)
>
>     I'm sure Fred's happy to. :-)
>
>
> It takes a bit of crafting to get rid of all other matpliblib imports,
> so its not a simple cut & paste.
>
> I did just install a bunch of afm fonts, and I don't have any issues.
> Maybe one of Fred's fonts didn't get parsed correctly?
>
> Fred, can you wrap afm.py, line 380 in a try/except and print out what
> self._heading when catching the exception?
{'FontName': 'CanGoods', 'FontBBox': [-1, -200, 697, 820], 'Descender':
-170.0, 'Ascender': 750.0, 'IsFixedPitch': False, 'Notice': 'Copyright
(c) Fish Dicks Original Fonts, 1. All rights reserved.',
'StartFontMetrics': 2.0, 'UnderlinePosition': -133,
'UnderlineThickness': 20, 'ItalicAngle': 0.0, 'FullName': 'CanGoods',
'StartCharMetrics': 80}

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
On Thu, Nov 18, 2010 at 4:50 AM, Fred <[hidden email]> wrote:
Le 17/11/2010 20:04, bryce hendrix a écrit :
> On Wed, Nov 17, 2010 at 12:27 PM, Robert Kern <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On Wed, Nov 17, 2010 at 12:26 PM, bryce hendrix
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      > On Wed, Nov 17, 2010 at 12:24 PM, Robert Kern
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      >>
>      >> On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix
>     <[hidden email] <mailto:[hidden email]>>
>      >> wrote:
>      >> > On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      >> >>
>      >> >> Le 17/11/2010 18:49, Robert Kern a écrit :
>      >> >>
>      >> >> > Judging from the traceback, it gets invoked while the font
>     manager is
>      >> >> > building the list of available fonts. That means that Fred
>     has some
>      >> >> > fonts with associated Adobe Font Metrics files laying about.
>      >> >> May be something related with my LaTeX stuff installed?
>      >> >>
>      >> >
>      >> > Could be. There has to be somewhere that a font with the
>     extension .afm
>      >> > is
>      >> > installed...
>      >>
>      >> So why don't you just update the afm.py to the latest version, too?
>      >>
>      >
>      > I will, but I want to test it afterwards :)
>
>     I'm sure Fred's happy to. :-)
>
>
> It takes a bit of crafting to get rid of all other matpliblib imports,
> so its not a simple cut & paste.
>
> I did just install a bunch of afm fonts, and I don't have any issues.
> Maybe one of Fred's fonts didn't get parsed correctly?
>
> Fred, can you wrap afm.py, line 380 in a try/except and print out what
> self._heading when catching the exception?
{'FontName': 'CanGoods', 'FontBBox': [-1, -200, 697, 820], 'Descender':
-170.0, 'Ascender': 750.0, 'IsFixedPitch': False, 'Notice': 'Copyright
(c) Fish Dicks Original Fonts, 1. All rights reserved.',
'StartFontMetrics': 2.0, 'UnderlinePosition': -133,
'UnderlineThickness': 20, 'ItalicAngle': 0.0, 'FullName': 'CanGoods',
'StartCharMetrics': 80}


Thanks Fred. It looks like its probably just one font (or a couple) that is missing the FontFamily. I think we're safe to handle this case by ignoring the font. I'll fix up the code to handle it.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: new font_manager.py in Enable

bryce hendrix-2
Okay Fred, its committed, please give it a go.

Bryce

On Thu, Nov 18, 2010 at 8:58 AM, bryce hendrix <[hidden email]> wrote:
On Thu, Nov 18, 2010 at 4:50 AM, Fred <[hidden email]> wrote:
Le 17/11/2010 20:04, bryce hendrix a écrit :
> On Wed, Nov 17, 2010 at 12:27 PM, Robert Kern <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On Wed, Nov 17, 2010 at 12:26 PM, bryce hendrix
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      > On Wed, Nov 17, 2010 at 12:24 PM, Robert Kern
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      >>
>      >> On Wed, Nov 17, 2010 at 12:17 PM, bryce hendrix
>     <[hidden email] <mailto:[hidden email]>>
>      >> wrote:
>      >> > On Wed, Nov 17, 2010 at 12:14 PM, Fred <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      >> >>
>      >> >> Le 17/11/2010 18:49, Robert Kern a écrit :
>      >> >>
>      >> >> > Judging from the traceback, it gets invoked while the font
>     manager is
>      >> >> > building the list of available fonts. That means that Fred
>     has some
>      >> >> > fonts with associated Adobe Font Metrics files laying about.
>      >> >> May be something related with my LaTeX stuff installed?
>      >> >>
>      >> >
>      >> > Could be. There has to be somewhere that a font with the
>     extension .afm
>      >> > is
>      >> > installed...
>      >>
>      >> So why don't you just update the afm.py to the latest version, too?
>      >>
>      >
>      > I will, but I want to test it afterwards :)
>
>     I'm sure Fred's happy to. :-)
>
>
> It takes a bit of crafting to get rid of all other matpliblib imports,
> so its not a simple cut & paste.
>
> I did just install a bunch of afm fonts, and I don't have any issues.
> Maybe one of Fred's fonts didn't get parsed correctly?
>
> Fred, can you wrap afm.py, line 380 in a try/except and print out what
> self._heading when catching the exception?
{'FontName': 'CanGoods', 'FontBBox': [-1, -200, 697, 820], 'Descender':
-170.0, 'Ascender': 750.0, 'IsFixedPitch': False, 'Notice': 'Copyright
(c) Fish Dicks Original Fonts, 1. All rights reserved.',
'StartFontMetrics': 2.0, 'UnderlinePosition': -133,
'UnderlineThickness': 20, 'ItalicAngle': 0.0, 'FullName': 'CanGoods',
'StartCharMetrics': 80}


Thanks Fred. It looks like its probably just one font (or a couple) that is missing the FontFamily. I think we're safe to handle this case by ignoring the font. I'll fix up the code to handle it.

Bryce


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
12