nulano
406fe59242
deprecate font.getsize and related functions
2022-06-19 22:03:34 +01:00
Hugo van Kemenade
fbb74a6050
Merge pull request #6234 from radarhere/font_variant
...
If font is file-like object, do not re-read from object to get variant
2022-05-19 23:30:44 +03:00
Andrew Murray
bcded33cee
Merge pull request #6195 from hugovk/cleanup
...
Cleanup: various
2022-04-26 18:51:44 +10:00
Andrew Murray
a40c7a6bea
If font is file-like object, do not re-read from object to get variant
2022-04-22 07:31:20 +10:00
Hugo van Kemenade
bf46c6a648
Fix docstring
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2022-04-18 07:42:05 +03:00
Andrew Murray
a33dc56560
Merge pull request #6220 from nulano/deprecate-fill
...
Deprecate FreeTypeFont.getmask2 fill parameter
2022-04-18 08:05:10 +10:00
Ondrej Baranovič
995be34ddb
flip so the conditional is positive
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-04-17 19:27:14 +02:00
Andrew Murray
c87c2cf5b3
Added removal date for fill parameter
2022-04-17 10:03:50 +02:00
Andrew Murray
2a29b2dba1
Document that fill parameter is optional
2022-04-17 10:03:50 +02:00
nulano
b4b8249c9d
None is also not a valid value
2022-04-16 17:46:43 +02:00
nulano
a766b5b0d5
deprecate fill in imageFont
2022-04-16 17:07:32 +02:00
Andrew Murray
35fbf22250
Merge branch 'main' into cleanup-names
2022-04-16 19:49:40 +10:00
Hugo van Kemenade
7fa92c67b1
[Private] class names should be CamelCase
2022-04-10 23:55:16 +03:00
Hugo van Kemenade
d241e38120
[Private] function names should be snake_case
2022-04-10 23:55:16 +03:00
Hugo van Kemenade
965df6df6f
Add missing paramters to docstrings
2022-04-10 23:39:54 +03:00
Hugo van Kemenade
935bdfa516
Use triple-quoted docstrings
2022-04-10 17:47:32 +03:00
Hugo van Kemenade
4cb8e4b3fa
Add deprecations helper
2022-04-06 13:19:52 +03:00
Andrew Murray
3c1e7a7f5a
Corrected docstring [ci skip]
2022-02-22 10:32:02 +11:00
Andrew Murray
b38a67fa12
Merge branch 'main' into enum
2022-02-10 09:52:24 +11:00
nulano
a278e0aa65
issue warning if Raqm layout is requested, but Raqm is not available
2022-02-07 23:57:35 +00:00
Andrew Murray
ed8073e846
Deprecated constants in favour of enums
2022-01-15 10:07:07 +11:00
Andrew Murray
f8e4e9c2dd
Added enums
2022-01-15 09:02:31 +11:00
Hugo van Kemenade
18d34b287f
Add support for pickling TrueType fonts
2021-11-10 14:34:20 +02:00
Hugo van Kemenade
606b5ae1e5
Remove support for FreeType 2.7 and older
2021-10-18 09:29:53 +03:00
Andrew Murray
ca3ad49de3
Fixed bug when checking FreeType2 version if it is not installed
2021-04-29 23:10:08 +10:00
Eric Soroos
ba65f0b08e
Fix Memory DOS in ImageFont
...
* A corrupt or specially crafted TTF font could have font metrics that
lead to unreasonably large sizes when rendering text in
font. ImageFont.py did not check the image size before allocating
memory for it.
* Found with oss-fuzz
* This dates from the PIL fork
2021-04-01 17:17:27 +03:00
Andrew Murray
043d8dac0b
Do not require packaging just for a DeprecationWarning
2020-12-18 23:42:16 +11:00
Hugo van Kemenade
27bf17009c
Deprecate FreeType 2.7, to be removed in Pillow 9 (2022-01-02)
2020-12-17 10:28:06 +02:00
Andrew Murray
4f0b9185a3
Fixed link formatting
2020-11-14 08:41:44 +11:00
nulano
d7a08cbd15
add color support to new text measuring functions
2020-10-12 16:05:19 +01:00
nulano
90e8255ba4
Merge remote-tracking branch 'upstream/master' into anchor-part3
...
# Conflicts:
# Tests/test_imagefontctl.py
2020-10-12 15:50:45 +01:00
nulano
067a254366
Apply suggestions from code review
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-10-11 21:55:32 +02:00
nulano
9b5931f212
typo
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-10-09 16:43:10 +02:00
nulano
c80f123923
document ImageDraw.textlength and ImageDraw.textbbox
2020-10-09 01:43:23 +01:00
nulano
395aa946a9
add getbbox and getlength, with tests
...
Squashed commits:
[ec9ec31b] add tests for invalid anchor
(cherry picked from commit 9e50a6a47f79876ee56942152047f03fff03c49b)
[386a9170] fix lint and docs
(cherry picked from commit 2d0d5282fcfc3ee332a41e60b865ee766445cc3d)
[29f5d4c9] restore and document previous getsize behaviour
see discussion in issue 4789
(cherry picked from commit 9fbc94571ce0ed42fdd11e99f343a1613c9dc6d3)
[0ffd51a0] add getbbox and getlength, with tests
(cherry picked from commit c5f63737476a998c81e589e5819d21ca69bb7b46)
2020-10-09 00:56:58 +01:00
nulano
82a28d12e2
add support for fonts with COLR data
2020-10-07 05:29:10 +01:00
nulano
a9b8dcba7d
write anchor docs
...
(cherry picked from commit dcaee36941e6cb5e6f93186b6f819fb74887e0d3)
2020-09-22 14:58:17 +02:00
nulano
e6d4c2ce8f
implement text anchor for truetype fonts
...
(cherry picked from commit bac9025918ccf944bac77addc130f33cf9d74701)
2020-09-19 15:17:45 +02:00
Hugo van Kemenade
93d011efb5
Merge pull request #4910 from nulano/anchor-part1
2020-09-19 13:41:15 +03:00
nulano
a501ba9308
update link in comment
2020-09-11 01:14:00 +02:00
nulano
54e067779b
fix and add tests
...
(cherry picked from commit 0b711f10d0490863976699c051f2027b6799d501) (+1 squashed commits)
Squashed commits:
[9d4e6c17] fix tests
2020-09-09 02:12:21 +02:00
Hugo van Kemenade
e0eec1eb56
Merge branch 'master' into rm-3.5
2020-09-01 20:16:46 +03:00
nulano
d36850e037
fix docs typos
2020-08-11 02:14:13 +02:00
Hugo van Kemenade
e42aec8c90
Update Black target to py36
2020-07-27 17:02:10 +03:00
Andrew Murray
4ae694cd7b
Merge pull request #4712 from cool-RR/2020-06-12-raise-from
...
Fix exception causes all over the codebase
2020-06-28 15:22:05 +10:00
Hugo van Kemenade
390b34c231
Merge pull request #4664 from nulano/ft-getsize-mode
2020-06-21 18:53:03 +03:00
Ram Rachum
2f0d430807
Fix exception causes all over the codebase
2020-06-21 13:21:25 +03:00
nulano
097104278b
add docs for features module
2020-06-13 04:28:02 +02:00
nulano
9fbd35fe87
use mode for getsize
2020-06-01 22:18:38 +02:00
Hugo
dda6145fce
Since Python 3.3 IOError and WindowsError have been merged into OSError
2020-04-10 12:57:29 +03:00