Skip to content

๐Ÿ› fix : ํฐํŠธ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ ๋ฐ ZEN-SERIF ์ ์šฉ#21

Merged
KongMezu merged 6 commits intodevelopfrom
fix/#20/font-error
Oct 16, 2025
Merged

๐Ÿ› fix : ํฐํŠธ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ ๋ฐ ZEN-SERIF ์ ์šฉ#21
KongMezu merged 6 commits intodevelopfrom
fix/#20/font-error

Conversation

@KongMezu
Copy link
Copy Markdown
Contributor

@KongMezu KongMezu commented Oct 15, 2025

๐Ÿ”ฅ ์ž‘์—… ๋‚ด์šฉ

  • ํฐํŠธ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

๐Ÿค” ์ถ”ํ›„ ์ž‘์—… ์‚ฌํ•ญ

  • ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ ์ง„์งœ ์ œ์ž‘ ์‹œ์ž‘

๐Ÿ”—ย ์ด์Šˆ

PR Point (To Reviewer)

ํฐํŠธ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

๋‹นํ™ฉ์Šค๋Ÿฌ์› ์Šต๋‹ˆ๋‹ค.. ๋‹น์žฅ ์„ธํŒ…๊นŒ์ง€๋งŒ ํ–ˆ์„ ๋•Œ ๋ฌธ์ œ๊ฐ€ ์—†์—ˆ๋Š”๋ฐ ์˜ค๋Š˜๋ณด๋‹ˆ ํ”„๋ฆฌํ…๋‹ค๋“œ ์กฐ์ฐจ๋„ ์ œ๋Œ€๋กœ ์ ์šฉ์ด ์•ˆ๋˜๋Š” ๋ชจ์Šต์„ ๋ณด๊ณ 
์›์ธ์ด ์ปค์Šคํ…€ ํ•ด๋‘” ํฐํŠธ ์œ ํ‹ธ๋ฆฌํ‹ฐ๊ฐ€ tailwind.config.js ์— ๋“ค์–ด๊ฐ€์„œ Tailwind Build ์ˆœ์„œ์— ๋”ฐ๋ผ์„œ ๋ฌด์‹œ๊ฐ€ ๋œ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ด์ œ ์ •๋ง ์ •์ƒ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค ์„ธํŒ…์ด ๋Šฆ์–ด์ ธ ๋ฏธ์•ˆํ•ฉ๋‹ˆ๋‹ค..

??: ์ด์ „ PR ์—์„œ ๋๋‹ค๊ณ  ํ•œ ๊ฑด ๋ญ”๊ฐ€์š”??
ใ„ด ์ด์ œ NotoSans์™€ NotoSerif๋ฅผ ์ ์šฉ๋๋‹ค๊ณ  ์ฐฉ๊ฐํ•œ ์ œ ๋ˆˆ์ž…๋‹ˆ๋‹ค.

์‚ฌ์šฉ ๋ฐฉ๋ฒ•(1์ฐจ ๋””์ž์ธ์„ธํŒ… PR๊ณผ ๋™์ผ)

// ์ ์šฉ ์˜ˆ์‹œ - ํ”ผ๊ทธ๋งˆ ๋””์ž์ธ ์‹œ์Šคํ…œ ๊ธฐ์ค€์œผ๋กœ ๋งŒ๋“   ์œ ํ‹ธ๋ฆฌํ‹ฐ ์ž…๋‹ˆ๋‹ค
<p className="text-display-md">Pretendard ๋””์Šคํ”Œ๋ ˆ์ด ์ค‘๊ฐ„ ํฐํŠธ </p>
 <p className="text-headline-md-serif"> Jen Serif ํ—ค๋“œ๋ผ์ธ ์ค‘๊ฐ„ ํฐํŠธ  </p>

๐Ÿ“ธย ํ”ผ๊ทธ๋งˆ ์Šคํฌ๋ฆฐ์ƒท or ๊ธฐ๋Šฅ GIF

์ ์šฉ์ฝ”๋“œ

export default function Home() {
  return (
    <>
      <div>
        <p className="text-display-lg">Pretendard ๋””์Šคํ”Œ๋ ˆ์ด</p>
        <p className="text-label-lg">Pretendard ๋ผ๋ฒจ</p>
      </div>

      <div>
        <p className="text-display-serif">ZEN Serif ๋””์Šคํ”Œ๋ ˆ์ด - ๊ธ€๋‹ค </p>
        <p className="text-label-serif">ZEN Serif ๋ผ๋ฒจ - ๊ธ€๋‹ค </p>
      </div>
    </>
  );
}

image

Summary by CodeRabbit

  • New Features

    • Added Pretendard and ZEN Serif as site fonts and expanded text styles (display, headline, title, label) for sans and serif.
  • UI Changes

    • Homepage layout simplified to split text blocks showcasing the new typography.
  • Style

    • Updated default base font and font-family assignments for more consistent rendering; dark-mode behavior unchanged.

@vercel
Copy link
Copy Markdown

vercel bot commented Oct 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
af-fe Ready Ready Preview Comment Oct 15, 2025 0:53am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

Move typography utilities from a Tailwind plugin into src/styles/globals.css, add Pretendard (CDN) and a local "ZEN Serif" font-face, adjust base font-family/size rules, update tailwind.config.js to quote font names and remove the custom plugin, and modify the index page JSX to use the new typography classes.

Changes

Cohort / File(s) Summary
Global typography & fonts
src/styles/globals.css
Import Pretendard via CDN; add @font-face for "ZEN Serif" (local WOFF2); set html, body base font-size and font-family; add an @layer utilities block containing text utility classes (display/headline/title/label) for sans (--font-sans) and serif (--font-serif); preserve color tokens and dark-mode structure.
Tailwind config adjustments
tailwind.config.js
Quote font names in fontFamily (['"Pretendard"', 'system-ui', 'sans-serif'], ['"ZEN Serif"', 'serif']) and remove the custom Tailwind plugin that previously generated typography utilities (set plugins: []).
Page content update
src/pages/index.tsx
Replace previous hero/centered layout with simplified blocks using the new typography utility class names and sample Pretendard/ZEN Serif text; no exported signatures changed.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Build as Tailwind/Vite
    participant Config as tailwind.config.js
    participant CSS as src/styles/globals.css
    participant Page as src/pages/index.tsx
    participant Browser as Browser

    Dev->>Build: start dev server / run build
    Build->>Config: load Tailwind config (fontFamily quoted, plugins: [])
    Build->>CSS: read globals.css (Pretendard CDN, ZEN Serif @font-face, @layer utilities)
    Note over Config,CSS: Typography utilities now live in globals.css\ninstead of the removed Tailwind plugin
    Build->>Page: compile JSX with new typography classes
    Build->>Dev: emit compiled CSS and JS
    Dev->>Browser: open page
    Browser->>CSS: request fonts & apply utilities
    Browser->>Page: render updated index content with Pretendard/ZEN Serif styles
Loading

Estimated code review effort

๐ŸŽฏ 3 (Moderate) | โฑ๏ธ ~25 minutes

Possibly related PRs

Suggested labels

setting, style

Suggested reviewers

  • skyblue1232
  • jjangminii

Poem

I twitch my whiskers at fonts so bright,
Pretendard hums in morning light,
ZEN Serif hops in, crisp and bold,
CSS fields now grow utilities gold,
I bound through letters, cozy and light ๐Ÿ‡โœจ

Pre-merge checks and finishing touches

โŒ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage โš ๏ธ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
โœ… Passed checks (2 passed)
Check name Status Explanation
Title Check โœ… Passed The title clearly states the primary changeโ€”resolving the font error and applying ZEN Serifโ€”and directly reflects the main focus of the changeset. It is concise, specific, and avoids listing file details or vague phrasing. The prefix โ€œfix :โ€ indicates the nature of the change without introducing noise beyond the leading emoji. Although the emoji is non-standard in a PR title it does not obscure the intent of the update.
Description Check โœ… Passed The pull request description includes all required template sectionsโ€”### ๐Ÿ”ฅ ์ž‘์—… ๋‚ด์šฉ with the font fix summary, ### ๐Ÿค” ์ถ”ํ›„ ์ž‘์—… ์‚ฌํ•ญ with a next-steps checklist, ### ๐Ÿ”— ์ด์Šˆ with the issue reference, ### PR Point outlining reviewer considerations, and ### ๐Ÿ“ธ ํ”ผ๊ทธ๋งˆ ์Šคํฌ๋ฆฐ์ƒท or ๊ธฐ๋Šฅ GIF with an image and code exampleโ€”matching the repositoryโ€™s description template and providing sufficient detail for reviewers.
โœจ Finishing touches
  • ๐Ÿ“ Generate docstrings
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#20/font-error

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the fix ๋ฒ„๊ทธ ๋ฐ ์ž์ž˜ํ•œ ์˜ค๋ฅ˜ ์ˆ˜์ • label Oct 15, 2025
@github-actions
Copy link
Copy Markdown

๐Ÿท๏ธ Labeler has automatically applied labels based on your PR title, branch name, or commit message.
Please verify that they are correct before merging.

@github-actions github-actions bot added the comment ํ•„์š”ํ•œ ์ฃผ์„ ์ถ”๊ฐ€ ๋ฐ ๋ณ€๊ฒฝ label Oct 15, 2025
@github-actions
Copy link
Copy Markdown

๐Ÿท๏ธ Labeler has automatically applied labels based on your PR title, branch name, or commit message.
Please verify that they are correct before merging.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

๐Ÿงน Nitpick comments (1)
tailwind.config.js (1)

103-103: Optional: Remove unnecessary quotes from Pretendard.

While functional, Pretendard doesn't contain spaces and doesn't require quotes within the config string. For consistency with Tailwind best practices:

-        sans: ['"Pretendard"', 'system-ui', 'sans-serif'],
+        sans: ['Pretendard', 'system-ui', 'sans-serif'],
๐Ÿ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 36b3f43 and 408a90a.

โ›” Files ignored due to path filters (1)
  • public/fonts/ZEN-SERIF-TTF-Regular.woff is excluded by !**/*.woff
๐Ÿ“’ Files selected for processing (2)
  • src/styles/globals.css (3 hunks)
  • tailwind.config.js (1 hunks)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-and-deploy
๐Ÿ”‡ Additional comments (6)
tailwind.config.js (2)

104-104: LGTM!

The quoted font name is correct for "JEN Serif" since it contains a space.


108-108: LGTM! Correctly removes the plugin.

Removing the plugin and moving utilities to @layer utilities in globals.css resolves the build-order issue that prevented fonts from being applied.

src/styles/globals.css (4)

1-1: LGTM! CDN import for Pretendard.

Using the CDN import is a good approach for Pretendard. The version (v1.3.9) is pinned, ensuring consistency.


67-70: LGTM! Consolidated base font styles.

Combining html and body selectors for font-size and font-family is a clean approach for setting base styles.


100-100: Verify unusually large letter-spacing values.

The letter-spacing values for some serif utilities are extremely large:

  • .text-display-serif: 0.6rem (6px at base font size)
  • .text-headline-sm-serif: 1.2rem (12px at base font size)

These values will create very wide character spacing. Please confirm these are intentional design choices and not typos (e.g., should they be 0.06rem and 0.12rem?).

Also applies to: 103-103


81-105: LGTM! Moving utilities to @layer resolves the build-order issue.

Using @layer utilities to define typography classes is the correct solution to the build-order problem. This ensures Tailwind processes these utilities properly without the need for a plugin.

@layer utilities {
/* Pretendard */
.text-display-lg { font-size:5.7rem; font-weight:300; line-height:6.4rem; letter-spacing:-0.025rem; font-family: var(--font-sans); }
.text-display-md { font-size:5.2rem; font-weight:300; line-height:4.5rem; font-family: var(--font-sans); }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue | ๐ŸŸ  Major

Fix line-height smaller than font-size.

The .text-display-md utility has a line-height (4.5rem) that is smaller than its font-size (5.2rem). This will cause text to overlap on multiple lines.

-  .text-display-md { font-size:5.2rem; font-weight:300; line-height:4.5rem; font-family: var(--font-sans); }
+  .text-display-md { font-size:5.2rem; font-weight:300; line-height:5.6rem; font-family: var(--font-sans); }
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.text-display-md { font-size:5.2rem; font-weight:300; line-height:4.5rem; font-family: var(--font-sans); }
.text-display-md { font-size:5.2rem; font-weight:300; line-height:5.6rem; font-family: var(--font-sans); }
๐Ÿค– Prompt for AI Agents
In src/styles/globals.css around line 84, the .text-display-md rule sets
font-size: 5.2rem but line-height: 4.5rem (smaller than font-size) which can
cause overlapping; update the line-height to be equal to or greater than the
font-size (e.g., 5.2rem or a unitless value like 1.05โ€“1.2) or use a responsive
unitless multiplier to ensure adequate spacing across breakpoints.

.text-headline-md { font-size:2.8rem; font-weight:200; line-height:3.2rem; font-family: var(--font-sans); }
.text-headline-sm { font-size:2.4rem; font-weight:200; line-height:3.2rem; font-family: var(--font-sans); }

.text-title-lg { font-size:2.2rem; font-weight:400; line-height:1.75rem; font-family: var(--font-sans); }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue | ๐ŸŸ  Major

Fix line-height smaller than font-size.

The .text-title-lg utility has a line-height (1.75rem) significantly smaller than its font-size (2.2rem), causing severe text overlap on multiple lines.

-  .text-title-lg { font-size:2.2rem; font-weight:400; line-height:1.75rem; font-family: var(--font-sans); }
+  .text-title-lg { font-size:2.2rem; font-weight:400; line-height:2.8rem; font-family: var(--font-sans); }
๐Ÿค– Prompt for AI Agents
In src/styles/globals.css around line 91, the .text-title-lg rule sets
font-size: 2.2rem but line-height: 1.75rem which is smaller than the font size
and causes overlapping; update the rule so the line-height is at least equal to
or greater than the font-size (use a unitless value like 1.1โ€“1.3 or a rem value
>=2.2rem appropriate for your design, e.g., change line-height to a value such
as 2.5rem or 1.15) to prevent text overlap across multiple lines.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

โ™ป๏ธ Duplicate comments (3)
src/styles/globals.css (3)

2-7: Verify font file and internal name match.

Although a past comment indicated this was addressed, please confirm:

  1. The font file exists at /fonts/ZEN-SERIF-TTF-Regular.woff2 in your public directory
  2. The internal font name in the WOFF2 file matches "ZEN Serif"

A mismatch could prevent the font from loading correctly.

Run this script to verify the font file:

#!/bin/bash
# Verify the ZEN Serif font file exists
if [ -f "public/fonts/ZEN-SERIF-TTF-Regular.woff2" ]; then
    echo "โœ“ Font file exists"
    ls -lh public/fonts/ZEN-SERIF-TTF-Regular.woff2
else
    echo "โœ— Font file NOT found at public/fonts/ZEN-SERIF-TTF-Regular.woff2"
    echo "Searching for font files..."
    fd -e woff2 -e woff -e ttf . public/fonts/ 2>/dev/null || echo "fonts directory not found"
fi

82-82: Fix line-height smaller than font-size.

The .text-display-md utility has line-height: 4.5rem which is smaller than font-size: 5.2rem. This will cause text to overlap on multiple lines.

Apply this diff to fix the issue:

-  .text-display-md { font-size:5.2rem; font-weight:300; line-height:4.5rem; font-family: var(--font-sans); }
+  .text-display-md { font-size:5.2rem; font-weight:300; line-height:5.6rem; font-family: var(--font-sans); }

89-89: Fix line-height smaller than font-size.

The .text-title-lg utility has line-height: 1.75rem which is significantly smaller than font-size: 2.2rem. This will cause severe text overlap on multiple lines.

Apply this diff to fix the issue:

-  .text-title-lg { font-size:2.2rem; font-weight:400; line-height:1.75rem; font-family: var(--font-sans); }
+  .text-title-lg { font-size:2.2rem; font-weight:400; line-height:2.8rem; font-family: var(--font-sans); }
๐Ÿ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between c21303f and a2350b9.

๐Ÿ“’ Files selected for processing (3)
  • src/pages/index.tsx (1 hunks)
  • src/styles/globals.css (3 hunks)
  • tailwind.config.js (1 hunks)
๐Ÿ”‡ Additional comments (7)
tailwind.config.js (2)

103-104: LGTM! Font family declarations are correct.

Quoting multi-word font names like "ZEN Serif" is necessary and proper. The consistent use of quotes for both families is clean.


108-108: Verify that typography utilities are available.

The custom plugin has been removed and typography utilities have been moved to src/styles/globals.css under @layer utilities. Ensure that all previously available utilities are now defined in the CSS file and that the build process correctly applies them.

Based on the provided context, the utilities appear to be properly defined in src/styles/globals.css, but you should confirm that the Tailwind build successfully processes the @layer utilities block and that no utilities are missing in production builds.

src/pages/index.tsx (1)

4-12: LGTM! Typography demo is clear.

The example demonstrates both Pretendard and ZEN Serif fonts with appropriate utility classes. This serves as a good visual test for the font implementation.

src/styles/globals.css (4)

1-1: LGTM! CDN import is properly configured.

Using the jsdelivr CDN with a pinned version (v1.3.9) ensures consistent font delivery and is a standard practice for Pretendard.


61-62: LGTM! CSS variable updated correctly.

The --font-serif variable now references 'ZEN Serif', consistent with the @font-face declaration and the updated naming throughout the codebase.


65-68: LGTM! Base font configuration is correct.

The font-size: 62.5% on html,body is a standard practice that makes 1rem equal to 10px for easier calculation, and setting Pretendard as the default font-family is appropriate.


98-102: Verify large letter-spacing values are intentional.

Some serif utilities use very large letter-spacing values (e.g., 0.6rem on line 98, 1.2rem on line 101). This is approximately 6-12px of spacing between characters, which creates a very loose, spaced-out appearance.

If this is the intended design aesthetic for ZEN Serif, this is fine. However, if these values were meant to be smaller (e.g., 0.06rem or 0.12rem), please adjust them.

.text-label-md { font-size:1.2rem; font-weight:300; line-height:1.6rem; font-family: var(--font-sans); }
.text-label-sm { font-size:1.1rem; font-weight:300; line-height:1.6rem; font-family: var(--font-sans); }

/* JEN Serif */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue | ๐ŸŸก Minor

Update comment to match current font name.

The comment still says "JEN Serif" but the font has been renamed to "ZEN Serif" throughout the codebase. Please update for consistency.

Apply this diff:

-  /* JEN Serif */
+  /* ZEN Serif */
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/* JEN Serif */
/* ZEN Serif */
๐Ÿค– Prompt for AI Agents
In src/styles/globals.css around line 97, update the comment text which
currently reads "JEN Serif" to "ZEN Serif" so it matches the renamed font used
elsewhere in the codebase; simply replace the comment string only, preserving
whitespace and formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comment ํ•„์š”ํ•œ ์ฃผ์„ ์ถ”๊ฐ€ ๋ฐ ๋ณ€๊ฒฝ fix ๋ฒ„๊ทธ ๋ฐ ์ž์ž˜ํ•œ ์˜ค๋ฅ˜ ์ˆ˜์ •

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants