| 1 |
bicatali |
1.1 |
Restoring a fix to an old reference counting bug which was re-included in a recent commit. It fails stix_fonts_demo.py
|
| 2 |
|
|
https://github.com/matplotlib/matplotlib/commit/85af0c02bf9a8ecdd0fd18eab8c9662c6b9f4302#src/ft2font.cpp
|
| 3 |
|
|
|
| 4 |
|
|
bicatali@gentoo.org 08/2012
|
| 5 |
|
|
--- src/ft2font.cpp.orig 2012-08-01 17:30:33.000000000 +0100
|
| 6 |
|
|
+++ src/ft2font.cpp 2012-08-01 17:30:42.000000000 +0100
|
| 7 |
|
|
@@ -870,24 +870,28 @@
|
| 8 |
|
|
{
|
| 9 |
|
|
std::ostringstream s;
|
| 10 |
|
|
s << "Could not load facefile " << facefile << "; Unknown_File_Format" << std::endl;
|
| 11 |
|
|
+ ob_refcnt--;
|
| 12 |
|
|
throw Py::RuntimeError(s.str());
|
| 13 |
|
|
}
|
| 14 |
|
|
else if (error == FT_Err_Cannot_Open_Resource)
|
| 15 |
|
|
{
|
| 16 |
|
|
std::ostringstream s;
|
| 17 |
|
|
s << "Could not open facefile " << facefile << "; Cannot_Open_Resource" << std::endl;
|
| 18 |
|
|
+ ob_refcnt--;
|
| 19 |
|
|
throw Py::RuntimeError(s.str());
|
| 20 |
|
|
}
|
| 21 |
|
|
else if (error == FT_Err_Invalid_File_Format)
|
| 22 |
|
|
{
|
| 23 |
|
|
std::ostringstream s;
|
| 24 |
|
|
s << "Could not open facefile " << facefile << "; Invalid_File_Format" << std::endl;
|
| 25 |
|
|
+ ob_refcnt--;
|
| 26 |
|
|
throw Py::RuntimeError(s.str());
|
| 27 |
|
|
}
|
| 28 |
|
|
else if (error)
|
| 29 |
|
|
{
|
| 30 |
|
|
std::ostringstream s;
|
| 31 |
|
|
s << "Could not open facefile " << facefile << "; freetype error code " << error << std::endl;
|
| 32 |
|
|
+ ob_refcnt--;
|
| 33 |
|
|
throw Py::RuntimeError(s.str());
|
| 34 |
|
|
}
|
| 35 |
|
|
|