wiredfool
39df75bd07
Merge pull request #2706 from wiredfool/issue_2666
...
Fix for crash drawing empty strings
2017-09-04 11:26:28 +01:00
wiredfool
c25cd96b71
Fix for truetype memory leak, #2629
2017-09-04 09:58:05 +00:00
Eric Soroos
ee430550eb
fix raqm with 0 length strings
2017-08-31 19:31:05 +00:00
wiredfool
bb7124325e
Don't return null on empty string
2017-08-31 08:52:29 -07:00
wiredfool
ff2c440921
Additional replacements of s# with PY_ARG_BYTES_LENGTH
2017-08-22 04:04:35 -07:00
Andrew Murray
3dd3a90646
Added fix for font getsize on empty string
2017-07-16 17:23:08 +10:00
wiredfool
b8c04de043
added layout engine switch
2017-06-21 14:00:15 -07:00
wiredfool
42831098ac
Fix RAQM feature detection
2017-06-21 14:00:15 -07:00
Fahad Al-Saidi
e07a254ed9
update
2017-06-21 14:00:14 -07:00
Fahad Al-Saidi
74e4ccc0ec
declare text_layout_raqm only when we HAVE_RAQM
2017-06-21 14:00:14 -07:00
Fahad Al-Saidi
629f83228a
break up text_layout into two implementations
2017-06-21 14:00:14 -07:00
Fahad Al-Saidi
de8ba933e5
fix windows build
2017-06-21 14:00:14 -07:00
Fahad Al-Saidi
19929791ee
fix windows build
2017-06-21 14:00:14 -07:00
shamsa
a77850564a
Fix gitsize function.
2017-06-21 14:00:14 -07:00
shamsa
fcd20da3cb
Testing complex text layout.
2017-06-21 14:00:14 -07:00
shamsa
326e23d3e6
fallback code
2017-06-21 14:00:13 -07:00
shamsa
349ac49a4c
Fix build with python 3.2
2017-06-21 14:00:13 -07:00
shamsa
0b178edbc8
Add complex text support.
...
This pull request adds support for languages that require complex text layout.
We are using the Raqm library, that wraps FriBidi (for bidirectional
text support) and HarfBuzz (for text shaping), and does proper BiDi and script
itemization:
https://github.com/HOST-Oman/libraqm
This should fix #1089 .
2017-06-21 14:00:13 -07:00
Andrew Murray
572a3d970c
Removed whitespace from blank lines
2016-09-03 12:23:42 +10:00
wiredfool
ffb61968f0
Initialize ptr and guard call to free
2016-05-30 03:56:28 -07:00
wiredfool
72c45e6f5d
Fix Fatal Python error: UNREF invalid object in debug builds
...
PyObject_Del() should only be called on the self object in
a dealloc call, not after failing to make a new object.
Replace with Py_DECREF, which eventually calls PyObject_Del()
http://bugs.python.org/issue3299#msg78740
https://mail.python.org/pipermail/python-dev/2003-February/033258.html
2016-05-30 03:16:16 -07:00
wiredfool
a842497753
consistent line spacing
2015-11-18 07:02:16 -08:00
Andrew Murray
6bd7e7f02d
Removed trailing whitespace
2015-10-11 21:24:35 +11:00
wiredfool
0877c9959f
Merge pull request #1247 from radarhere/freetype
...
Removed support for FreeType 2.0
2015-06-16 11:46:04 -07:00
Andrew Murray
9e24ae023d
Fixed various typos
2015-06-08 01:17:49 +10:00
Andrew Murray
045190d3dd
Removed support for FreeType 2.0
2015-06-01 18:50:37 +10:00
wiredfool
8b7b297aba
rearranged comments
2015-01-07 21:38:36 -08:00
Yifu Yu
307726edc0
Close #891 : a dirty solution to embedded bitmap fonts.
...
Since embedded bitmap font works incorrectly, we should avoid using
them, until a final patch is available and tested. I've added
`FT_LOAD_NO_BITMAP` to ALL(3) places in `_imagingft.c`, which did
(not much) actually fixed the issue. A notice has also been added to
`_imagingft.c`.
2015-01-07 21:38:35 -08:00
wiredfool
bd5935032f
initialize unused pointer to prevent freeing without allocating
2014-01-27 23:24:42 -08:00
wiredfool
0141d15aad
Allocate storage for font_bytes, fixes #483
2014-01-27 23:14:59 -08:00
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