Repository navigation
[DONE] Pattern Lab 에 텍스트 레이어가 생겨 내 기기의 글꼴로 글을 넣고 끌어 옮긴다 - #184
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
…een 이 안 그려지던 것 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
patternflow-bot
marked this pull request as ready for review
October 23, 2026 21:09
This was referenced Oct 23, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
Patternflow-lab#183 Patternflow-lab#184 Patternflow-lab#186 Patternflow-lab#187 Patternflow-lab#189 Patternflow-lab#191 Patternflow-lab#192 Patternflow-lab#193 Patternflow-lab#194 Patternflow-lab#196 Patternflow-lab#197 Patternflow-lab#198 Patternflow-lab#199 Patternflow-lab#200 Patternflow-lab#202 Patternflow-lab#203 Patternflow-lab#204 Patternflow-lab#205 Patternflow-lab#206 Patternflow-lab#208 Patternflow-lab#209 Patternflow-lab#210 Patternflow-lab#214 Patternflow-lab#217 Patternflow-lab#218 Patternflow-lab#221 Patternflow-lab#222 Patternflow-lab#223 Patternflow-lab#227 Patternflow-lab#237 Patternflow-lab#238 Patternflow-lab#239 Patternflow-lab#240
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
studio / https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
Pattern Lab 에 텍스트 레이어가 생겼어요(창작자 지시 2). 「+ Text」로 글을 넣고 크기 · 자리 · 맞춤 · 글꼴 · 색을 고르고, Preview 를 끌어(폰은 손가락으로) 옮겨요. 글꼴은 사이트에 싣지 않고, 쓰는 사람이 자기 기기의 글꼴 파일을 고르면 브라우저 안에서만 읽어요. 머지하면 그린 글자가 다른 레이어처럼 섞이고 마스크가 되고, Graphic Export 와 두 내보내기에 픽셀 그대로 실려요.
좋아지는 것: Lab 에서 내 글꼴로 글자 레이어를 얹는다 — 브랜드 글을 판에 바로 올린다
체크리스트
TextLayer(글 · 크기 · X/Y · 맞춤 · 글꼴 · 색 · 채우기 · 선명한 가장자리 + 램프)와 그려 둔 RGBAtextRaster.ts) 색을 입혀(text.ts) 판 크기 비트맵으로FontFace, 업로드 없음, 「remember in this browser」를 켜면 IndexedDB)@stack공유 · Graphic Export · 두 내보내기가 텍스트 레이어를 받기한 일
텍스트 레이어는 글이 바뀔 때마다 한 번 그려서, 픽셀 레이어와 같은 RGBA 비트맵을 들고 있어요. 엔진 · 마스크 · Graphic Export ·
flatten.ts·hExport.ts는 이 비트맵만 읽어서, 기기로 가는 코드에는 글꼴이 필요 없어요. 저장(serialize.ts)도 글 · 글꼴 · 램프 옆에 비트맵을 같이 넣어서, 그 글꼴이 없는 브라우저에서 열어도 그린 모양 그대로예요. 그 글꼴로 다시 그리려 할 때만 Text 패널이 「… isn't loaded in this browser」라고 알려요.Text 패널은 Pixel 옆 탭이에요. Align(Left · Center · Right) · Center on frame, 글 칸(줄바꿈 됨, 200자), Font(사이트 · 기기 · 내 파일 묶음), Size(4~128), Add a font file… · remember in this browser · Forget it, X · Y, Fill(One color · Ramp across · Ramp down), Color, sharp edges 를 둬요. 숫자 칸은 범위 안의 수가 될 때만 바로 넣어서, 16 을 치다 1 에서 4 로 잘리지 않아요.
글꼴은 셋에서 와요. 사이트가 이미 싣는 Silkscreen · Inter · JetBrains Mono · Newsreader 는 CSS 변수로 읽고, 기기 쪽은 sans-serif · serif · monospace 예요. 파일은
FontFace로 이 탭에서만 읽고, remember 를 켜면patternflow_lab_fonts_v1IndexedDB 에 넣어 다음에 열 때 다시 올려요. 새 레이어는 Silkscreen 16px, 판 가운데, LED 주황(--pf-led)의 「Hello」예요.램프로 채우면 글자가 켜진 첫 열부터 끝 열까지(아래로면 첫 줄부터 끝 줄까지) 램프 하나가 걸쳐요. 텍스트 레이어를 고르면 Color Ramp 패널이 그 레이어의 램프를 고치고, 한 색으로 채운 글이면 「Fill it with the ramp: across · down」을 보여요.
Preview 에서는 텍스트 레이어를 고른 동안만 프레임 어디를 끌어도 그 글이 LED 한 칸씩 움직여요. 그동안만
touch-action: none이라 다른 레이어를 고르면 폰 스크롤은 그대로예요.증거
web/에서, 이 브랜치 머리로:GitHub 검사(머리
71f6e4d, dev 는 그새 움직이지 않아 merge 할 것이 없었어요):새 시험은
src/lib/lab/text.test.ts(20개: 선명한 · 부드러운 가장자리, 램프 가로 · 세로 · 알파, spec 다듬기, 그리기, 스토어의 더하기 · 옮기기 · 램프 고치기 · 복제 · 판 크기 바꾸기, 저장과 다시 열기, 텍스트 마스크가 미리보기와 내보낸 JS 에서 같은 픽셀),src/app/pattern-lab/panels/TextPanel.test.tsx(9개: 글 넣기 · 맞춤 · 크기 칸 · 글꼴 파일 넣기와 바깥 요청 0 · 글꼴이 아닌 파일 · 없는 글꼴 알림 · Preview 끌기 · 텍스트가 아닐 때 끌기 없음),LayersPanel.test.tsx에 2개(「+ Text」 · Del)예요. 캔버스가 없는 jsdom 이라 글자 덮임은 글자당 2×2 칸으로 대신했어요.빌드한 사이트(
next start)를 Playwright 로 연 결과예요. 폰은 CDP 터치, 데스크톱은 마우스로 끌었어요.새 레이어의 기본 Silkscreen 16px 를 저장된 비트맵에서 읽은 것이에요(
#가 켜진 LED, x 3495 · y 2736). 획이 반 칸에 걸리지 않고 2배 픽셀로 섰어요.실행법
가정
flatten.ts·hExport.ts가 텍스트 레이어를 픽셀 아트와 같은 길(RLE 비트맵)로 싣게만 했어요. 지시 3 에 남은 것: 미리보기 · 내보낸 JS · C++ 헤더가 같은 픽셀이라는 시험(이번엔 텍스트 마스크 한 판만 JS 로 봤어요), 기기에서.pfm확인, 다음 효과(지시 4)를 얹을 자리.next/font가 latin 만 싣어서 한글은 기기 기본 글꼴로 그려져요. 한글 브랜드 글꼴은 파일로 넣어요. 이 컨테이너엔 한글 글꼴 파일이 없어 사진은 라틴 글꼴(BigShoulders-Bold.ttf)로 찍었어요.document.fonts.load에 넘겨요. 뒤의 「… Fallback」 얼굴이local("Arial")이라 Arial 이 없는 기기에서 목록 전체가 NetworkError 로 실패해, 처음엔 Silkscreen 대신 대체 글꼴로 그려졌어요.test/setup.ts의 캔버스 대역에fillText·measureText를 더했어요. 없으면 텍스트 레이어를 더하는 모든 패널 시험이 던져요.web/ARCHITECTURE.md의 Lab 문단은 패널 아홉 · 무거운 편집기 넷 · Text 줄로 고쳤고, [DONE] Pattern Lab 에서 AI 갤러리와 Gemini 키 칸이 없어지고, Copy prompt 옆에서 v-field · rgb 를 고른다 #183 이 걷은 gallery 가 슬라이스 목록에 남아 있어 text 로 바꿨어요.useFocusCodeLayer는 Color Ramp 패널만 써서useFocusRampLayer로 바꿨어요(다른 쓰는 곳 없음).Changelog
Web
경험
언제: 바퀴에서 사이트 글꼴(next/font)을 캔버스나
document.fonts로 불러 쓸 때교훈: CSS 변수의 글꼴 목록 전체가 아니라 첫 family 만
document.fonts.load·check에 넘긴다 — 뒤의 「… Fallback」 얼굴이local("Arial")이라 Arial 없는 기기(바퀴 컨테이너)에서 목록 전체가 NetworkError 로 실패한다근거: #184 에서 새 텍스트 레이어가 Silkscreen 대신 대체 글꼴로 그려졌고, Playwright 로
document.fonts.load('16px "Silkscreen", "Silkscreen Fallback"')가 NetworkError 를 던지는 것을 봤어요. 첫 family 만 넘기자 2배 픽셀로 그려졌어요바퀴
바퀴 62 · 지시 2 「텍스트 레이어」
다음 바퀴
.pfm확인, 효과를 얹을 자리가 남았어요.https://claude.ai/code/session_019pN7cyTaj71qtAf6TTw2yz
Generated by Claude Code