diff options
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | README.md | 11 | ||||
| -rw-r--r-- | docs/design/001-first-component.md | 4 | ||||
| -rw-r--r-- | docs/design/002-symbol-format.md | 2 | ||||
| -rw-r--r-- | surfaces/draw.c (renamed from src/draw.c) | 0 | ||||
| -rw-r--r-- | surfaces/main.c (renamed from src/main.c) | 0 | ||||
| -rw-r--r-- | surfaces/screen.c (renamed from src/screen.c) | 0 | ||||
| -rw-r--r-- | surfaces/vega.h (renamed from src/vega.h) | 0 | ||||
| -rw-r--r-- | surfaces/web.c (renamed from src/web.c) | 0 | ||||
| -rw-r--r-- | surfaces/width.c (renamed from src/width.c) | 0 | ||||
| -rw-r--r-- | symbols/symbols-gl.c (renamed from src/symbols-gl.c) | 0 | ||||
| -rw-r--r-- | symbols/symbols-gl.h (renamed from src/symbols-gl.h) | 0 | ||||
| -rw-r--r-- | symbols/symbols-tool.c (renamed from src/symbols-tool.c) | 0 | ||||
| -rw-r--r-- | symbols/symbols.c (renamed from src/symbols.c) | 0 | ||||
| -rw-r--r-- | symbols/symbols.h (renamed from src/symbols.h) | 0 |
15 files changed, 23 insertions, 8 deletions
@@ -8,7 +8,10 @@ PURE ?= ../pure AUP ?= ../aup LIBPURE = $(PURE)/build/libpure.a -SOURCES = src/screen.c src/draw.c src/width.c src/web.c src/main.c +# Parts: lib/ (the aup library: the interface vocabulary), surfaces/ (the vega +# host: TUI, CLI, NUI sentences, web), symbols/ (glyphs and icons as one +# format, drawn by CPU or GPU). +SURFACES = surfaces/screen.c surfaces/draw.c surfaces/width.c surfaces/web.c surfaces/main.c .PHONY: all check FORCE all: $(BUILD)/vega $(BUILD)/vega-symbols @@ -19,16 +22,17 @@ $(BUILD): $(LIBPURE): FORCE $(MAKE) -C $(PURE) build/libpure.a -$(BUILD)/vega: $(SOURCES) src/vega.h $(LIBPURE) | $(BUILD) - $(CC) $(CPPFLAGS) $(CFLAGS) -I$(PURE)/core $(SOURCES) $(LIBPURE) $(LDFLAGS) -lm $(LDLIBS) -o $@ +$(BUILD)/vega: $(SURFACES) surfaces/vega.h $(LIBPURE) | $(BUILD) + $(CC) $(CPPFLAGS) $(CFLAGS) -I$(PURE)/core $(SURFACES) $(LIBPURE) $(LDFLAGS) -lm $(LDLIBS) -o $@ # Building symbol files reads fonts through FreeType; reading them does not. FREETYPE_CFLAGS ?= $(shell pkg-config --cflags freetype2) FREETYPE_LIBS ?= $(shell pkg-config --libs freetype2) # Drawing them on the GPU takes OpenGL ES 3.1 through EGL. GL_LIBS ?= $(shell pkg-config --libs egl glesv2) -$(BUILD)/vega-symbols: src/symbols-tool.c src/symbols.c src/symbols.h src/symbols-gl.c src/symbols-gl.h | $(BUILD) - $(CC) $(CPPFLAGS) $(CFLAGS) $(FREETYPE_CFLAGS) src/symbols-tool.c src/symbols.c src/symbols-gl.c $(LDFLAGS) \ +SYMBOLS = symbols/symbols.c symbols/symbols-gl.c +$(BUILD)/vega-symbols: symbols/symbols-tool.c $(SYMBOLS) symbols/symbols.h symbols/symbols-gl.h | $(BUILD) + $(CC) $(CPPFLAGS) $(CFLAGS) $(FREETYPE_CFLAGS) symbols/symbols-tool.c $(SYMBOLS) $(LDFLAGS) \ $(FREETYPE_LIBS) $(GL_LIBS) -lm $(LDLIBS) -o $@ check: $(BUILD)/vega $(BUILD)/vega-symbols @@ -41,6 +41,17 @@ build/vega-symbols compare DejaVuSans.ttf ui.vsym --sizes 12,16,32 # FreeType� build/vega-symbols render ui.vsym 0xE000 48 icon.pgm ``` +## 부품 + +| 디렉터리 | 무엇 | 만드는 것 | +|---|---|---| +| `lib/` | aup 라이브러리(`use vega`): 목록·표·포커스·톤 같은 인터페이스 어휘 | aup가 읽는다 | +| `surfaces/` | 모듈을 사람에게 보이는 표면: TUI, CLI, 문장(NUI), 웹. Pure의 `libpure.a`를 링크한다 | `build/vega` | +| `symbols/` | 글리프와 아이콘을 한 형식으로, CPU와 GPU로 그리기([설계 002](docs/design/002-symbol-format.md)) | `build/vega-symbols` | + +Pure와 같은 규칙이다([Pure 009](/srv/git/pure.git): `docs/design/009-layout.md`). 최상위 디렉터리가 역할별 부품이고, +`tests/check.py`가 저장소 전체를 끝에서 끝까지 확인한다. + ## 위치 | 층 | 역할 | 비유 | diff --git a/docs/design/001-first-component.md b/docs/design/001-first-component.md index 6028297..325093a 100644 --- a/docs/design/001-first-component.md +++ b/docs/design/001-first-component.md @@ -1,6 +1,6 @@ # 001 — 첫 컴포넌트: 목록·표·포커스·톤, 표면 셋 -2026-09-25. 상태: 구현(`src/`, `lib/vega.aup`, `examples/`). +2026-09-25. 상태: 구현(`surfaces/`, `lib/vega.aup`, `examples/`). ## 결정 @@ -127,7 +127,7 @@ vega tui app.pmod --watch --store ~/.app # 또는 vega web app.pmod --wat `vega check app.pmod`는 모듈이 뜻한 듯하지만 규약에 맞지 않는 곳을 알린다. 표면은 이런 보기를 조용히 다른 부품으로 읽는다. 검사는 그 읽기를 드러내어 오타나 타입 실수가 화면에서 사라지지 않게 한다. 찾으면 종료 코드 1이다. -규칙은 화면을 읽는 코드와 같은 파일(`src/screen.c`)에 있다. +규칙은 화면을 읽는 코드와 같은 파일(`surfaces/screen.c`)에 있다. | 찾는 것 | 표면이 대신 하는 일 | |---|---| diff --git a/docs/design/002-symbol-format.md b/docs/design/002-symbol-format.md index d25d996..3d9074b 100644 --- a/docs/design/002-symbol-format.md +++ b/docs/design/002-symbol-format.md @@ -94,7 +94,7 @@ em² 대비 평균 2.6e-5, 최악 1.5e-4 차이다. SVG는 Adwaita 기호 아이 ## GPU (Raspberry Pi 5 V3D 7.1, OpenGL ES 3.1, Mesa 26.2.2) -`src/symbols-gl.c`는 파일의 점 표를 그대로 저장 버퍼 하나로 올리고, 심볼의 상자를 덮는 사각형(인스턴스 하나)의 픽셀마다 +`symbols/symbols-gl.c`는 파일의 점 표를 그대로 저장 버퍼 하나로 올리고, 심볼의 상자를 덮는 사각형(인스턴스 하나)의 픽셀마다 `vega_coverage`와 같은 계산을 한다. 올릴 때 심볼마다 가로 띠 16개를 만들어 띠마다 걸치는 곡선(을 시작하는 점의 번호)을 적는다. 픽셀은 제 행이 걸친 띠의 곡선만 읽고, 여러 띠에 걸친 곡선은 첫 띠에서만 센다. 띠 소속은 두 배 좌표의 정수 나눗셈이라 CPU와 셰이더가 같게 가른다. 넓이는 행을 벗어난 곡선을 거르지 않고 왼쪽 곡선도 dy로 세야 하므로 띠는 가로로만 자른다. diff --git a/src/draw.c b/surfaces/draw.c index 31188c7..31188c7 100644 --- a/src/draw.c +++ b/surfaces/draw.c diff --git a/src/main.c b/surfaces/main.c index 82131ab..82131ab 100644 --- a/src/main.c +++ b/surfaces/main.c diff --git a/src/screen.c b/surfaces/screen.c index fdecaf4..fdecaf4 100644 --- a/src/screen.c +++ b/surfaces/screen.c diff --git a/src/vega.h b/surfaces/vega.h index f01667b..f01667b 100644 --- a/src/vega.h +++ b/surfaces/vega.h diff --git a/src/web.c b/surfaces/web.c index 535d92f..535d92f 100644 --- a/src/web.c +++ b/surfaces/web.c diff --git a/src/width.c b/surfaces/width.c index 1e893f6..1e893f6 100644 --- a/src/width.c +++ b/surfaces/width.c diff --git a/src/symbols-gl.c b/symbols/symbols-gl.c index 0e78efe..0e78efe 100644 --- a/src/symbols-gl.c +++ b/symbols/symbols-gl.c diff --git a/src/symbols-gl.h b/symbols/symbols-gl.h index 4c6db67..4c6db67 100644 --- a/src/symbols-gl.h +++ b/symbols/symbols-gl.h diff --git a/src/symbols-tool.c b/symbols/symbols-tool.c index a94feb3..a94feb3 100644 --- a/src/symbols-tool.c +++ b/symbols/symbols-tool.c diff --git a/src/symbols.c b/symbols/symbols.c index cedd68f..cedd68f 100644 --- a/src/symbols.c +++ b/symbols/symbols.c diff --git a/src/symbols.h b/symbols/symbols.h index 998ff3f..998ff3f 100644 --- a/src/symbols.h +++ b/symbols/symbols.h |
