fix(diagram): 流程图汉字方框——CJK 字体探测链(物理字体canDisplay验证→SansSerif回退→font-path配置兜底) + 副标起笔与label重叠
build / build-push (push) Successful in 2m18s
build / build-push (push) Successful in 2m18s
This commit is contained in:
@@ -68,6 +68,20 @@ class DiagramImageServiceTest {
|
||||
assertNotEquals(0, service.renderPng(vo(nodes, edges)).length);
|
||||
}
|
||||
|
||||
@Test
|
||||
void smoke_writeSamplePng_forVisualCheck() throws Exception {
|
||||
List<FlowModels.NodeVo> nodes = new ArrayList<>(Arrays.asList(
|
||||
node("n1", "START", "开始", null, null),
|
||||
node("n2", "APPROVAL", "教师入职审批", "刘文娟 · 时限48h", "done"),
|
||||
node("n3", "APPROVAL", "科室审批", "教学处 · 云海小学001 · 任一人通过 · 时限24h", "active"),
|
||||
node("n4", "END", "结束", null, null)));
|
||||
List<FlowModels.EdgeVo> edges = new ArrayList<>(Arrays.asList(
|
||||
edge("n1", "n2", null), edge("n2", "n3", "同意"), edge("n3", "n4", null)));
|
||||
java.nio.file.Files.write(
|
||||
java.nio.file.Paths.get("target", "diagram-smoke.png"),
|
||||
service.renderPng(vo(nodes, edges)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void render_defensive_missingEndpointAndCycle_stillProducesImage() {
|
||||
// 成环 + 指向不存在端点的边:不抛,仍出图(外部 img 场景防御)
|
||||
|
||||
Reference in New Issue
Block a user