@unmade/text-renderer 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8826,7 +8826,7 @@ const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8826
8826
  let l = i.y2 - i.y1;
8827
8827
  if (s > 0) {
8828
8828
  const d = Fr * s;
8829
- l -= d * 2;
8829
+ l += d * 2;
8830
8830
  }
8831
8831
  const c = l / r.height * r.physicalHeight, p = a[0] / c;
8832
8832
  return Fr * p;
@@ -8996,7 +8996,13 @@ const Fu = {
8996
8996
  }, Uu = (e) => {
8997
8997
  let r = Array.from(e), t = !1;
8998
8998
  return r[0] === "#" && (r.shift(), t = !0), r.length === 3 && (r = r.map((n) => `${n}${n}`)), `${t ? "#" : ""}${r.join("").toLowerCase()}`;
8999
- }, Ur = (e) => Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0"), Mt = (e, r, t) => `#${Ur(e)}${Ur(r)}${Ur(t)}`, Cu = (e, r, t) => {
8999
+ }, Ur = (e) => {
9000
+ const r = typeof e == "string" ? Number.parseInt(e, 10) : e;
9001
+ return Math.max(0, Math.min(255, Math.round(r))).toString(16).padStart(2, "0");
9002
+ }, Mt = (...e) => {
9003
+ const [r, t, n] = Array.isArray(e[0]) ? e[0] : e;
9004
+ return `#${Ur(r)}${Ur(t)}${Ur(n)}`;
9005
+ }, Cu = (e, r, t) => {
9000
9006
  if (r === 0) {
9001
9007
  const f = Math.round(t * 255);
9002
9008
  return [f, f, f];