diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 78a6532..c764c61 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -15,6 +15,7 @@ OpenBMH's own code and documentation use GPL-3.0-only. This does not replace the | LatoLatin Regular and Bold | Unmodified fonts included with RmlUi 6.3 | SIL Open Font License 1.1 | [font notices](docs/licenses/RmlUi-fonts.txt) | | [Source Serif 4](https://github.com/adobe-fonts/source-serif) Regular and Semibold | Unmodified static TrueType files of the `release` branch, in `assets/modern/fonts` | SIL Open Font License 1.1 | [license](docs/licenses/SourceSerif4.txt) | | [Cabin Sketch](https://github.com/google/fonts/tree/main/ofl/cabinsketch) Regular and Bold | Unmodified files, in `assets/modern/fonts` | SIL Open Font License 1.1 | [license](docs/licenses/CabinSketch.txt) | +| [Caveat](https://github.com/googlefonts/caveat) Regular and Bold | Unmodified files, in `assets/modern/fonts` | SIL Open Font License 1.1 | [license](docs/licenses/Caveat.txt) | | nlohmann/json (optional editor) | 3.12.0 | MIT | [notice](docs/licenses/nlohmann-json.txt) | | cpp-httplib (optional editor) | 0.63.0, local HTTP without TLS | MIT | [notice](docs/licenses/cpp-httplib.txt) | | SDL2_image (optional editor) | 2.8.8, selected static codecs | zlib | [notice](docs/licenses/SDL2_image.txt) | diff --git a/assets/modern/fonts/Caveat-Bold.ttf b/assets/modern/fonts/Caveat-Bold.ttf new file mode 100644 index 0000000..901230a Binary files /dev/null and b/assets/modern/fonts/Caveat-Bold.ttf differ diff --git a/assets/modern/fonts/Caveat-OFL.txt b/assets/modern/fonts/Caveat-OFL.txt new file mode 100644 index 0000000..6e5220c --- /dev/null +++ b/assets/modern/fonts/Caveat-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014 The Caveat Project Authors (https://github.com/googlefonts/caveat) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/modern/fonts/Caveat-Regular.ttf b/assets/modern/fonts/Caveat-Regular.ttf new file mode 100644 index 0000000..6a6526a Binary files /dev/null and b/assets/modern/fonts/Caveat-Regular.ttf differ diff --git a/assets/modern/pages.rcss b/assets/modern/pages.rcss index ff7e8cc..61f2f8d 100644 --- a/assets/modern/pages.rcss +++ b/assets/modern/pages.rcss @@ -243,22 +243,22 @@ body .pg-btn.pg-go:hover {decorator:none;background-color:var(--p-a6);border-col /* --- tactics: a pencil sketch on the page --- */ .tk-sketch {display:block;position:relative;flex:none;} -.tk-text {display:block;position:absolute;font-family:Chalk;white-space:nowrap;pointer-events:none;} +.tk-text {display:block;position:absolute;font-family:Pencil;white-space:nowrap;pointer-events:none;} .tk-number {text-align:center;font-weight:bold;} .tk-hot,.tk-hot:hover {position:absolute;padding:0;border:0dp;border-radius:14dp;background-color:transparent;decorator:none;} .tk-hot:hover {background-color:var(--p-row);} -.tk-mark,.tk-mark:hover,.tk-mark:disabled {position:absolute;display:block;padding:0;border:0dp;background-color:transparent;decorator:none;font-family:Chalk;font-weight:bold;font-size:107dp;line-height:116dp;text-align:center;} -.pg-root .tk-mark {font-family:Chalk;font-size:107dp;} +.tk-mark,.tk-mark:hover,.tk-mark:disabled {position:absolute;display:block;padding:0;border:0dp;background-color:transparent;decorator:none;font-family:Pencil;font-weight:bold;font-size:107dp;line-height:116dp;text-align:center;} +.pg-root .tk-mark {font-family:Pencil;font-size:107dp;} .tk-mark span {display:block;} .tk-mark:hover {background-color:var(--p-row);border-radius:14dp;} .tk-drag {display:block;position:absolute;border-radius:60dp;cursor:move;} .tk-drag:hover {background-color:var(--p-row);} -.tk-title {display:block;flex:none;font-family:Chalk;font-weight:bold;font-size:68dp;line-height:72dp;} +.tk-title {display:block;flex:none;font-family:Pencil;font-weight:bold;font-size:68dp;line-height:72dp;} .tk-row,.tk-row:hover {display:flex;flex:1;align-items:center;gap:18dp;width:100%;padding:4dp;border:0dp;border-bottom:3dp var(--p-n4);border-radius:0dp;background-color:transparent;decorator:none;text-align:left;} button.tk-row:hover {background-color:var(--p-row);} .tk-row.last {border-bottom-width:0dp;} .tk-row .pg-k {flex:none;white-space:normal;} -.tk-value {display:block;flex:1;font-family:Chalk;font-weight:bold;font-size:60dp;line-height:62dp;color:var(--p-text);} +.tk-value {display:block;flex:1;font-family:Pencil;font-weight:bold;font-size:60dp;line-height:62dp;color:var(--p-text);} .tk-value.off {text-decoration:line-through;opacity:.6;} .tk-hint {display:block;font-size:30dp;line-height:40dp;} .tk-hint strong {display:block;font-weight:bold;} diff --git a/docs/licenses/Caveat.txt b/docs/licenses/Caveat.txt new file mode 100644 index 0000000..6e5220c --- /dev/null +++ b/docs/licenses/Caveat.txt @@ -0,0 +1,93 @@ +Copyright 2014 The Caveat Project Authors (https://github.com/googlefonts/caveat) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/modern/ui/tactics_page.inc b/src/modern/ui/tactics_page.inc index 6e67bb4..41b8488 100644 --- a/src/modern/ui/tactics_page.inc +++ b/src/modern/ui/tactics_page.inc @@ -108,13 +108,13 @@ std::string App::render_tactics() { box(6, 520, "Pressing", pressing); // attitude and effort under the pitch write(44, 592, "Ausrichtung:", 20, grey); - write(190, 592, text_of(0), 26, ink, "start", true); + write(150, 592, text_of(0), 26, ink, "start", true); write(560, 592, "Einsatz:", 26, ink, "start", true); const double mark_step = limits[7] > 6 ? 17 : 24; for (int n = 1; n <= limits[7]; ++n) over += btn("tactic-effort-set", "!", std::string("tk-mark") + (n <= values[7] ? " on" : ""), "id=\"tactic-effort-" + std::to_string(n) + "\" data-id=\"" + std::to_string(n) + "\" aria-label=\"Einsatz " + std::to_string(n) + " von " + std::to_string(limits[7]) + "\" " + (n < minima[7] ? "disabled " : "") + "style=\"" + - at(672 + (n - 1) * mark_step, 556, mark_step, 50) + "color:" + (n <= values[7] ? red : faint) + ";\""); + at(646 + (n - 1) * mark_step, 556, mark_step, 50) + "color:" + (n <= values[7] ? red : faint) + ";\""); // the own eleven; the wide ones are dragged out and in for (size_t i = 0; i < 11; ++i) { const auto &[x, y, side] = players[i]; diff --git a/src/modern/ui/view.cpp b/src/modern/ui/view.cpp index 92e9e3a..b855653 100644 --- a/src/modern/ui/view.cpp +++ b/src/modern/ui/view.cpp @@ -1481,6 +1481,15 @@ class App final : public Rml::EventListener { Rml::LoadFontFace(rml::asset_path(own / "CabinSketch-Regular.ttf"), "Chalk", Rml::Style::FontStyle::Normal, Rml::Style::FontWeight::Normal); if (chalk && fs::exists(own / "CabinSketch-Bold.ttf")) Rml::LoadFontFace(rml::asset_path(own / "CabinSketch-Bold.ttf"), "Chalk", Rml::Style::FontStyle::Normal, Rml::Style::FontWeight::Bold); + // the pencil hand of the tactics sketch; without its files the chalk hand writes there + bool pencil = fs::exists(own / "Caveat-Regular.ttf") && + Rml::LoadFontFace(rml::asset_path(own / "Caveat-Regular.ttf"), "Pencil", Rml::Style::FontStyle::Normal, Rml::Style::FontWeight::Normal); + if (pencil && fs::exists(own / "Caveat-Bold.ttf")) + Rml::LoadFontFace(rml::asset_path(own / "Caveat-Bold.ttf"), "Pencil", Rml::Style::FontStyle::Normal, Rml::Style::FontWeight::Bold); + if (!pencil && chalk) { + Rml::LoadFontFace(rml::asset_path(own / "CabinSketch-Regular.ttf"), "Pencil", Rml::Style::FontStyle::Normal, Rml::Style::FontWeight::Normal); + if (fs::exists(own / "CabinSketch-Bold.ttf")) Rml::LoadFontFace(rml::asset_path(own / "CabinSketch-Bold.ttf"), "Pencil", Rml::Style::FontStyle::Normal, Rml::Style::FontWeight::Bold); + } if (!display) { std::vector serif; #ifdef _WIN32