[ADD] outputs: pdf-lib, Noto Sans, paper sizes, badge imposition
Badges and printed views need a PDF writer, an embedded font whose metrics
the tests can measure, and the paper the machine prints on. pdf-lib with
fontkit writes the sheet; Noto Sans (OFL) ships with its provenance and
SHA-256, and travels into www/ with every third-party notice that the
minified bundle drops. The paper is kept per machine in reglages_locaux.json.
A4 and Letter derive the A6 grid from their dimensions; the PDF libraries
load in two deferred chunks, each under the 1000 kB threshold.
Checked: 3048 node, 639 browser and 67 long tests green from the index.
--- FR ---
[ADD] sorties : pdf-lib, Noto Sans, formats de papier, imposition
Les badges et les vues imprimables exigent un producteur de PDF, une police
embarquée que les épreuves mesurent, et le papier de la machine. pdf-lib et
fontkit écrivent la planche ; Noto Sans (OFL) arrive avec sa provenance et
son SHA-256, et voyage dans www/ avec chaque avis de tiers que le paquet
minifié retire. Le papier se garde par machine dans reglages_locaux.json.
A4 et Lettre dérivent la grille A6 de leurs dimensions ; les bibliothèques
PDF se chargent en deux morceaux différés, chacun sous le seuil de 1000 ko.
Vérifié : 3048 node, 639 navigateur et 67 longues vertes depuis l'index.
Assisted-by: Claude Opus 5.5
2026-10-09 04:49:18 -04:00
|
|
|
// © 2026 TechnoLibre (http://www.technolibre.ca)
|
[UPD] licence: dual AGPL-3.0-or-later or LiLiQ-R+, SPDX headers
The project is offered under either licence, at the user's choice. Every
source header now carries the SPDX expression in place of the AGPL line;
the copyright line is unchanged. LICENSES/ holds both published texts,
pinned by SHA-256 and identical to the copies the page ships. The root
LICENSE becomes a short notice: the full AGPL text there would make
forges and licence scanners report the AGPL alone.
Checked: 685 header lines swapped and nothing else; node 6264, guards
207, build test 8, browser 1420, documentation verifier 0 faults.
--- FR ---
[UPD] licence : double AGPL-3.0-or-later ou LiLiQ-R+, en-têtes SPDX
Le projet est offert sous l'une ou l'autre licence, au choix de
l'utilisateur. Chaque en-tête de source porte l'expression SPDX à la place
de la ligne AGPL ; la ligne de copyright ne change pas. LICENSES/ garde les
deux textes publiés, épinglés par SHA-256 et identiques aux copies que la
page livre. LICENSE devient une courte notice : le texte AGPL entier y
ferait annoncer l'AGPL seule par les forges et les détecteurs de licence.
Vérifié : 685 lignes d'en-tête remplacées, rien d'autre ; node 6264,
gardes 207, construction 8, navigateur 1420, documentation 0 faute.
Assisted-by: Claude Opus 5.5
2026-10-20 09:02:17 -04:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later OR LiLiQ-Rplus-1.1
|
[ADD] outputs: pdf-lib, Noto Sans, paper sizes, badge imposition
Badges and printed views need a PDF writer, an embedded font whose metrics
the tests can measure, and the paper the machine prints on. pdf-lib with
fontkit writes the sheet; Noto Sans (OFL) ships with its provenance and
SHA-256, and travels into www/ with every third-party notice that the
minified bundle drops. The paper is kept per machine in reglages_locaux.json.
A4 and Letter derive the A6 grid from their dimensions; the PDF libraries
load in two deferred chunks, each under the 1000 kB threshold.
Checked: 3048 node, 639 browser and 67 long tests green from the index.
--- FR ---
[ADD] sorties : pdf-lib, Noto Sans, formats de papier, imposition
Les badges et les vues imprimables exigent un producteur de PDF, une police
embarquée que les épreuves mesurent, et le papier de la machine. pdf-lib et
fontkit écrivent la planche ; Noto Sans (OFL) arrive avec sa provenance et
son SHA-256, et voyage dans www/ avec chaque avis de tiers que le paquet
minifié retire. Le papier se garde par machine dans reglages_locaux.json.
A4 et Lettre dérivent la grille A6 de leurs dimensions ; les bibliothèques
PDF se chargent en deux morceaux différés, chacun sous le seuil de 1000 ko.
Vérifié : 3048 node, 639 navigateur et 67 longues vertes depuis l'index.
Assisted-by: Claude Opus 5.5
2026-10-09 04:49:18 -04:00
|
|
|
|
|
|
|
|
// La police embarquée lue sous node : les épreuves y lisent les fichiers de
|
|
|
|
|
// src/polices par le disque, là où la page les reçoit de Vite par « ?inline »
|
|
|
|
|
// (src/polices/chargement.js), syntaxe que node ne connaît pas (§ 14.8).
|
|
|
|
|
import { readFileSync } from 'node:fs';
|
|
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
|
|
|
|
|
|
const DOSSIER = new URL('../src/polices/', import.meta.url);
|
|
|
|
|
|
[ADD] fonts: Noto Sans Italic and Bold Italic, loaded on demand
Italic badge styles need the two italic faces of Noto Sans 2.015, taken
as is from the upstream archive that PROVENANCE names. Each face has its
own deferred chunk; chargerPolices loads only the faces asked for, and a
session loads the missing ones in one call, then keeps each face. The
interface still declares Regular and Bold only, so www/ emits no new
font. Checked: sizes and hashes against PROVENANCE, the same ascent,
descent and cap height in the four faces, one chunk per face.
--- FR ---
[ADD] polices : Noto Sans Italic et Bold Italic, chargées à la demande
Les styles italiques du badge demandent les deux faces italiques de Noto
Sans 2.015, tirées telles quelles de l'archive amont que nomme PROVENANCE.
Chaque face a son morceau différé ; chargerPolices ne charge que les faces
demandées, et une séance charge d'un appel celles qui manquent, puis garde
chacune. L'interface ne déclare toujours que Regular et Bold : www/ n'émet
aucune police nouvelle. Vérifié : tailles et empreintes selon PROVENANCE,
mêmes hauteurs dans les quatre faces, un morceau par face.
Assisted-by: Claude Opus 5.5
2026-11-06 04:43:17 -05:00
|
|
|
/** Les fichiers de la police, par face. */
|
[ADD] outputs: pdf-lib, Noto Sans, paper sizes, badge imposition
Badges and printed views need a PDF writer, an embedded font whose metrics
the tests can measure, and the paper the machine prints on. pdf-lib with
fontkit writes the sheet; Noto Sans (OFL) ships with its provenance and
SHA-256, and travels into www/ with every third-party notice that the
minified bundle drops. The paper is kept per machine in reglages_locaux.json.
A4 and Letter derive the A6 grid from their dimensions; the PDF libraries
load in two deferred chunks, each under the 1000 kB threshold.
Checked: 3048 node, 639 browser and 67 long tests green from the index.
--- FR ---
[ADD] sorties : pdf-lib, Noto Sans, formats de papier, imposition
Les badges et les vues imprimables exigent un producteur de PDF, une police
embarquée que les épreuves mesurent, et le papier de la machine. pdf-lib et
fontkit écrivent la planche ; Noto Sans (OFL) arrive avec sa provenance et
son SHA-256, et voyage dans www/ avec chaque avis de tiers que le paquet
minifié retire. Le papier se garde par machine dans reglages_locaux.json.
A4 et Lettre dérivent la grille A6 de leurs dimensions ; les bibliothèques
PDF se chargent en deux morceaux différés, chacun sous le seuil de 1000 ko.
Vérifié : 3048 node, 639 navigateur et 67 longues vertes depuis l'index.
Assisted-by: Claude Opus 5.5
2026-10-09 04:49:18 -04:00
|
|
|
export const FICHIERS_POLICES = Object.freeze({
|
|
|
|
|
regulier: 'NotoSans-Regular.ttf',
|
|
|
|
|
gras: 'NotoSans-Bold.ttf',
|
[ADD] fonts: Noto Sans Italic and Bold Italic, loaded on demand
Italic badge styles need the two italic faces of Noto Sans 2.015, taken
as is from the upstream archive that PROVENANCE names. Each face has its
own deferred chunk; chargerPolices loads only the faces asked for, and a
session loads the missing ones in one call, then keeps each face. The
interface still declares Regular and Bold only, so www/ emits no new
font. Checked: sizes and hashes against PROVENANCE, the same ascent,
descent and cap height in the four faces, one chunk per face.
--- FR ---
[ADD] polices : Noto Sans Italic et Bold Italic, chargées à la demande
Les styles italiques du badge demandent les deux faces italiques de Noto
Sans 2.015, tirées telles quelles de l'archive amont que nomme PROVENANCE.
Chaque face a son morceau différé ; chargerPolices ne charge que les faces
demandées, et une séance charge d'un appel celles qui manquent, puis garde
chacune. L'interface ne déclare toujours que Regular et Bold : www/ n'émet
aucune police nouvelle. Vérifié : tailles et empreintes selon PROVENANCE,
mêmes hauteurs dans les quatre faces, un morceau par face.
Assisted-by: Claude Opus 5.5
2026-11-06 04:43:17 -05:00
|
|
|
italique: 'NotoSans-Italic.ttf',
|
|
|
|
|
grasItalique: 'NotoSans-BoldItalic.ttf',
|
[ADD] outputs: pdf-lib, Noto Sans, paper sizes, badge imposition
Badges and printed views need a PDF writer, an embedded font whose metrics
the tests can measure, and the paper the machine prints on. pdf-lib with
fontkit writes the sheet; Noto Sans (OFL) ships with its provenance and
SHA-256, and travels into www/ with every third-party notice that the
minified bundle drops. The paper is kept per machine in reglages_locaux.json.
A4 and Letter derive the A6 grid from their dimensions; the PDF libraries
load in two deferred chunks, each under the 1000 kB threshold.
Checked: 3048 node, 639 browser and 67 long tests green from the index.
--- FR ---
[ADD] sorties : pdf-lib, Noto Sans, formats de papier, imposition
Les badges et les vues imprimables exigent un producteur de PDF, une police
embarquée que les épreuves mesurent, et le papier de la machine. pdf-lib et
fontkit écrivent la planche ; Noto Sans (OFL) arrive avec sa provenance et
son SHA-256, et voyage dans www/ avec chaque avis de tiers que le paquet
minifié retire. Le papier se garde par machine dans reglages_locaux.json.
A4 et Lettre dérivent la grille A6 de leurs dimensions ; les bibliothèques
PDF se chargent en deux morceaux différés, chacun sous le seuil de 1000 ko.
Vérifié : 3048 node, 639 navigateur et 67 longues vertes depuis l'index.
Assisted-by: Claude Opus 5.5
2026-10-09 04:49:18 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/** Le chemin absolu d'un fichier de src/polices. */
|
|
|
|
|
export const cheminPolice = (nom) => fileURLToPath(new URL(nom, DOSSIER));
|
|
|
|
|
|
|
|
|
|
/**
|
[ADD] fonts: Noto Sans Italic and Bold Italic, loaded on demand
Italic badge styles need the two italic faces of Noto Sans 2.015, taken
as is from the upstream archive that PROVENANCE names. Each face has its
own deferred chunk; chargerPolices loads only the faces asked for, and a
session loads the missing ones in one call, then keeps each face. The
interface still declares Regular and Bold only, so www/ emits no new
font. Checked: sizes and hashes against PROVENANCE, the same ascent,
descent and cap height in the four faces, one chunk per face.
--- FR ---
[ADD] polices : Noto Sans Italic et Bold Italic, chargées à la demande
Les styles italiques du badge demandent les deux faces italiques de Noto
Sans 2.015, tirées telles quelles de l'archive amont que nomme PROVENANCE.
Chaque face a son morceau différé ; chargerPolices ne charge que les faces
demandées, et une séance charge d'un appel celles qui manquent, puis garde
chacune. L'interface ne déclare toujours que Regular et Bold : www/ n'émet
aucune police nouvelle. Vérifié : tailles et empreintes selon PROVENANCE,
mêmes hauteurs dans les quatre faces, un morceau par face.
Assisted-by: Claude Opus 5.5
2026-11-06 04:43:17 -05:00
|
|
|
* Les octets des quatre faces, lus du disque à chaque appel.
|
[ADD] outputs: pdf-lib, Noto Sans, paper sizes, badge imposition
Badges and printed views need a PDF writer, an embedded font whose metrics
the tests can measure, and the paper the machine prints on. pdf-lib with
fontkit writes the sheet; Noto Sans (OFL) ships with its provenance and
SHA-256, and travels into www/ with every third-party notice that the
minified bundle drops. The paper is kept per machine in reglages_locaux.json.
A4 and Letter derive the A6 grid from their dimensions; the PDF libraries
load in two deferred chunks, each under the 1000 kB threshold.
Checked: 3048 node, 639 browser and 67 long tests green from the index.
--- FR ---
[ADD] sorties : pdf-lib, Noto Sans, formats de papier, imposition
Les badges et les vues imprimables exigent un producteur de PDF, une police
embarquée que les épreuves mesurent, et le papier de la machine. pdf-lib et
fontkit écrivent la planche ; Noto Sans (OFL) arrive avec sa provenance et
son SHA-256, et voyage dans www/ avec chaque avis de tiers que le paquet
minifié retire. Le papier se garde par machine dans reglages_locaux.json.
A4 et Lettre dérivent la grille A6 de leurs dimensions ; les bibliothèques
PDF se chargent en deux morceaux différés, chacun sous le seuil de 1000 ko.
Vérifié : 3048 node, 639 navigateur et 67 longues vertes depuis l'index.
Assisted-by: Claude Opus 5.5
2026-10-09 04:49:18 -04:00
|
|
|
*
|
[ADD] fonts: Noto Sans Italic and Bold Italic, loaded on demand
Italic badge styles need the two italic faces of Noto Sans 2.015, taken
as is from the upstream archive that PROVENANCE names. Each face has its
own deferred chunk; chargerPolices loads only the faces asked for, and a
session loads the missing ones in one call, then keeps each face. The
interface still declares Regular and Bold only, so www/ emits no new
font. Checked: sizes and hashes against PROVENANCE, the same ascent,
descent and cap height in the four faces, one chunk per face.
--- FR ---
[ADD] polices : Noto Sans Italic et Bold Italic, chargées à la demande
Les styles italiques du badge demandent les deux faces italiques de Noto
Sans 2.015, tirées telles quelles de l'archive amont que nomme PROVENANCE.
Chaque face a son morceau différé ; chargerPolices ne charge que les faces
demandées, et une séance charge d'un appel celles qui manquent, puis garde
chacune. L'interface ne déclare toujours que Regular et Bold : www/ n'émet
aucune police nouvelle. Vérifié : tailles et empreintes selon PROVENANCE,
mêmes hauteurs dans les quatre faces, un morceau par face.
Assisted-by: Claude Opus 5.5
2026-11-06 04:43:17 -05:00
|
|
|
* @returns {{regulier: Uint8Array, gras: Uint8Array, italique: Uint8Array, grasItalique: Uint8Array}}
|
[ADD] outputs: pdf-lib, Noto Sans, paper sizes, badge imposition
Badges and printed views need a PDF writer, an embedded font whose metrics
the tests can measure, and the paper the machine prints on. pdf-lib with
fontkit writes the sheet; Noto Sans (OFL) ships with its provenance and
SHA-256, and travels into www/ with every third-party notice that the
minified bundle drops. The paper is kept per machine in reglages_locaux.json.
A4 and Letter derive the A6 grid from their dimensions; the PDF libraries
load in two deferred chunks, each under the 1000 kB threshold.
Checked: 3048 node, 639 browser and 67 long tests green from the index.
--- FR ---
[ADD] sorties : pdf-lib, Noto Sans, formats de papier, imposition
Les badges et les vues imprimables exigent un producteur de PDF, une police
embarquée que les épreuves mesurent, et le papier de la machine. pdf-lib et
fontkit écrivent la planche ; Noto Sans (OFL) arrive avec sa provenance et
son SHA-256, et voyage dans www/ avec chaque avis de tiers que le paquet
minifié retire. Le papier se garde par machine dans reglages_locaux.json.
A4 et Lettre dérivent la grille A6 de leurs dimensions ; les bibliothèques
PDF se chargent en deux morceaux différés, chacun sous le seuil de 1000 ko.
Vérifié : 3048 node, 639 navigateur et 67 longues vertes depuis l'index.
Assisted-by: Claude Opus 5.5
2026-10-09 04:49:18 -04:00
|
|
|
*/
|
|
|
|
|
export function lirePolices() {
|
[ADD] fonts: Noto Sans Italic and Bold Italic, loaded on demand
Italic badge styles need the two italic faces of Noto Sans 2.015, taken
as is from the upstream archive that PROVENANCE names. Each face has its
own deferred chunk; chargerPolices loads only the faces asked for, and a
session loads the missing ones in one call, then keeps each face. The
interface still declares Regular and Bold only, so www/ emits no new
font. Checked: sizes and hashes against PROVENANCE, the same ascent,
descent and cap height in the four faces, one chunk per face.
--- FR ---
[ADD] polices : Noto Sans Italic et Bold Italic, chargées à la demande
Les styles italiques du badge demandent les deux faces italiques de Noto
Sans 2.015, tirées telles quelles de l'archive amont que nomme PROVENANCE.
Chaque face a son morceau différé ; chargerPolices ne charge que les faces
demandées, et une séance charge d'un appel celles qui manquent, puis garde
chacune. L'interface ne déclare toujours que Regular et Bold : www/ n'émet
aucune police nouvelle. Vérifié : tailles et empreintes selon PROVENANCE,
mêmes hauteurs dans les quatre faces, un morceau par face.
Assisted-by: Claude Opus 5.5
2026-11-06 04:43:17 -05:00
|
|
|
return Object.fromEntries(
|
|
|
|
|
Object.entries(FICHIERS_POLICES).map(([face, nom]) => [face, new Uint8Array(readFileSync(cheminPolice(nom)))]),
|
|
|
|
|
);
|
[ADD] outputs: pdf-lib, Noto Sans, paper sizes, badge imposition
Badges and printed views need a PDF writer, an embedded font whose metrics
the tests can measure, and the paper the machine prints on. pdf-lib with
fontkit writes the sheet; Noto Sans (OFL) ships with its provenance and
SHA-256, and travels into www/ with every third-party notice that the
minified bundle drops. The paper is kept per machine in reglages_locaux.json.
A4 and Letter derive the A6 grid from their dimensions; the PDF libraries
load in two deferred chunks, each under the 1000 kB threshold.
Checked: 3048 node, 639 browser and 67 long tests green from the index.
--- FR ---
[ADD] sorties : pdf-lib, Noto Sans, formats de papier, imposition
Les badges et les vues imprimables exigent un producteur de PDF, une police
embarquée que les épreuves mesurent, et le papier de la machine. pdf-lib et
fontkit écrivent la planche ; Noto Sans (OFL) arrive avec sa provenance et
son SHA-256, et voyage dans www/ avec chaque avis de tiers que le paquet
minifié retire. Le papier se garde par machine dans reglages_locaux.json.
A4 et Lettre dérivent la grille A6 de leurs dimensions ; les bibliothèques
PDF se chargent en deux morceaux différés, chacun sous le seuil de 1000 ko.
Vérifié : 3048 node, 639 navigateur et 67 longues vertes depuis l'index.
Assisted-by: Claude Opus 5.5
2026-10-09 04:49:18 -04:00
|
|
|
}
|