This commit is contained in:
j3d1 2026-08-26 12:13:27 +02:00
parent 0c025db799
commit fb3c1e78e8

View file

@ -294,6 +294,24 @@ const RULER_TIERS = [
{aboveMm: 500, tickMm: 5, majorEveryMm: 25},
];
//after manually comparing all fonts at all sizes, it was decides that in some cases it's more readable to round down the font size to a more readable
// this is a lookup table for these optimal settings
const optimal_fonts = (size) => {
if (size > 20)
return {family: "Inter", url: interCandidateFontUrl, size: size};
if (size >= 12)
return {family: "Terminus", url: terminusFontUrl, size: (size - (size % 2))};
if (size >= 10)
return {family: "Pixelon", url: pixelonFontUrl, size: 10};
if (size >= 8)
return {family: "Chava", url: chavaFontUrl, size: 8};
if (size === 7)
return {family: "Chava", url: chavaFontUrl, size: 7};
if (size >= 5)
return {family: "Silkscreen", url: silkscreenCandidateFontUrl, size: 8}; //Silkscreen comes out to an effective height of 5px at size 8
return null;
};
export default {
name: "Print",
components: {