Skip to content

Commit

Permalink
Scripted Logo Generation, take two (#3935)
Browse files Browse the repository at this point in the history
* Added logo generation Python script.

* Replace lambda scale_func.n

* Matched current logo appearance.

* Simplified gradient code.

* Renamed land_mask to land_clip.

* Make new svg instead of faffing with reformatting existing.

* Refactor out 'style' in attributes.

* File header.

* Integrated logo generation script into Sphinx docs generation.

* Environment variable logo names.

* Removed banner width calculation to avoid font dependency.

* Refactored to also generate rotating logos.

* Replace plt.tightlayout with plt.subplots_adjust.

* Replaced OrderedDicts with dicts (not needed >=Py3.6).

* Numpy standard import form.

* Replaced animated SVG with precusor files for animated GIF.

* Corrected logo URL to source from ReadTheDocs site.

* Changes to better match 'hand-created' logo.

* Fixed logo rotate zip title.

* Relocated logo generation script to SciTools/marketing.

* update links (#3942)

* update links

* added s to http

* Added logo generation Python script.

* Replace lambda scale_func.n

* Matched current logo appearance.

* Simplified gradient code.

* Renamed land_mask to land_clip.

* Make new svg instead of faffing with reformatting existing.

* Refactor out 'style' in attributes.

* File header.

* Integrated logo generation script into Sphinx docs generation.

* Environment variable logo names.

* Removed banner width calculation to avoid font dependency.

* Refactored to also generate rotating logos.

* Replace plt.tightlayout with plt.subplots_adjust.

* Replaced OrderedDicts with dicts (not needed >=Py3.6).

* Numpy standard import form.

* Replaced animated SVG with precusor files for animated GIF.

* Corrected logo URL to source from ReadTheDocs site.

* Changes to better match 'hand-created' logo.

* Fixed logo rotate zip title.

* Relocated logo generation script to SciTools/marketing.

* Include version string in logo generation.

* Reference official logo generation code.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix README docs reference.

* Include the logos, don't generate on the fly.

Co-authored-by: Ruth Comer <ruth.comer@metoffice.gov.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 17, 2022
1 parent 724f1b9 commit 78437b0
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 93 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">
<a href="https://scitools-iris.readthedocs.io/en/latest/">
<img src="https://scitools-iris.readthedocs.io/en/latest/_static/iris-logo-title.png" alt="Iris" width="300"></a><br>
<img src="https://scitools-iris.readthedocs.io/en/latest/_static/iris-logo-title.svg" alt="Iris" width="300"></a><br>
</h1>


Expand Down
Binary file removed docs/src/_static/Iris7_1_trim_100.png
Binary file not shown.
Binary file removed docs/src/_static/Iris7_1_trim_full.png
Binary file not shown.
31 changes: 31 additions & 0 deletions docs/src/_static/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Iris logos

[![iris-logo-title.svg](iris-logo-title.svg)](iris-logo-title.svg)

Code for generating the logos is at:
[SciTools/marketing/iris/logo/generate_logo.py](https://github.com/SciTools/marketing/blob/master/iris/logo/generate_logo.py)

See the docstring of the `generate_logo()` function for more information.

## Why a scripted logo?

SVG logos are ideal for source-controlled projects:

* Low file size, with infinitely scaling quality
* Universally recognised vector format, editable by many software packages
* XML-style content = human-readable diff when changes are made

But Iris' logo is difficult to reproduce/edit using an SVG editor alone:

* Includes correctly projected, low resolution coastlines
* Needs precise alignment of the 'visual centre' of the iris with the centres
of the Earth and the image

An SVG image is simply XML format, so can be easily assembled automatically
with a script, which can also be engineered to address the above problems.

Further advantages of using a script:

* Parameterised text, making it easy to standardise the logo across all Iris
packages
* Can generate an animated GIF/SVG of a rotating Earth
Binary file removed docs/src/_static/favicon.ico
Binary file not shown.
Binary file removed docs/src/_static/iris-logo-title.png
Binary file not shown.
197 changes: 107 additions & 90 deletions docs/src/_static/iris-logo-title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions docs/src/_static/iris-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ def _dotv(version):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_logo = "_static/iris-logo-title.png"
html_favicon = "_static/favicon.ico"
html_logo = "_static/iris-logo-title.svg"
html_favicon = "_static/iris-logo.svg"
html_theme = "pydata_sphinx_theme"

# See https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/configuring.html#configure-the-search-bar-position
Expand Down

0 comments on commit 78437b0

Please sign in to comment.