fix(lint): allow Korean fallback stacks (#83)

Document and validate exact Korean proportional and monospace fallback stacks, with strict regression coverage and synchronized plugin version 2.4.6.
This commit is contained in:
buildnwrite
2026-08-18 00:18:33 -07:00
committed by GitHub
parent 3fa2820814
commit aebcb5dd24
5 changed files with 51 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "diagram-design", "name": "diagram-design",
"description": "Create branded architecture, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, loop/flywheel, nested, tree, org chart, layer stack, Venn, pyramid/funnel, bar, line, Gantt and scatter charts, high-level, process, medallion, data flow, DP integration, or DP security matrix diagrams as standalone HTML/SVG/PNG. Redraw .drawio/.drawio.png/.drawio.svg or Mermaid .mmd sources at a chosen size/detail; onboard brand tokens from a website; add semantic patterns, callouts, accessible motion, or sketchy/hand-drawn styling.", "description": "Create branded architecture, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, loop/flywheel, nested, tree, org chart, layer stack, Venn, pyramid/funnel, bar, line, Gantt and scatter charts, high-level, process, medallion, data flow, DP integration, or DP security matrix diagrams as standalone HTML/SVG/PNG. Redraw .drawio/.drawio.png/.drawio.svg or Mermaid .mmd sources at a chosen size/detail; onboard brand tokens from a website; add semantic patterns, callouts, accessible motion, or sketchy/hand-drawn styling.",
"version": "2.4.5", "version": "2.4.6",
"author": { "author": {
"name": "Cathryn Lavery", "name": "Cathryn Lavery",
"url": "https://github.com/cathrynlavery" "url": "https://github.com/cathrynlavery"
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "diagram-design", "name": "diagram-design",
"description": "Create branded architecture, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, loop/flywheel, nested, tree, org chart, layer stack, Venn, pyramid/funnel, bar, line, Gantt and scatter charts, high-level, process, medallion, data flow, DP integration, or DP security matrix diagrams as standalone HTML/SVG/PNG. Redraw .drawio/.drawio.png/.drawio.svg or Mermaid .mmd sources at a chosen size/detail; onboard brand tokens from a website; add semantic patterns, callouts, accessible motion, or sketchy/hand-drawn styling.", "description": "Create branded architecture, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, loop/flywheel, nested, tree, org chart, layer stack, Venn, pyramid/funnel, bar, line, Gantt and scatter charts, high-level, process, medallion, data flow, DP integration, or DP security matrix diagrams as standalone HTML/SVG/PNG. Redraw .drawio/.drawio.png/.drawio.svg or Mermaid .mmd sources at a chosen size/detail; onboard brand tokens from a website; add semantic patterns, callouts, accessible motion, or sketchy/hand-drawn styling.",
"version": "2.4.5", "version": "2.4.6",
"author": { "author": {
"name": "Cathryn Lavery", "name": "Cathryn Lavery",
"url": "https://github.com/cathrynlavery" "url": "https://github.com/cathrynlavery"
+4
View File
@@ -59,6 +59,10 @@ ALLOWED_FONTS = {
"noto sans jp", "noto sans jp",
"yu gothic", "yu gothic",
"noto sans mono cjk jp", "noto sans mono cjk jp",
"apple sd gothic neo",
"noto sans kr",
"malgun gothic",
"noto sans mono cjk kr",
"system-ui", "system-ui",
"sans-serif", "sans-serif",
"serif", "serif",
+43
View File
@@ -406,6 +406,49 @@ def main() -> int:
"font-family: unsupported font family: Yu Gothic UI", "font-family: unsupported font family: Yu Gothic UI",
directory, directory,
) )
kr_name_svg = VALID_SVG.replace("fixture-title", "kr-name-stack-title").replace(
"fixture-desc", "kr-name-stack-desc"
)
require_pass(
"kr-name-stack",
kr_name_svg.replace(
"</svg>",
'<text font-family="\'Geist\', \'Apple SD Gothic Neo\', \'Noto Sans KR\', '
'\'Malgun Gothic\', sans-serif">인증 서비스</text>\n</svg>',
),
directory,
)
kr_mono_svg = VALID_SVG.replace("fixture-title", "kr-mono-stack-title").replace(
"fixture-desc", "kr-mono-stack-desc"
)
require_pass(
"kr-mono-stack",
kr_mono_svg.replace(
"</svg>",
'<text font-family="\'Geist Mono\', \'Noto Sans Mono CJK KR\', '
'monospace">포트 443</text>\n</svg>',
),
directory,
)
kr_css_svg = VALID_SVG.replace("fixture-title", "kr-css-stack-title").replace(
"fixture-desc", "kr-css-stack-desc"
)
require_pass(
"kr-css-stack",
'<style>text { font-family: "Geist", "Apple SD Gothic Neo", "Noto Sans KR", '
'"Malgun Gothic", sans-serif; }</style>\n' + kr_css_svg,
directory,
)
malgun_semilight_svg = VALID_SVG.replace(
"fixture-title", "malgun-semilight-title"
).replace("fixture-desc", "malgun-semilight-desc")
require_lint_finding(
"malgun-gothic-semilight",
'<style>text { font-family: "Malgun Gothic Semilight", sans-serif; }</style>\n'
+ malgun_semilight_svg,
"font-family: unsupported font family: Malgun Gothic Semilight",
directory,
)
spec = importlib.util.spec_from_file_location("build_icons", BUILD_ICONS) spec = importlib.util.spec_from_file_location("build_icons", BUILD_ICONS)
if spec is None or spec.loader is None: if spec is None or spec.loader is None:
@@ -142,9 +142,10 @@ Geist has no CJK coverage. When labels contain Japanese, Chinese, or Korean text
```svg ```svg
<text font-family="'Geist', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif">認証サービス</text> <text font-family="'Geist', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif">認証サービス</text>
<text font-family="'Geist', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif">인증 서비스</text>
``` ```
For mono sublabels use `'Geist Mono', 'Noto Sans Mono CJK JP', monospace`. CJK glyphs render ~10% wider than Latin at the same size — budget box width accordingly, and prefer 12px names over 8px sublabels for CJK, which goes muddy below 10px. The Hiragino/Yu Gothic stack carries no Hangul glyphs, so Korean labels need the Korean stack — don't reuse the Japanese one. For mono sublabels use `'Geist Mono', 'Noto Sans Mono CJK JP', monospace` (Japanese) or `'Geist Mono', 'Noto Sans Mono CJK KR', monospace` (Korean). CJK glyphs render ~10% wider than Latin at the same size — budget box width accordingly, and prefer 12px names over 8px sublabels for CJK, which goes muddy below 10px.
--- ---