]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
do not allow dups
authorMarc Foley <m.foley.88@gmail.com>
Tue, 18 Feb 2025 13:54:15 +0000 (13:54 +0000)
committerMarc Foley <m.foley.88@gmail.com>
Tue, 4 Mar 2025 10:24:40 +0000 (10:24 +0000)
.ci/tags.html

index 6bb4db3792008ede64d19ed6b19079d2f8506134..e9e1eb495338ae9568e9fc50e01b9c974af5abf8 100644 (file)
       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 {