From 993871c6dfa19cf4e0bd4a16c9aad26cb0025d70 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 27 Sep 2026 14:54:53 +0100 Subject: Draw the TUI's cells as pixels with the symbols' glyphs vega pixels runs the same scripts as tui --dump and writes each frame as an image: the view's cells (only those on screen are evaluated) become glyphs, each drawn once per size with the exact area of its curves, in its tone's colour on its row's background. No page, no scene in between. A 1920x1350 grid takes 12 ms a frame here, writing the image included. Symbol files carry the font's line now (format 3: ascent and descent where format 2 kept zeros), the cell height and baseline; and the build tool takes fonts in order, later ones filling the codes earlier ones lack: a CJK font alone drew ambiguous-width arrows two cells wide in a one-cell grid, which the new check caught, so a monospace Latin font comes first and Hangul after. --- docs/design/002-symbol-format.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/design/002-symbol-format.md') diff --git a/docs/design/002-symbol-format.md b/docs/design/002-symbol-format.md index 253b37c..95a2096 100644 --- a/docs/design/002-symbol-format.md +++ b/docs/design/002-symbol-format.md @@ -12,17 +12,19 @@ 재고, 크기와 여는 시간을 잰다. SVG 아이콘 몇 개를 같은 형식으로 바꿔 그려 본다. - 중단 기준: FreeType과의 평균 차이가 256단계 중 8을 넘으면 형식이나 알고리즘을 다시 본다. -## 형식 (`VEGASYM2`, 리틀 엔디언) +## 형식 (`VEGASYM3`, 리틀 엔디언) | 오프셋 | 내용 | |---|---| -| 0 | `VEGASYM2` | +| 0 | `VEGASYM3` | | 8 | u16 단위(em당), u16 0 | -| 12 | u32 심볼 수, u32 점 수, u32 파일 크기, u32 0 | +| 12 | u32 심볼 수, u32 점 수, u32 파일 크기, i16 올림(ascent), i16 내림(descent) | | 28 | 심볼 × 24 B, 코드 순: u32 코드(글리프는 코드 포인트, 아이콘은 빌드 도구가 준 번호), u32 첫 점, u32 점 수, i16 경계 왼쪽·아래·오른쪽·위, i16 advance, u16 플래그(0) | | 28 + 24n | 점 × 4 B: i16 2x + 곡선 밖, i16 2y + 윤곽 시작 | - 좌표는 단위 공간, y가 위로 는다(폰트와 같다). 채우기는 0이 아닌 감김수다. +- 올림과 내림은 글꼴의 줄(기준선에서의 높이, 내림은 음수)이다. 글자를 줄에 놓는 표면이 줄 높이와 기준선을 여기서 얻는다. + 아이콘만 든 파일은 둘 다 0이다. (3판에서 더했다. 2판의 이 자리는 0이어야 했다.) - 윤곽은 점의 사슬이다(TrueType의 점 모델을 압축 없이). 윤곽은 곡선 위의 시작 점으로 열고, 그 점으로 돌아온 점으로 닫는다. 곡선 밖 점은 2차 곡선의 제어점이고, 곡선 밖 점 둘이 이어지면 그 가운데에 곡선 위 점이 있는 것으로 친다(적지 않는다). 곡선 위 점 둘이 이어지면 직선이다(제어점이 없다). -- cgit v1.2.3