[Emacs] Emacs for Windows Font settings

Source: Internet
Author: User

Download location: ftp://ftp.gnu.org/gnu/emacs/windows/

Configuration: There are many configuration files online. The configuration file name is. emacs, in the path c: \ Users \ *** (username) \ appdata \ roaming, can be directly modified in this file without the need to modify the registry, so it is troublesome to get environment variables.

At the beginning, my Emacs was set to the courier new font. However, Chinese characters were a bit garbled. Later, I found a configuration file on the Internet. The Chinese language seemed to be, then, Courier New is used in English. The configuration file still cannot be understood, but you can use it directly.

; Microsoft jhenghei//
; (Set-fontset-font "fontset-Default"
; 'Gb18030' ("Microsoft yahei". "Unicode-BMP "))
; The font size can be changed through attributes, such as: pixelsize = 18: Foundry = monotype: Weight = medium: Slant = I: width = normal
; The font information can be obtained through M-x describe-Char.
(If (EQ system-type 'windows-NT)
(Set-default-font "Courier New ")
(Set-default-font "bitstream Vera sans mono "))

; (Set-default-font "yahei consolas hybrid-16 ")
; It seems that I don't know gb2312
; (Set-fontset-font "fontset-Default" 'gb2312' ("Microsoft yahei". "Unicode-BMP "))
(Set-fontset-font "fontset-Default" 'han' ("Microsoft yahei". "Unicode-BMP "))
; (Frame-parameter nil 'font) obtains the settings of fontset-default.
(Set-fontset-font (frame-parameter nil 'font)
'Cjk-misc' ("Microsoft yahei". "Unicode-BMP "))
(Set-fontset-font (frame-parameter nil 'font)
'Bomofo' ("Microsoft yahei". "Unicode-BMP "))
(Set-fontset-font "fontset-Default"
'Gb18030' ("Microsoft yahei". "Unicode-BMP "))
(Set-fontset-font (frame-parameter nil 'font)
'Symbol' ("Microsoft yahei". "Unicode-BMP "))
----------------------------------
According to the above settings, the font is a little too large, so I found another configuration file, as shown below:
;-*-Mode: Lisp-interaction; coding: UTF-8 ;-*-
(Set-default-font "Courier New: pixelsize = 14 ")
(Set-fontset-font (frame-parameter nil 'font)
'Han (font-spec: Family "simsun": Size 14 ))
(Set-fontset-font (frame-parameter nil 'font)
'Symbol (font-spec: Family "simsun": Size 14 ))
(Set-fontset-font (frame-parameter nil 'font)
'Cjk-MISC (font-spec: Family "simsun": Size 14 ))
(Set-fontset-font (frame-parameter nil 'font)
'Bopomofo (font-spec: Family "simsun": Size 14 ))

Related Article

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.