diff --git a/README.fr.md b/README.fr.md index febd70e..b3d6473 100644 --- a/README.fr.md +++ b/README.fr.md @@ -245,15 +245,15 @@ couleur, est mémorisé par navigateur. bouton soleil/lune de l'en-tête bascule entre clair et sombre. - *Affichage des logs* : taille du texte (très petite, petite, moyenne, grande), densité (normale, ou compacte pour afficher environ 50 % de lignes en plus à l'écran) et police : - la police monospace du système, [Iosevka](https://github.com/be5invis/Iosevka) (étroite, - donc plus de texte par ligne ; servie par LogStream lui-même, fonctionne hors ligne), ou - l'une des 12 polices libres conçues pour le texte dense (JetBrains Mono, Fira Code, Source - Code Pro, IBM Plex Mono, Cascadia Code, Roboto Mono, Ubuntu Mono, Inconsolata, Red Hat Mono, - Noto Sans Mono, Victor Mono, DM Mono). Ces 12 polices sont chargées par le navigateur depuis - [Bunny Fonts](https://fonts.bunny.net), un service européen de polices respectueux de la vie - privée ; sans accès à internet, la police du système est utilisée. Les ligatures sont - désactivées pour que `->` ou `!=` s'affichent tels quels. Le réglage le plus dense est Très - petite + Compacte + Iosevka. + la police monospace du système, l'une des 3 polices étroites intégrées, servies par + LogStream lui-même et utilisables hors ligne (Inconsolata Condensed, la plus étroite, + Iosevka et Ubuntu Mono), ou l'une des 11 polices libres conçues pour le texte dense + (JetBrains Mono, Fira Code, Source Code Pro, IBM Plex Mono, Cascadia Code, Roboto Mono, + Inconsolata, Red Hat Mono, Noto Sans Mono, Victor Mono, DM Mono). Ces 11 polices sont + chargées par le navigateur depuis [Bunny Fonts](https://fonts.bunny.net), un service + européen de polices respectueux de la vie privée ; sans accès à internet, la police du + système est utilisée. Les ligatures sont désactivées pour que `->` ou `!=` s'affichent tels + quels. Le réglage le plus dense est Très petite + Compacte + Inconsolata Condensed. - **Données** : « Supprimer tous les logs » efface définitivement tous les logs stockés (il faut taper `PURGE` pour confirmer). Les tags et les paramètres sont conservés. VictoriaLogs doit être lancé avec `-delete.enable` (déjà présent dans `docker-compose.yml`) ; mettez diff --git a/README.md b/README.md index bb4f266..dcde535 100644 --- a/README.md +++ b/README.md @@ -223,14 +223,14 @@ remembered per browser. - *Theme*: System (follows the computer/phone preference), Light or Dark. The sun/moon button in the header switches between light and dark. - *Log display*: font size (tiny, small, medium, large), density (normal, or compact to - fit about 50% more lines on screen) and font: the system monospace font, - [Iosevka](https://github.com/be5invis/Iosevka) (narrow, so more text fits on each line; - served by LogStream itself, works offline), or one of 12 free fonts made for dense text - (JetBrains Mono, Fira Code, Source Code Pro, IBM Plex Mono, Cascadia Code, Roboto Mono, - Ubuntu Mono, Inconsolata, Red Hat Mono, Noto Sans Mono, Victor Mono, DM Mono). These 12 are - loaded by the browser from [Bunny Fonts](https://fonts.bunny.net), a privacy-friendly - European font service; without internet access, the system font is used. Ligatures are - disabled so `->` or `!=` show as typed. The densest setting is Tiny + Compact + Iosevka. + fit about 50% more lines on screen) and font: the system monospace font, one of 3 narrow + built-in fonts served by LogStream itself, which work offline (Inconsolata Condensed, the + narrowest, Iosevka and Ubuntu Mono), or one of 11 free fonts made for dense text (JetBrains + Mono, Fira Code, Source Code Pro, IBM Plex Mono, Cascadia Code, Roboto Mono, Inconsolata, + Red Hat Mono, Noto Sans Mono, Victor Mono, DM Mono). These 11 are loaded by the browser from + [Bunny Fonts](https://fonts.bunny.net), a privacy-friendly European font service; without + internet access, the system font is used. Ligatures are disabled so `->` or `!=` show as + typed. The densest setting is Tiny + Compact + Inconsolata Condensed. - **Data**: "Delete all logs" permanently erases every stored log (you must type `PURGE` to confirm). Tags and settings are kept. VictoriaLogs needs `-delete.enable` (already set in `docker-compose.yml`); set `ALLOW_PURGE=false` to disable the feature. diff --git a/web/app.js b/web/app.js index 9243ee7..d19762f 100644 --- a/web/app.js +++ b/web/app.js @@ -122,7 +122,7 @@ const I18N = { sizeTiny: 'Tiny', sizeSmall: 'Small', sizeMedium: 'Medium', sizeLarge: 'Large', density: 'Density', densityNormal: 'Normal', densityCompact: 'Compact', fontLabel: 'Font', fontSystem: 'System monospace (no download)', fontBuiltin: 'built in, narrow', - fontHelp: 'Free fonts (SIL Open Font License). Iosevka is served by LogStream itself and works offline; it is narrow, so more text fits on each line. The others are loaded by your browser from Bunny Fonts, a privacy-friendly European font service; without internet access, the system font is used.', + fontHelp: 'Free fonts. The built-in ones (Inconsolata Condensed, the narrowest, Iosevka and Ubuntu Mono) are served by LogStream itself and work offline; they are narrow, so more text fits on each line. The others are loaded by your browser from Bunny Fonts, a privacy-friendly European font service; without internet access, the system font is used.', previewMsgs: ['error: link down on eth1, carrier lost', 'warning: disk /dev/sda temperature 58°C', 'backup finished: ok (12.4 GB in 00:14:32)'], dangerZone: 'Danger zone', purgeHelp: 'Permanently delete every stored log to start from scratch. Color tags and settings are kept.', @@ -276,7 +276,7 @@ const I18N = { sizeTiny: 'Très petite', sizeSmall: 'Petite', sizeMedium: 'Moyenne', sizeLarge: 'Grande', density: 'Densité', densityNormal: 'Normale', densityCompact: 'Compacte', fontLabel: 'Police', fontSystem: 'Monospace du système (aucun téléchargement)', fontBuiltin: 'intégrée, étroite', - fontHelp: 'Polices libres (licence SIL Open Font). Iosevka est servie par LogStream lui-même et fonctionne hors ligne ; elle est étroite, donc chaque ligne affiche plus de texte. Les autres sont chargées par votre navigateur depuis Bunny Fonts, un service européen respectueux de la vie privée ; sans accès à internet, la police du système est utilisée.', + fontHelp: 'Polices libres. Les polices intégrées (Inconsolata Condensed, la plus étroite, Iosevka et Ubuntu Mono) sont servies par LogStream lui-même et fonctionnent hors ligne ; elles sont étroites, donc chaque ligne affiche plus de texte. Les autres sont chargées par votre navigateur depuis Bunny Fonts, un service européen respectueux de la vie privée ; sans accès à internet, la police du système est utilisée.', previewMsgs: ['error: link down on eth1, carrier lost', 'warning: disk /dev/sda temperature 58°C', 'backup finished: ok (12.4 GB in 00:14:32)'], dangerZone: 'Zone de danger', purgeHelp: 'Supprime définitivement tous les logs stockés pour repartir de zéro. Les tags de couleur et les réglages sont conservés.', @@ -543,14 +543,15 @@ $('#themeSwitch').addEventListener('click', (ev) => { // built-in ones (web/fonts, declared in style.css), which also work offline. const LOG_FONTS = [ { id: 'system' }, + { id: 'inconsolata-condensed', family: 'Inconsolata Condensed', builtin: true }, { id: 'iosevka', family: 'Iosevka', builtin: true }, + { id: 'ubuntu-mono', family: 'Ubuntu Mono', builtin: true }, { id: 'jetbrains-mono', family: 'JetBrains Mono' }, { id: 'fira-code', family: 'Fira Code' }, { id: 'source-code-pro', family: 'Source Code Pro' }, { id: 'ibm-plex-mono', family: 'IBM Plex Mono' }, { id: 'cascadia-code', family: 'Cascadia Code' }, { id: 'roboto-mono', family: 'Roboto Mono' }, - { id: 'ubuntu-mono', family: 'Ubuntu Mono' }, { id: 'inconsolata', family: 'Inconsolata' }, { id: 'red-hat-mono', family: 'Red Hat Mono' }, { id: 'noto-sans-mono', family: 'Noto Sans Mono' }, diff --git a/web/fonts/OFL-Inconsolata.txt b/web/fonts/OFL-Inconsolata.txt new file mode 100644 index 0000000..79721ad --- /dev/null +++ b/web/fonts/OFL-Inconsolata.txt @@ -0,0 +1,93 @@ +Copyright 2006 The Inconsolata Project Authors (https://github.com/cyrealtype/Inconsolata) + +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/web/fonts/UFL-Ubuntu-Mono.txt b/web/fonts/UFL-Ubuntu-Mono.txt new file mode 100644 index 0000000..aa36342 --- /dev/null +++ b/web/fonts/UFL-Ubuntu-Mono.txt @@ -0,0 +1,96 @@ +------------------------------- +UBUNTU FONT LICENCE Version 1.0 +------------------------------- + +PREAMBLE +This licence allows the licensed fonts to be used, studied, modified and +redistributed freely. The fonts, including any derivative works, can be +bundled, embedded, and redistributed provided the terms of this licence +are met. The fonts and derivatives, however, cannot be released under +any other licence. The requirement for fonts to remain under this +licence does not require any document created using the fonts or their +derivatives to be published under this licence, as long as the primary +purpose of the document is not to be a vehicle for the distribution of +the fonts. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this licence and clearly marked as such. This may +include source files, build scripts and documentation. + +"Original Version" refers to the collection of Font Software components +as received under this licence. + +"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. + +"Copyright Holder(s)" refers to all individuals and companies who have a +copyright ownership of the Font Software. + +"Substantially Changed" refers to Modified Versions which can be easily +identified as dissimilar to the Font Software by users of the Font +Software comparing the Original Version with the Modified Version. + +To "Propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification and with or without charging +a redistribution fee), making available to the public, and in some +countries other activities as well. + +PERMISSION & CONDITIONS +This licence does not grant any rights under trademark law and all such +rights are reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Font Software, to propagate the Font Software, subject to +the below conditions: + +1) Each copy of the Font Software must contain the above copyright +notice and this licence. 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. + +2) The font name complies with the following: +(a) The Original Version must retain its name, unmodified. +(b) Modified Versions which are Substantially Changed must be renamed to +avoid use of the name of the Original Version or similar names entirely. +(c) Modified Versions which are not Substantially Changed must be +renamed to both (i) retain the name of the Original Version and (ii) add +additional naming elements to distinguish the Modified Version from the +Original Version. The name of such Modified Versions must be the name of +the Original Version, with "derivative X" where X represents the name of +the new work, appended to that name. + +3) The name(s) of the Copyright Holder(s) and any contributor to the +Font Software shall not be used to promote, endorse or advertise any +Modified Version, except (i) as required by this licence, (ii) to +acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with +their explicit written permission. + +4) The Font Software, modified or unmodified, in part or in whole, must +be distributed entirely under this licence, and must not be distributed +under any other licence. The requirement for fonts to remain under this +licence does not affect any document created using the Font Software, +except any version of the Font Software extracted from a document +created using the Font Software may only be distributed under this +licence. + +TERMINATION +This licence 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. \ No newline at end of file diff --git a/web/fonts/inconsolata-condensed-400.woff2 b/web/fonts/inconsolata-condensed-400.woff2 new file mode 100644 index 0000000..218f905 Binary files /dev/null and b/web/fonts/inconsolata-condensed-400.woff2 differ diff --git a/web/fonts/inconsolata-condensed-700.woff2 b/web/fonts/inconsolata-condensed-700.woff2 new file mode 100644 index 0000000..7c742cc Binary files /dev/null and b/web/fonts/inconsolata-condensed-700.woff2 differ diff --git a/web/fonts/ubuntu-mono-400.woff2 b/web/fonts/ubuntu-mono-400.woff2 new file mode 100644 index 0000000..467b8d6 Binary files /dev/null and b/web/fonts/ubuntu-mono-400.woff2 differ diff --git a/web/fonts/ubuntu-mono-700.woff2 b/web/fonts/ubuntu-mono-700.woff2 new file mode 100644 index 0000000..f77e5f2 Binary files /dev/null and b/web/fonts/ubuntu-mono-700.woff2 differ diff --git a/web/style.css b/web/style.css index f32a3b3..f7943f8 100644 --- a/web/style.css +++ b/web/style.css @@ -1,7 +1,12 @@ -/* Iosevka (SIL OFL, web/fonts/OFL-Iosevka.txt): a narrow monospace font served by LogStream - itself, so it also works offline. Latin subset only; other scripts fall back to --mono. */ +/* Narrow monospace fonts served by LogStream itself, so they also work offline (licences in + web/fonts). Latin subset only; other scripts fall back to --mono. Inconsolata Condensed is + Inconsolata's variable font pinned at width 75 (0.4em per character, others 0.5em). */ @font-face { font-family: "Iosevka"; src: url("fonts/iosevka-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; } @font-face { font-family: "Iosevka"; src: url("fonts/iosevka-700.woff2") format("woff2"); font-weight: 600 800; font-display: swap; } +@font-face { font-family: "Ubuntu Mono"; src: url("fonts/ubuntu-mono-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; } +@font-face { font-family: "Ubuntu Mono"; src: url("fonts/ubuntu-mono-700.woff2") format("woff2"); font-weight: 600 800; font-display: swap; } +@font-face { font-family: "Inconsolata Condensed"; src: url("fonts/inconsolata-condensed-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; } +@font-face { font-family: "Inconsolata Condensed"; src: url("fonts/inconsolata-condensed-700.woff2") format("woff2"); font-weight: 600 800; font-display: swap; } /* ---------- Theme: everything goes through these variables ---------- */ :root {