wiredfool
b8c04de043
added layout engine switch
2017-06-21 14:00:15 -07:00
shamsa
a77850564a
Fix gitsize function.
2017-06-21 14:00:14 -07:00
shamsa
326e23d3e6
fallback code
2017-06-21 14:00:13 -07:00
shamsa
3e5007c84d
Fix failure in test_imagefont.py
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
58b5c9187d
Replaced absolute PIL imports with relative imports ( #2349 )
2017-01-17 13:22:18 +00:00
Jon Dufresne
85ec6eb251
Close file after finished reading in ImageFont._load_pilfont()
...
Fixes some "ResourceWarning: unclosed file ..." when running tests with
warnings enabled.
2016-11-17 07:46:54 -08:00
Andrew Murray
ea3be60c03
Converted documentation
2016-09-24 19:10:46 +10:00
hugovk
40c6825fb1
Use modern base64 interface over deprecated
2016-09-19 08:08:34 +03:00
homm
1ba4e9e5ba
remove end of file banner from all files
2016-07-10 14:11:28 +03:00
Andrew Murray
5f904ace9d
Removed warnings check
2015-12-09 16:55:33 +11:00
wiredfool
89ccf66ff7
Merge pull request #1343 from radarhere/deprecated
...
Removed deprecated code
2015-09-29 15:38:34 +01:00
Andrew Murray
3841a11fb5
Removed ImageFont filename param, deprecated in 2.1
2015-09-19 21:06:12 +10:00
Andrew Murray
c6b13d294f
Flake8 fixes
2015-08-25 22:27:18 +10:00
Andrew Murray
77e2878734
Fixed redefining built-ins
2015-06-02 00:09:18 +10:00
Hugo
394b245a39
Merge pull request #1240 from radarhere/future
...
Correct future print imports
2015-05-27 14:37:38 +03:00
Andrew Murray
3c7e37d2d7
Replaced old-style classes
2015-05-27 00:07:21 +10:00
Andrew Murray
4e2de9d9ed
Added missing future print imports and removed unnecessary imports
2015-05-23 20:28:41 +10:00
hugovk
2879819ce7
Style/health fixes
2015-04-01 16:47:01 +03:00
Andrew Murray
b75ee4c5b6
Added tests for font paths without extensions and for preferring ttf extensions
2015-04-01 15:26:00 +11:00
Andrew Murray
3e9e95b00a
Changed truetype() to prefer .ttf extensions
2015-03-21 21:13:15 +11:00
Andrew Murray
84ec2af495
Allow truetype() to search for extensions other than .ttf
2015-03-21 21:13:15 +11:00
hugovk
b17384cfca
Tabs to spaces and other flake8 fixes
2015-03-21 10:32:26 +02:00
Andrew Murray
fb3fe4b877
Added documentation for font_variant() [ci skip]
2015-03-07 18:38:17 +11:00
Andrew Murray
7a798f8724
Added copy method font_variant() and accessible properties to truetype()
2015-03-04 00:00:18 +11:00
Robin Lewis
7fafd09bf5
Document filename parameter as deprecated in truetype()
2015-02-23 12:23:01 +00:00
Robin Lewis
066faeb211
Reference non-deprecated argument in truetype documentation
2015-02-23 12:00:52 +00:00
Charles Law
1c6a89e4c2
default to using /usr/share when XDG_DATA_DIRS is empty or unset
2014-12-29 17:03:39 -08:00
Charles Law
17d720aebc
Partial Fix #370 : look for linux fonts in common places
2014-12-26 19:12:06 -05:00
Charles Law
4d2dd3ee7b
Partial Fix #370 : look for osx fonts in common places
2014-12-26 19:12:05 -05:00
wiredfool
552effb90d
Merge #772 and master
2014-07-08 10:29:53 -07:00
hugovk
add45b494a
Extract __main__ section of PIL/ImageFont.py into Scripts/createfontdatachunk.py
2014-07-07 22:31:20 +03:00
Takeshi KOMIYA
60628c77b3
Fix return value of FreeTypeFont.textsize() does not include font offsets
2014-07-07 14:42:46 +09:00
hugovk
770ef9312b
flake8 and fix path in __main__
2014-07-05 01:02:46 +03:00
hugovk
78003ca473
Update paths to Tests/images/ instead of Images/
2014-06-23 09:19:29 +03:00
hugovk
92507e5d0a
Fix issue #382 : TypeError with TransposedFont's getsize()
...
When getting the size of text with a TransposedFont it was failing:
File "/usr/local/lib/python2.7/site-packages/PIL/ImageDraw.py", line 281, in textsize
return font.getsize(text)
File "/usr/local/lib/python2.7/site-packages/PIL/ImageFont.py", line 189, in getsize
w, h = self.font.getsize(text)[0]
TypeError: 'int' object is not iterable
This is because self.font.getsize(text) returns a (w, h) tuple. To fix, remove the [0].
Test cases have been created in test_imagefont.py:
test_rotated_transposed_font()
test_unrotated_transposed_font()
Both fail before the fix, both pass with the fix. Furthermore, the code I'm using this from ( https://github.com/mattdeboard/word_cloud ) now works as expected and creates a word cloud similar to the ones that PIL created.
2013-10-17 19:00:42 +03:00
Stephen Johnson
bc0f53aceb
Fully document PIL.ImageFont
2013-10-12 17:14:12 -07:00
paddywwoof
02855a86c0
hopefully this uses a reasonable y offset
2013-09-20 14:02:40 +01:00
Martijn Pieters
97f1cd55ee
Fix for #304 : test for str
, not "utf-8"
.
...
The code wants to produce a `str` object for the given Python version (which is the right thing to do here).
2013-07-25 18:21:08 +01:00
lmollea
763be8614d
Fixed windows fallback (wasn't using correct file in windows/fonts)
2013-07-22 14:44:40 +02:00
Alex Clark
fd29e707e9
Apply @Arfrever patch, fixes #258
2013-06-30 07:04:42 -04:00
wiredfool
310341cec7
merge from master
2013-05-13 09:17:52 -07:00
wiredfool
39c62f76ab
Buffer lifetime needs to be the same as the font lifetime
2013-04-25 21:17:58 -07:00
Nicolas Pieuchot
028e63865e
Changing bytes variable name not to squeeze bytes type
2013-04-25 23:03:37 +02:00
Nicolas Pieuchot
4d136d94ce
Better unity with Image.py file (on string type testing and warnings)
2013-04-25 22:32:43 +02:00
Nicolas Pieuchot
282562ec19
Adding Python3 basestring compatibility without changing basestring
2013-04-25 22:03:37 +02:00
Nicolas Pieuchot
f1c245c9c5
Deprecation message correction
2013-04-25 21:10:42 +02:00
Nicolas Pieuchot
af72132349
Correction of the unbufferizing
2013-04-25 20:57:13 +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