Commit Graph

24 Commits

Author SHA1 Message Date
John Harvey
f90e4327c9 stop leaking filename parameter passed to getfont 2013-12-29 20:33:55 +00:00
wiredfool
ed8cede51e Freeing glyph, fixes #446 2013-12-13 21:29:17 -08:00
Andrew Stromnov
c6040f618d fix compiling with FreeType 2.5.1 2013-11-28 16:58:43 +04:00
paddywwoof
02855a86c0 hopefully this uses a reasonable y offset 2013-09-20 14:02:40 +01:00
Alex Clark
bb1b3a532c Cleanup WS, courtesy of @Arfrever
find * -type f "-(" -name "*.bdf" -o -name "*.c" -o -name "*.h" -o -name "*.py" -o -name "*.rst" -o -name "*.txt" "-)" -exec sed -e "s/[[:space:]]*$//" -i {} \;
2013-06-30 18:42:19 -04:00
Christoph Gohlke
df31b3d53e Fix msvc compile errors (issue #230) 2013-05-24 11:19:51 -06:00
wiredfool
43d0aaac24 More logical name for the font buffer 2013-04-25 21:16:53 -07:00
Nicolas Pieuchot
af72132349 Correction of the unbufferizing 2013-04-25 20:57:13 +02:00
Nicolas Pieuchot
b170c5627e Restablishing old changes 2013-04-25 18:54:57 +02:00
Nicolas Pieuchot
450a068ccb Removing buffer from imagefont 2013-04-25 18:48:43 +02:00
Nicolas Pieuchot
ed9945c71f Allowing to pass font as file-like objects 2013-04-22 11:48:06 +02:00
Fabio M. Costa
0b9e404761 DRYing out the code 2013-04-12 01:25:16 -04:00
Takeshi KOMIYA
efd70fb295 Fix rendered characters have been chipped for some TrueType fonts
This patch is from http://pastebin.com/jP2iLkDN
2013-04-11 19:16:26 +09:00
Takeshi KOMIYA
e44f35eec2 Revert pull request #45 2013-04-11 18:57:27 +09:00
Alex Clark ☺
1a293f9f75 Merge pull request #45 from tk0miya/fix-rendered-chars-have-been-chipped
Fix rendered characters have been chipped for some TrueType fonts
2013-04-09 09:55:49 -07:00
Christoph Gohlke
c334626b8b Use Py_ssize_t instead of long 2013-02-13 18:42:46 -08:00
Takeshi KOMIYA
103cf49c91 Fix rendered characters have been chipped for some TrueType fonts
ImageFont ignores descender value of TrueType fonts (uses ascender only),
then some fonts which use descender is chipped on rendering.
2013-01-31 14:59:01 +09:00
Brian Crowell
a8599e8bb2 py3k: Remove ancient Python hacks 2013-01-10 08:46:57 -06:00
Brian Crowell
af5228896a py3k: Add module initialization and unicode/bytes int/long thunks
This commit:

* Adds Python 3 module initialization functions. I split out the main init
  of each module into a static setup_module function.
* Adds a py3.h which unifies int/long in Python 3 and unicode/bytes in
  Python 2. _imagingft.c unfortunately looks a little kludgy after this
  because it was already using PyUnicode functions, and I had to mix and
  match there manually.

With this commit, the modules all build successfully under Python 3.

What this commit does NOT do is patch all of the uses of PyArg_ParseTuple
and Py_BuildValue, which all need to be checked for proper use of bytes
and unicode codes. It also does not let selftest.py run yet, because there
are probably hundreds of issues to fix in the Python code itself.
2013-01-10 08:46:37 -06:00
Brian Crowell
d28a2fee76 py3k: Remove HAVE_UNICODE from _imagingft
I'm pretty sure this preserves the intent of the code. HAVE_UNICODE is now
assumed, and PyString is only used if we're not in Py3k.

Since this is the only file that uses PyUnicode, I'm going to go ahead and
#define PyUnicode and PyBytes back to PyString for 2.6, and explicitly
change out every call so I have to check them all.
2013-01-10 08:46:36 -06:00
Brian Crowell
9519013466 py3k: Modernize type declarations
This updates several Python type definitions and uses to bring us closer
to Python 3 compatibility. This includes:

* Replacing staticforward and statichere with static. These were a hack for
  old compilers and are not supported/needed anymore.
* Using Py_TYPE() instead of ob_type; ob_type is hidden in Py3.
* Replacing getattr with getters/setters. getattr is sort-of supported in
  Py3, but Py_FindMethod is not. So we just use the newer
  methods/getsetters mechanisms and start using PyType_Ready everywhere.
* Use PyVarObject_HEAD_INIT for types, since types are PyVarObject.
* Use PyMODINIT_FUNC for module initialization functions.

There are some tab/space issues in this commit. I'm set for spaces; the
source is a little schizo.
2013-01-10 08:46:34 -06:00
Eliot
558254f028 Revert "Fix descender parameter was ignored on rendering truetype fonts"
This reverts commit 501c5c47b6.
2012-05-03 15:55:51 -07:00
Takeshi KOMIYA
501c5c47b6 Fix descender parameter was ignored on rendering truetype fonts 2011-10-22 14:33:29 +09:00
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00