From: Marc Foley Date: Tue, 18 Feb 2025 13:54:15 +0000 (+0000) Subject: do not allow dups X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dce9dfc00ea0fab10dddc7f3e18987ff48fb7a6;p=thirdparty%2Fgoogle%2Ffonts.git do not allow dups --- diff --git a/.ci/tags.html b/.ci/tags.html index 6bb4db379..e9e1eb495 100644 --- a/.ci/tags.html +++ b/.ci/tags.html @@ -179,7 +179,6 @@ const [name, category, score] = parsed; return new FontTag(name, category, score); } - isVF() { return this.name.includes("@"); } @@ -480,7 +479,14 @@ function axesCombos(axes) { solved.forEach((ax) => { let name = `${this.newFamily}:"${ax.axes.map((a) => a.tag).join(",")}@${ax.axes.map((a) => a.coords).join(",")}"`; let newFamily = new FontTag(name, this.currentCategory, ax.score) + let tagKey = `${newFamily.name},${newFamily.category}`; + if (this.seen.has(tagKey)) { + alert(`Tag "${newFamily.name}" already exists in "${this.currentCategory}"`); + return; + } + this.seen.add(tagKey) this.tags.push(newFamily); + this.history.push(`+ ${newFamily.displayName},${newFamily.category},${newFamily.score}`); }) this.newAxes = []; } else {