---
title: "#이맥스 #폰트: 스케일 크기 조절 - 유니코드 이모지"
url: "https://notes.junghanacs.com/notes/20241226T001105"
author: "Junghan Kim"
date: "2024-12-26T00:11:00+09:00"
lastmod: "2025-05-12T00:00:00+09:00"
tags: ["emacs","fonts"]
description: "이맥스에서 폰트 스케일과 유니코드, 이모지 크기를 맞추는 방법을 기록한 노트이다."
---

> [!abstract] 이 노트에 대하여
> 
> 서로 다른 글꼴이 같은 크기에서도 다르게 보이는 문제를 face-font-rescale-alist 관점에서 정리한다. 한글과 이모지, 유니코드 심볼이 섞인 Emacs 화면을 고르게 맞추는 실용 노트다.

## 관련메타

-   [#타이포그래피 #폰트](https://notes.junghanacs.com/meta/20250520T170739)

## 히스토리

-   [2025-06-22 Sun 15:51] 이 로직 사용하고 있지? 디테일한 방법이야.
-   [2024-12-25 Wed 05:56] 생성
-   [@힣: 최적 #폰트 탐구 #요구사항 터미널 콜아웃 웹 한글 가변폭 고정폭 유니코드 심볼 합자](https://notes.junghanacs.com/notes/20221004T130700)

## 2024 이맥스 폰트 스케일 특히 이모지 유니코드 수학 기호 등

[2024-12-25 Wed 05:56]

이모지 - 꼭 뭐는 스케일링

<https://whhone.com/emacs-config/>

> Appearance Font and Font Size Scaling
> 
> My default font is “Hack” or “Meslo”. I also use “WenQuanYi Micro Hei” for Chinese, Japanese, and Korean characters (CJK) and “Noto Color Emoji” for emojis.
> 
> Different fonts can have different widths and heights, even when they are the same size. For example, size 10 of font A might be bigger than size 10 of font B. This can make things look uneven. I rescale the font with face-font-rescale-alist so that they have the same width (I might get the same height if I am lucky). This makes things look better, especially in tables in org mode.

```elisp
;; https://whhone.com/emacs-config/
(defun my/set-fonts (default-font-name
                     default-font-height
                     cjk-font-name
                     cjk-font-scale
                     unicode-font-name
                     unicode-font-scale
                     emoji-font-name
                     emoji-font-scale
                     )
  "Helper function to set the default, CJK and Emoji fonts."
  ;; Set the default font
  (when (member default-font-name (font-family-list))
    (set-face-attribute 'default nil
                        :family default-font-name
                        :height default-font-height)
    (set-frame-font default-font-name nil t))

  ;; Set the CJK font in the default fontset.
  (when (member cjk-font-name (font-family-list))
    (dolist (script (list 'han 'kana 'cjk-misc))
      (set-fontset-font t script cjk-font-name)))

  (when (member unicode-font-name (font-family-list))
    (set-fontset-font t 'unicode unicode-font-name nil 'prepend)
    (set-fontset-font t 'mathematical unicode-font-name nil 'prepend)
    (set-fontset-font t 'symbol unicode-font-name nil 'prepend))

  ;; Set the Emoji font in the default fontset.
  (when (member emoji-font-name (font-family-list))
    (set-fontset-font t 'emoji emoji-font-name nil 'prepend))

  ;; Rescale the CJK and emoji fonts.
  (setq face-font-rescale-alist
        `((,(format ".*%s.*" cjk-font-name) . ,cjk-font-scale)
          (,(format ".*%s.*" unicode-font-name) . ,unicode-font-scale)
          (,(format ".*%s.*" emoji-font-name) . ,emoji-font-scale)
          )))

;; Different computers might need different scaling factors with the same fonts.
(cond
 ;; MacOS, HiDPI
 ((eq system-type 'darwin)
  (my/set-fonts
   "Menlo" 140
   "Hiragino Sans CNS" 1.2
   "Symbola" 1.2
   "Apple Color Emoji" 0.9))
 ;; Default Linux
 (t
  (my/set-fonts
   "Monoplex KR Nerd" 140
   "Monoplex KR Nerd" 1.0
   "Symbola" 0.9 ; unicode
   "Noto Emoji" 0.9
   )))
```
