Skip to content
Commits on Source (4)
......@@ -5,7 +5,7 @@ env:
- PYTHON_VERSION=$TRAVIS_PYTHON_VERSION
- NUMPY_VERSION=stable
- MAIN_CMD='python setup.py'
- CONDA_DEPENDENCIES='sphinx pillow numpy pyproj coveralls coverage mock aggdraw six pyshp'
- CONDA_DEPENDENCIES='sphinx pillow pyproj coveralls coverage mock aggdraw six pyshp'
- PIP_DEPENDENCIES=''
- SETUP_XVFB=False
- EVENT_TYPE='push pull_request'
......@@ -22,6 +22,9 @@ matrix:
os: linux
- env: PYTHON_VERSION=3.6
os: osx
- env: PYTHON_VERSION=3.6
os: windows
language: bash
install:
- git clone --depth 1 git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
......
## Version 1.2.2 (2019/01/16)
### Pull Requests Merged
#### Bugs fixed
* [PR 24](https://github.com/pytroll/pycoast/pull/24) - Fix default font loading for 'add_grid'
In this release 1 pull request was closed.
## Version 1.2.1 (2018/11/12)
### Pull Requests Merged
......
pycoast (1.2.1+dfsg-2) UNRELEASED; urgency=medium
pycoast (1.2.2+dfsg-1) unstable; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.3.0, no changes.
-- Antonio Valentino <antonio.valentino@tiscali.it> Tue, 25 Dec 2018 23:00:31 +0100
-- Antonio Valentino <antonio.valentino@tiscali.it> Thu, 17 Jan 2019 07:02:37 +0000
pycoast (1.2.1+dfsg-1) unstable; urgency=medium
......
......@@ -76,6 +76,9 @@ class ContourWriterBase(object):
def _draw_grid_labels(self, draw, xys, linetype, txt, font, **kwargs):
"""Draw text with default PIL module
"""
if font is None:
# NOTE: Default font does not use font size in PIL writer
font = self._get_font(kwargs.get('outline', 'black'), font, 12)
placement_def = kwargs[linetype].lower()
for xy in xys:
# note xy[0] is xy coordinate pair,
......@@ -173,9 +176,6 @@ class ContourWriterBase(object):
kwargs['minor_outline_opacity']
minor_line_kwargs['width'] = kwargs['minor_width']
# set text fonts
if font is None:
font = ImageFont.load_default()
# text margins (at sides of image frame)
y_text_margin = 4
x_text_margin = 4
......
......@@ -464,4 +464,6 @@ class ContourWriterPIL(ContourWriterBase):
def _get_font(self, outline, font_file, font_size):
"""Return a font."""
if font_file is None:
return ImageFont.load_default()
return ImageFont.truetype(font_file, font_size)
......@@ -23,9 +23,9 @@ def get_keywords():
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keywords().
git_refnames = " (HEAD -> master, tag: v1.2.1)"
git_full = "eb186a0495fe0578f35c30c625ce77d337efd236"
git_date = "2018-11-12 13:16:08 -0600"
git_refnames = " (HEAD -> master, tag: v1.2.2)"
git_full = "5ca4031ada1fadfb61c8dd73259d33c4f69498b4"
git_date = "2019-01-16 10:44:14 -0600"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
......