From ecdf2d82eea29a902bac2ecdbf62cf2b6b839386 Mon Sep 17 00:00:00 2001 From: Clément Pit-Claudel Date: Sat, 14 Apr 2018 13:41:23 -0400 Subject: doc: Rename UbuntuMono-Square to CoqNotations and tweak spacing The Ubuntu Font License requires substantially modified fonts to be renamed entirely. --- doc/LICENSE | 18 ++++++++++-------- doc/sphinx/_static/CoqNotations.ttf | Bin 0 -> 37988 bytes doc/sphinx/_static/UbuntuMono-Square.ttf | Bin 38104 -> 0 bytes doc/sphinx/_static/notations.css | 12 ++++++------ doc/tools/coqrst/notations/CoqNotations.ttf | Bin 0 -> 37988 bytes doc/tools/coqrst/notations/UbuntuMono-Square.ttf | Bin 38200 -> 0 bytes doc/tools/coqrst/notations/fontsupport.py | 7 +++---- 7 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 doc/sphinx/_static/CoqNotations.ttf delete mode 100644 doc/sphinx/_static/UbuntuMono-Square.ttf create mode 100644 doc/tools/coqrst/notations/CoqNotations.ttf delete mode 100644 doc/tools/coqrst/notations/UbuntuMono-Square.ttf diff --git a/doc/LICENSE b/doc/LICENSE index 7ae31b089..c223a4e16 100644 --- a/doc/LICENSE +++ b/doc/LICENSE @@ -2,15 +2,17 @@ The Coq Reference Manual is a collective work from the Coq Development Team whose members are listed in the file CREDITS of the Coq source package. All related documents (the LaTeX and BibTeX sources, the embedded png files, and the PostScript, PDF and html outputs) are -copyright (c) INRIA 1999-2006, with the exception of the Ubuntu font files -(UbuntuMono-Square.ttf and UbuntuMono-B.ttf), derived from UbuntuMono-Regular, -which is Copyright 2010,2011 Canonical Ltd and licensed under the Ubuntu font +copyright (c) INRIA 1999-2006, with the exception of the Ubuntu font +file UbuntuMono-B.ttf, which is +Copyright 2010,2011 Canonical Ltd and licensed under the Ubuntu font license, version 1.0 -(https://www.ubuntu.com/legal/terms-and-policies/font-licence). The material -connected to the Reference Manual may be distributed only subject to the terms -and conditions set forth in the Open Publication License, v1.0 or later (the -latest version is presently available at http://www.opencontent.org/openpub/). -Options A and B are *not* elected. +(https://www.ubuntu.com/legal/terms-and-policies/font-licence), and its +derivative CoqNotations.ttf distributed under the same license. The +material connected to the Reference Manual may be distributed only +subject to the terms and conditions set forth in the Open Publication +License, v1.0 or later (the latest version is presently available at +http://www.opencontent.org/openpub/). Options A and B are *not* +elected. The Coq Tutorial is a work by Gérard Huet, Gilles Kahn and Christine Paulin-Mohring. All documents (the LaTeX source and the PostScript, diff --git a/doc/sphinx/_static/CoqNotations.ttf b/doc/sphinx/_static/CoqNotations.ttf new file mode 100644 index 000000000..da8f2850d Binary files /dev/null and b/doc/sphinx/_static/CoqNotations.ttf differ diff --git a/doc/sphinx/_static/UbuntuMono-Square.ttf b/doc/sphinx/_static/UbuntuMono-Square.ttf deleted file mode 100644 index 12b7c6d51..000000000 Binary files a/doc/sphinx/_static/UbuntuMono-Square.ttf and /dev/null differ diff --git a/doc/sphinx/_static/notations.css b/doc/sphinx/_static/notations.css index 9b7b826d5..f899945a3 100644 --- a/doc/sphinx/_static/notations.css +++ b/doc/sphinx/_static/notations.css @@ -22,10 +22,10 @@ } @font-face { /* This font has been edited to center all characters */ - font-family: 'UbuntuMono-Square'; + font-family: 'CoqNotations'; font-style: normal; font-weight: 800; - src: local('UbuntuMono-Square'), url(./UbuntuMono-Square.ttf) format('truetype'); + src: local('CoqNotations'), url(./CoqNotations.ttf) format('truetype'); } .notation .notation-sup, .notation .notation-sub { @@ -34,15 +34,15 @@ color: black; /* cursor: help; */ display: inline-block; - font-size: 0.5em; + font-size: 0.45em; font-weight: bolder; - font-family: UbuntuMono-Square, monospace; - height: 2em; + font-family: CoqNotations, monospace; + height: 2.2em; line-height: 1.6em; position: absolute; right: -1em; /* half of the width */ text-align: center; - width: 2em; + width: 2.2em; } .notation .repeat { diff --git a/doc/tools/coqrst/notations/CoqNotations.ttf b/doc/tools/coqrst/notations/CoqNotations.ttf new file mode 100644 index 000000000..da8f2850d Binary files /dev/null and b/doc/tools/coqrst/notations/CoqNotations.ttf differ diff --git a/doc/tools/coqrst/notations/UbuntuMono-Square.ttf b/doc/tools/coqrst/notations/UbuntuMono-Square.ttf deleted file mode 100644 index a53a9a0f0..000000000 Binary files a/doc/tools/coqrst/notations/UbuntuMono-Square.ttf and /dev/null differ diff --git a/doc/tools/coqrst/notations/fontsupport.py b/doc/tools/coqrst/notations/fontsupport.py index 3402ea2aa..a3efd97f5 100755 --- a/doc/tools/coqrst/notations/fontsupport.py +++ b/doc/tools/coqrst/notations/fontsupport.py @@ -63,8 +63,7 @@ def trim_font(fnt): def center_glyphs(src_font_path, dst_font_path, dst_name): fnt = trim_font(fontforge.open(src_font_path)) - size = max(max(g.width for g in fnt.glyphs()), - max(glyph_height(g) for g in fnt.glyphs())) + size = max(g.width for g in fnt.glyphs()) fnt.ascent, fnt.descent = size, 0 for glyph in fnt.glyphs(): scale_single_glyph(glyph, size, size) @@ -77,5 +76,5 @@ if __name__ == '__main__': from os.path import dirname, join, abspath curdir = dirname(abspath(__file__)) ubuntumono_path = join(curdir, "UbuntuMono-B.ttf") - ubuntumono_mod_path = join(curdir, "UbuntuMono-Square.ttf") - center_glyphs(ubuntumono_path, ubuntumono_mod_path, "UbuntuMono-Square") + ubuntumono_mod_path = join(curdir, "CoqNotations.ttf") + center_glyphs(ubuntumono_path, ubuntumono_mod_path, "CoqNotations") -- cgit v1.2.3