From 1b6777947a6f6cde31e8b0970973fce68941c98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=BC=ED=98=81?= Date: Sun, 13 Sep 2026 17:38:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?test(core):=20=ED=83=80=EC=9D=B4=ED=8F=AC?= =?UTF-8?q?=20B/R=20=EB=8F=99=EC=9D=BC=EC=84=B1=20=EC=9E=A0=EA=B8=88?= =?UTF-8?q?=EC=9D=84=20TextStyle=20=EC=A0=84=EC=B2=B4=20=EB=B9=84=EA=B5=90?= =?UTF-8?q?=EB=A1=9C=20=EB=8B=AB=EB=8A=94=EB=8B=A4=20(#2061)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 여섯 필드만 고르던 비교라 고르지 않은 필드로 두 자리가 갈려도 그대로 지나갔다. bodySmallB 한쪽에만 letterSpacing = (-0.0025).em 을 넣고 실측하니 옛 잠금은 4건이 전부 초록이었고, TextStyle 전체를 비교하도록 바꾸자 bodySmall 이 letterSpacing 차이로 실패했다. 두 쌍은 나머지 필드가 전부 기본값이라 비교 범위를 넓혀도 현재 값은 그대로 통과한다. 렌더 변화가 없으니 골든 재생성도 없다. --- .../core/ui/theme/AfternoteTypography.kt | 4 ++-- .../ui/theme/AfternoteTypographyPairTest.kt | 19 +++++-------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt b/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt index 8bf836579b..111cd940e4 100644 --- a/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt +++ b/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt @@ -155,7 +155,7 @@ data class AfternoteTypography( localeList = KoreanLocale, ), /** - * **[bodySmallR] 과 여섯 필드가 전부 같다 — 지금은 이름만 다른 같은 값이다.** 합치지 않고 + * **[bodySmallR] 과 모든 필드가 같다 — 지금은 이름만 다른 같은 값이다.** 합치지 않고 * 남기는 이유는 [captionLargeB] 와 같다. 상세는 그쪽 KDoc. */ val bodySmallB: TextStyle = @@ -196,7 +196,7 @@ data class AfternoteTypography( localeList = KoreanLocale, ), /** - * **[captionLargeR] 과 여섯 필드가 전부 같다 — 지금은 이름만 다른 같은 값이다.** + * **[captionLargeR] 과 모든 필드가 같다 — 지금은 이름만 다른 같은 값이다.** * ([bodySmallB]/[bodySmallR] 도 마찬가지다. [bodyLargeB]/[bodyLargeR] 는 줄높이가 달라 해당 없다.) * * **중복을 만든 것은 이 코드가 아니라 시안이다.** 정본 페이지에서도 `CaptionLarge(B)` 와 diff --git a/core/ui/src/test/kotlin/com/afternote/core/ui/theme/AfternoteTypographyPairTest.kt b/core/ui/src/test/kotlin/com/afternote/core/ui/theme/AfternoteTypographyPairTest.kt index e6c64faab0..dcf06297f1 100644 --- a/core/ui/src/test/kotlin/com/afternote/core/ui/theme/AfternoteTypographyPairTest.kt +++ b/core/ui/src/test/kotlin/com/afternote/core/ui/theme/AfternoteTypographyPairTest.kt @@ -24,25 +24,16 @@ import org.robolectric.annotation.Config class AfternoteTypographyPairTest { private val typography = AfternoteTypography() - /** 리뷰가 「같다」를 판정한 여섯 필드. 나머지 필드는 두 쌍 모두 기본값이다. */ - private fun TextStyle.comparedFields() = - listOf( - "fontFamily" to fontFamily, - "fontWeight" to fontWeight, - "fontSize" to fontSize, - "lineHeight" to lineHeight, - "lineBreak" to lineBreak, - "localeList" to localeList, - ) - + /** + * [TextStyle] 을 통째로 비교한다. 필드를 골라 비교하면 고르지 않은 필드로 두 자리가 갈려도 + * 잠금을 빠져나간다 — 한쪽에만 `letterSpacing` 을 넣어 실측했다(#2061). + */ private fun assertSameStyle( name: String, b: TextStyle, r: TextStyle, ) { - b.comparedFields().zip(r.comparedFields()).forEach { (bField, rField) -> - assertEquals("$name 의 ${bField.first} 가 갈렸다 — #1862 참조", rField.second, bField.second) - } + assertEquals("$name 의 B 와 R 이 갈렸다 — #1862 참조", r, b) } @Test From 8b0ee51434519ec812fa2ba81937dccd695e5f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=BC=ED=98=81?= Date: Sun, 13 Sep 2026 17:38:52 +0900 Subject: [PATCH 2/2] =?UTF-8?q?docs(core):=20Bold=20=ED=95=98=ED=95=9C?= =?UTF-8?q?=EC=9D=B4=20=EB=8B=AB=EB=8A=94=20=EB=B2=94=EC=9C=84=EB=A5=BC=20?= =?UTF-8?q?=EC=A0=9C=EB=AA=A9=20=ED=81=AC=EA=B8=B0=EA=B9=8C=EC=A7=80=20?= =?UTF-8?q?=EC=A0=95=ED=99=95=ED=9E=88=20=EC=A0=81=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「이 파일의 스타일은 전부 그 아래」가 사실이 아니었다. 기본 설정(밀도 480 · 글꼴 1.0) 하한인 약 19sp 위에 h1 28sp · h2 24sp · h3 20sp 가 있고, 위 표를 잰 기기(밀도 420 · 글꼴 배율 0.8, 하한 약 28sp)에서도 h1 은 58.8px 로 하한을 넘긴다. 하한만으로 닫히는 것은 18sp 이하고 제목이 Regular 인 근거는 획 대비가 아니라 시안이라는 것을 적었다. 바로 다음 문단의 시안 실측이 그 근거다. #2061 --- .../com/afternote/core/ui/theme/AfternoteTypography.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt b/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt index 111cd940e4..5c92211b8f 100644 --- a/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt +++ b/core/ui/src/main/kotlin/com/afternote/core/ui/theme/AfternoteTypography.kt @@ -86,10 +86,13 @@ private val HeadingLineBreak = LineBreak.Heading * 가장 나쁘고(em 29 에서 0.50), Regular 은 바로 그 구간에서 1.00 이다. * * **Bold 를 쓸 수 있는 하한은 em 58px 이다** — 그래야 가로획이 6px 이 되어 1px 차이가 17% 로 - * 떨어진다. 기본 설정(밀도 480 · 글꼴 1.0)에서 약 19sp, 글꼴 배율을 0.8 로 줄인 기기에서는 - * 약 28sp 다. 이 파일의 스타일은 전부 그 아래라 Bold 를 쓸 자리가 없다. + * 떨어진다. 기본 설정(밀도 480 · 글꼴 1.0)에서 약 19sp, 위 표를 잰 기기(밀도 420 · 글꼴 배율 + * 0.8, sp→px 2.1)에서는 약 28sp 다. 본문 크기대는 어느 쪽에서도 그 아래지만 제목은 아니다. + * 기본 설정에서 `h1`(28sp) · `h2`(24sp) · `h3`(20sp) 가 하한 위고, 배율 0.8 기기에서도 `h1` 은 + * 58.8px 로 하한을 넘긴다. 그러니 이 하한이 닫는 것은 18sp 이하뿐이고, 제목이 Regular 인 근거는 + * 획 대비가 아니라 시안이다. * - * 시안도 `H2`·`H3`·`BodyLarge(B)`·`BodySmall(B)`·`CaptionLarge(B)`·`PrimaryButton` 을 전부 + * 시안은 `H2`·`H3`·`BodyLarge(B)`·`BodySmall(B)`·`CaptionLarge(B)`·`PrimaryButton` 을 전부 * Regular 페이스로 쓴다 — 정본 페이지 TEXT 노드 1,789건 전량이 `NanumBarunGothic` 이고 * `NanumBarunGothicBold` 는 0건이다. *