diff --git a/static/scripts/railroad.js b/static/scripts/railroad.js index 2f34a07..ab8f126 100644 --- a/static/scripts/railroad.js +++ b/static/scripts/railroad.js @@ -20,12 +20,12 @@ export default funcs; export const Options = { DEBUG: false, // if true, writes some debug information into attributes - VS: 8, // minimum vertical separation between things. For a 3px stroke, must be at least 4 - AR: 10, // radius of arcs + VS: 11, // minimum vertical separation between things. For a 3px stroke, must be at least 4 + AR: 11, // radius of arcs DIAGRAM_CLASS: 'railroad-diagram', // class to put on the root STROKE_ODD_PIXEL_LENGTH: false, // is the stroke width an odd (1px, 3px, etc) pixel length? INTERNAL_ALIGNMENT: 'center', // how to align items when they have extra space. left/right/center - CHAR_WIDTH: 8.5, // width of each monospace character. play until you find the right value for your font + CHAR_WIDTH: 11, // width of each monospace character. play until you find the right value for your font COMMENT_CHAR_WIDTH: 7, // comments are in smaller text by default }; diff --git a/static/styles/railroad.css b/static/styles/railroad.css index 344b5be..99c82aa 100644 --- a/static/styles/railroad.css +++ b/static/styles/railroad.css @@ -14,14 +14,14 @@ svg.railroad-diagram path { } svg.railroad-diagram text { - font-family: var(--monospace-font-family); + font-family: var(--font-family-monospace); text-anchor: middle; white-space: pre; fill: var(--foreground-body-color); } svg.railroad-diagram text.diagram-text { - font-size: 12px; + font-size: 11px; } svg.railroad-diagram text.diagram-arrow { @@ -33,7 +33,7 @@ svg.railroad-diagram text.label { } svg.railroad-diagram text.comment { - font: italic 12px monospace; + font: italic 12px var(--font-family-monospace); } svg.railroad-diagram g.non-terminal text { diff --git a/static/styles/root.css b/static/styles/root.css index de24c1d..eecc278 100644 --- a/static/styles/root.css +++ b/static/styles/root.css @@ -24,6 +24,7 @@ --header-box-shadow-color: var(--box-shadow-color); --font-family-body: Verdana, Helvetica, sans-serif; + --font-family-monospace: monospace; --font-family-heading: Museo_Slab, Tahoma, sans-serif; --font-family-site-heading: /*Krungthep,*/ Museo_Slab, Tahoma, sans-serif; --font-size-min: 7px;