Set Chinese font for Emacs under Mac system, solve garbled problem

Source: Internet
Author: User

Recently changed a system, now with Mac system.

When Emacs is turned on, Chinese support is not very good. Some places can be displayed. In the gaze of the. El file, this box is shown as a mouth-to-mouth, mouth-mouth port. For example, as seen in the


Looking for a long day. is due to a problem with Chinese fonts. Just set the Chinese font to the right.

Once in Linux under the Chinese support is very good, without the formulation of the text body can be displayed.

The formulation code such as the following (put it in the. emacs file or in the Init.el is OK):

;; -----------------------------------------------------------------------------;; Setting font for Mac system;; -----------------------------------------------------------------------------;; Setting 中文版 Font (set-face-attribute ' default Nil:font "Monaco 12");; Chinese font formulation (dolist (CharSet ' (Kana han symbol cjk-misc bopomofo))  (Set-fontset-font (frame-parameter nil ' fon T)                    CharSet                    (font-spec:family "Kaiti SC": size 14));; Note:you can Chang "Kaiti SC" to "Microsoft Yahei" or other fonts
Once again, the effect of opening Emacs is:


Successfully solve Emacs garbled problem!

Set Chinese font for Emacs under Mac system, solve garbled problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.