From 961c341c20c13b90a9a09dfafd1191d6a7af7a54 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 1 Apr 2020 09:41:35 +0300 Subject: [PATCH 1/2] Add release notes for #3907 PcfFontFile charset encodings --- docs/releasenotes/7.1.0.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/releasenotes/7.1.0.rst b/docs/releasenotes/7.1.0.rst index 9066b720d60..b7e0dcfc362 100644 --- a/docs/releasenotes/7.1.0.rst +++ b/docs/releasenotes/7.1.0.rst @@ -42,6 +42,21 @@ Reading JPEG comments When opening a JPEG image, the comment may now be read into :py:attr:`~PIL.Image.Image.info`. +Support for different charset encodings in PcfFontFile +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Previously ``PcfFontFile`` output only bitmap PIL fonts with ISO 8859-1 encoding, even +though the PCF format supports Unicode, making it hard to work with Pillow with bitmap +fonts in languages which use different character sets. + +Now it's possible to set a different charset encoding in ``PcfFontFile``'s class +constructor. By default, it generates a PIL font file with ISO 8859-1 as before. The +generated PIL font file still contains up to 256 characters, but the character set is +different depending on the selected encoding. + +To use such a font with ``ImageDraw.text``, called it with a bytes object with the same +encoding as the font file. + X11 ImageGrab.grab() ^^^^^^^^^^^^^^^^^^^^ Support has been added for ``ImageGrab.grab()`` on Linux using the X server From afa98d51201c73b0012e5fb10da3597ffdf8b4f6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 1 Apr 2020 10:04:59 +0300 Subject: [PATCH 2/2] Fix typo Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- docs/releasenotes/7.1.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/releasenotes/7.1.0.rst b/docs/releasenotes/7.1.0.rst index b7e0dcfc362..346b9b49099 100644 --- a/docs/releasenotes/7.1.0.rst +++ b/docs/releasenotes/7.1.0.rst @@ -54,7 +54,7 @@ constructor. By default, it generates a PIL font file with ISO 8859-1 as before. generated PIL font file still contains up to 256 characters, but the character set is different depending on the selected encoding. -To use such a font with ``ImageDraw.text``, called it with a bytes object with the same +To use such a font with ``ImageDraw.text``, call it with a bytes object with the same encoding as the font file. X11 ImageGrab.grab()