diff --git a/frontend/src/views/Print.vue b/frontend/src/views/Print.vue index 21195bc..9d12c5f 100644 --- a/frontend/src/views/Print.vue +++ b/frontend/src/views/Print.vue @@ -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: {