svgconstant
The flag of Comoros (コモロ), KM, drawn again by hand at 4:3 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 640 by 480, 986 B.
The drawing flag("KM", { shape: "4:3" }) uses, made for that shape by hand rather than cut from the flag. The /manifest entry's framings say how each frame was chosen.
Import it
import { svg } from "@johnmorrisdotca/hata/flags/km.4x3";
Definition
const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 480\"><defs><clipPath id=\"hata-km-4x3-a\"><path fill-opacity=\".7\" d=\"M0 0h682.7v512H0z\"/></clipPath></defs><g fill-rule=\"evenodd\" clip-path=\"url(#hata-km-4x3-a)\" transform=\"scale(.9375)\"><path fill=\"#ff0\" d=\"M0 0h768.8v128H0z\"/><path fill=\"#fff\" d=\"M0 128h768.8v128H0z\"/><path fill=\"#be0027\" d=\"M0 256h768.8v128H0z\"/><path fill=\"#3b5aa3\" d=\"M0 384h768.8v128H0z\"/><path fill=\"#239e46\" d=\"M0 0v512l381.9-255.3z\"/><path fill=\"#fff\" d=\"M157.2 141.4c-85-4.3-123.9 63.5-123.8 115.9-.2 62 58.6 113 112.8 110C117 353.5 81.2 314.6 81 257c-.3-52.1 29.5-97.5 76.3-115.6z\"/><path fill=\"#fff\" d=\"m156 197-12-9.3-14.6 4.6 5.2-14.4-8.8-12.4 15.2.6 9-12.3 4.3 14.7 14.4 4.8-12.6 8.5zm-.3 52.1-12-9.4-14.6 4.6 5.3-14.3-8.9-12.4 15.3.5 9-12.2 4.2 14.6 14.5 4.9-12.7 8.5zm.2 52.6-12-9.4-14.5 4.6 5.2-14.3-8.8-12.4 15.2.5 9-12.2 4.3 14.6 14.4 4.8-12.6 8.6zm-.2 53-12-9.3L129 350l5.3-14.4-8.9-12.4 15.3.6 9-12.3 4.2 14.7 14.5 4.8-12.7 8.5z\"/></g></svg>"
Examples
Example 1
import square from "@johnmorrisdotca/hata/flags/km.4x3";
const host=document.createElement("div");
host.innerHTML = square;
console.log(host.querySelector("svg")?.getAttribute("viewBox"));Example 2
import { svg } from "@johnmorrisdotca/hata/flags/km.4x3";
console.log(svg.startsWith("<svg"),svg.length);true 986What it prints (run when this page was built)