Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级新版之后,中文字体无法显示 #42

Closed
saccohuo opened this issue Aug 12, 2016 · 21 comments
Closed

升级新版之后,中文字体无法显示 #42

saccohuo opened this issue Aug 12, 2016 · 21 comments

Comments

@saccohuo
Copy link

saccohuo commented Aug 12, 2016

从20160601版本升级到20160708版本之后,中文字体无法显示,系统字体正常。使用之前20160601版本的完全正常。如下图所示,使用cfs-edit-profile可以看到中文字体显示的“无”。

Win7 x64,emacs 24.5

test

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

测试这两个函数

(defun cfs--font-exists-p (font)
  (let ((all-fonts (cfs--font-family-list)))
    (or (member font all-fonts))))

(defun cfs--font-family-list ()
  (delete-dups
   (mapcar #'(lambda (x)
               (substring-no-properties
                (string-as-multibyte x)))
           (font-family-list))))

@saccohuo
Copy link
Author

直接eval一下这两个函数?试了一下,没有解决问题

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

C-xC-e 这两个函数,没有效果?

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

eval 这两个函数后,cfs-increase-fontsize

@saccohuo
Copy link
Author

eval之后运行cfs-increase-fontsize,还是没有效果。
image

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

(cfs--get-valid-fonts) 的返回值是啥?

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

(cl-prettyprint (cfs--font-family-list)) 这个的结果是啥?

@saccohuo
Copy link
Author

(cfs--get-valid-fonts) 的返回值是 ("Monaco" nil "HanaMinB")
(cl-prettyprint (cfs--font-family-list)) 的返回值如下:

("System" "Terminal"
 "Fixedsys"
 "Modern"
 "Roman"
 "Script"
 "Courier"
 "MS Serif"
 "MS Sans Serif"
 "Small Fonts"
 "TeamViewer11"
 "DS ISO 1"
 "Marlett"
 "Arial"
 "Batang"
 "BatangChe"
 "Gungsuh"
 "GungsuhChe"
 "Courier New"
 "DaunPenh"
 "DokChampa"
 "Estrangelo Edessa"
 "Euphemia"
 "Gautami"
 "Vani"
 "Gulim"
 "GulimChe"
 "Dotum"
 "DotumChe"
 "Impact"
 "Iskoola Pota"
 "Kalinga"
 "Kartika"
 "Khmer UI"
 "Lao UI"
 "Latha"
 "Lucida Console"
 "Malgun Gothic"
 "Mangal"
 "Meiryo"
 "Meiryo UI"
 "Microsoft Himalaya"
 "Microsoft JhengHei"
 "΢\310\355\321ź\332"
 "MingLiU"
 "PMingLiU"
 "MingLiU_HKSCS"
 "MingLiU-ExtB"
 "PMingLiU-ExtB"
 "MingLiU_HKSCS-ExtB"
 "Mongolian Baiti"
 "MS Gothic"
 "MS PGothic"
 "MS UI Gothic"
 "MS Mincho"
 "MS PMincho"
 "MV Boli"
 "Microsoft New Tai Lue"
 "Nyala"
 "Microsoft PhagsPa"
 "Plantagenet Cherokee"
 "Raavi"
 "Segoe Script"
 "Segoe UI"
 "Segoe UI Semibold"
 "Segoe UI Light"
 "Segoe UI Symbol"
 "Shruti"
 "\313\316\314\345"
 "\320\302\313\316\314\345"
 "Sylfaen"
 "Microsoft Tai Le"
 "Times New Roman"
 "Tunga"
 "Vrinda"
 "Shonar Bangla"
 "Microsoft Yi Baiti"
 "Tahoma"
 "Microsoft Sans Serif"
 "Angsana New"
 "Aparajita"
 "Cordia New"
 "Ebrima"
 "Gisha"
 "Kokila"
 "MoolBoran"
 "Symbol"
 "Utsaah"
 "Vijaya"
 "Wingdings"
 "Andalus"
 "Arabic Typesetting"
 "Simplified Arabic"
 "Simplified Arabic Fixed"
 "Sakkal Majalla"
 "Traditional Arabic"
 "Aharoni"
 "David"
 "FrankRuehl"
 "Levenim MT"
 "Miriam"
 "Miriam Fixed"
 "Narkisim"
 "Rod"
 "\267\302\313\316"
 "\272\332\314\345"
 "\277\254\314\345"
 "AngsanaUPC"
 "Browallia New"
 "BrowalliaUPC"
 "CordiaUPC"
 "DilleniaUPC"
 "EucrosiaUPC"
 "FreesiaUPC"
 "IrisUPC"
 "JasmineUPC"
 "KodchiangUPC"
 "LilyUPC"
 "DFKai-SB"
 "Lucida Sans Unicode"
 "Arial Black"
 "Comic Sans MS"
 "Franklin Gothic Medium"
 "Georgia"
 "Palatino Linotype"
 "Segoe Print"
 "Trebuchet MS"
 "Verdana"
 "Webdings"
 "ZWAdobeF"
 "HP Simplified"
 "HP Simplified Light"
 "Lingoes Unicode"
 "SimSun-ExtB"
 "Arvo"
 "Droid Serif"
 "Indie Flower"
 "Lobster"
 "Open Sans"
 "Poiret One"
 "Raleway"
 "Roboto"
 "Roboto Condensed"
 "Roboto Slab"
 "Arial Unicode MS"
 "Calibri"
 "Cambria"
 "Cambria Math"
 "Candara"
 "Consolas"
 "Constantia"
 "Corbel"
 "Kingsoft Phonetic Plain"
 "Roboto Th"
 "Tempus Sans ITC"
 "Pristina"
 "Papyrus"
 "Mistral"
 "Lucida Handwriting"
 "Kristen ITC"
 "Juice ITC"
 "French Script MT"
 "Freestyle Script"
 "Bradley Hand ITC"
 "Arial Narrow"
 "Book Antiqua"
 "Garamond"
 "Monotype Corsiva"
 "Century Gothic"
 "Algerian"
 "Baskerville Old Face"
 "Bauhaus 93"
 "Bell MT"
 "Berlin Sans FB"
 "Bernard MT Condensed"
 "Bodoni MT Poster Compressed"
 "Britannic Bold"
 "Broadway"
 "Brush Script MT"
 "Californian FB"
 "Centaur"
 "Chiller"
 "Colonna MT"
 "Cooper Black"
 "Footlight MT Light"
 "Harlow Solid Italic"
 "Harrington"
 "High Tower Text"
 "Jokerman"
 "Kunstler Script"
 "Lucida Bright"
 "Lucida Calligraphy"
 "Lucida Fax"
 "Magneto"
 "Matura MT Script Capitals"
 "Modern No. 20"
 "Niagara Engraved"
 "Niagara Solid"
 "Old English Text MT"
 "Onyx"
 "Parchment"
 "Playbill"
 "Poor Richard"
 "Ravie"
 "Informal Roman"
 "Showcard Gothic"
 "Snap ITC"
 "Stencil"
 "Viner Hand ITC"
 "Vivaldi"
 "Vladimir Script"
 "Wide Latin"
 "Tw Cen MT"
 "Tw Cen MT Condensed"
 "Script MT Bold"
 "Rockwell Extra Bold"
 "Rockwell Condensed"
 "Rockwell"
 "Rage Italic"
 "Perpetua Titling MT"
 "Perpetua"
 "Palace Script MT"
 "OCR A Extended"
 "Maiandra GD"
 "Lucida Sans Typewriter"
 "Lucida Sans"
 "Imprint MT Shadow"
 "Haettenschweiler"
 "Goudy Stout"
 "Goudy Old Style"
 "Gloucester MT Extra Condensed"
 "Gill Sans Ultra Bold Condensed"
 "Gill Sans Ultra Bold"
 "Gill Sans MT Condensed"
 "Gill Sans MT"
 "Gill Sans MT Ext Condensed Bold"
 "Gigi"
 "Franklin Gothic Medium Cond"
 "Franklin Gothic Heavy"
 "Franklin Gothic Demi Cond"
 "Franklin Gothic Demi"
 "Franklin Gothic Book"
 "Forte"
 "Felix Titling"
 "Eras Medium ITC"
 "Eras Light ITC"
 "Eras Demi ITC"
 "Eras Bold ITC"
 "Engravers MT"
 "Elephant"
 "Edwardian Script ITC"
 "Curlz MT"
 "Copperplate Gothic Light"
 "Copperplate Gothic Bold"
 "Century Schoolbook"
 "Castellar"
 "Calisto MT"
 "Bookman Old Style"
 "Bodoni MT Condensed"
 "Bodoni MT Black"
 "Bodoni MT"
 "Blackadder ITC"
 "Arial Rounded MT Bold"
 "Agency FB"
 "Gabriola"
 "Berlin Sans FB Demi"
 "Tw Cen MT Condensed Extra Bold"
 "Century"
 "Calibri Light"
 "Gadugi"
 "Leelawadee"
 "Microsoft JhengHei UI"
 "Microsoft Uighur"
 "Microsoft YaHei UI"
 "Nirmala UI"
 "Segoe UI Semilight"
 "Wingdings 2"
 "Wingdings 3"
 "Bookshelf Symbol 7"
 "MS Outlook"
 "MS Reference Sans Serif"
 "MS Reference Specialty"
 "\265\310\317\337"
 "\265\310\317\337 Light"
 "Source Sans Pro Black"
 "Carlito"
 "Source Code Pro"
 "PT Serif"
 "DejaVu Sans"
 "OpenSymbol"
 "Liberation Mono"
 "Linux Biolinum G"
 "Gentium Basic"
 "Caladea"
 "Liberation Sans Narrow"
 "DejaVu Sans Light"
 "DejaVu Sans Condensed"
 "DejaVu Sans Mono"
 "DejaVu Serif"
 "DejaVu Serif Condensed"
 "Gentium Book Basic"
 "Liberation Sans"
 "Liberation Serif"
 "Linux Libertine Display G"
 "Linux Libertine G"
 "Source Sans Pro"
 "Source Sans Pro ExtraLight"
 "Source Sans Pro Light"
 "Source Sans Pro Semibold"
 "\323\327Բ"
 "\273\252\316\304\326\320\313\316"
 "\273\252\316\304\320\302κ"
 "\273\252\316\304\320п\254"
 "\273\252\316\304ϸ\272\332"
 "\273\252\316\304\313\316\314\345"
 "\273\252\316\304\301\245\312\351"
 "\273\252\316Ŀ\254\314\345"
 "\273\252\316\304\347\372\347\352"
 "\273\252\316ķ\302\313\316"
 "\273\252\316IJ\312\324\306"
 "\301\245\312\351"
 "\267\275\325\375Ҧ\314\345"
 "\267\275\325\375\312\346\314\345"
 "Euclid"
 "Euclid Symbol"
 "Euclid Extra"
 "Euclid Fraktur"
 "Euclid Math One"
 "Euclid Math Two"
 "Fences"
 "Tiger"
 "MT Extra Tiger"
 "Symbol Tiger"
 "Tiger Expert"
 "Symbol Tiger Expert"
 "TS3D"
 "Courier10 BT"
 "CATIA Symbols"
 "SymbolMono BT"
 "SymbolProp BT"
 "BankGothic Lt BT"
 "BankGothic Md BT"
 "CityBlueprint"
 "CommercialPi BT"
 "CommercialScript BT"
 "CountryBlueprint"
 "Dutch801 Rm BT"
 "Dutch801 XBd BT"
 "EuroRoman"
 "ISOCPEUR"
 "ISOCTEUR"
 "Monospac821 BT"
 "PanRoman"
 "Romantic"
 "RomanS"
 "SansSerif"
 "Stylus BT"
 "SuperFrench"
 "Swis721 BT"
 "Swis721 BdOul BT"
 "Swis721 Cn BT"
 "Swis721 BdCnOul BT"
 "Swis721 BlkCn BT"
 "Swis721 LtCn BT"
 "Swis721 Ex BT"
 "Swis721 BlkEx BT"
 "Swis721 LtEx BT"
 "Swis721 Blk BT"
 "Swis721 BlkOul BT"
 "Swis721 Lt BT"
 "TechnicBold"
 "TechnicLite"
 "Technic"
 "UniversalMath1 BT"
 "Vineta BT"
 "AcadEref"
 "AIGDT"
 "AmdtSymbols"
 "GENISO"
 "AMGDT"
 "Complex"
 "GDT"
 "GothicE"
 "GothicG"
 "GothicI"
 "GreekC"
 "GreekS"
 "ISOCP2"
 "ISOCP3"
 "ISOCP"
 "ISOCT2"
 "ISOCT3"
 "ISOCT"
 "ItalicC"
 "ItalicT"
 "Italic"
 "Monotxt"
 "Proxy 1"
 "Proxy 2"
 "Proxy 3"
 "Proxy 4"
 "Proxy 5"
 "Proxy 6"
 "Proxy 7"
 "Proxy 8"
 "Proxy 9"
 "RomanC"
 "RomanD"
 "RomanT"
 "ScriptC"
 "ScriptS"
 "Simplex"
 "Syastro"
 "Symap"
 "Symath"
 "Symeteo"
 "Symusic"
 "Txt"
 "MT Extra"
 "Monaco"
 "OCR-A BT"
 "OCR-B 10 BT"
 "Swis721 Hv BT"
 "Futura Md BT"
 "Freehand521 BT"
 "Exotc350 DmBd BT"
 "Embassy BT"
 "EngraversGothic BT"
 "Geometr415 Blk BT"
 "Geometr212 BkCn BT"
 "NewsGoth Cn BT"
 "News706 BT"
 "Clarendon Blk BT"
 "Exotc350 Bd BT"
 "Geometr706 BlkCn BT"
 "Kaufmann BT"
 "Humnst777 Lt BT"
 "Humnst777 BT"
 "Humnst777 Blk BT"
 "Century751 BT"
 "TypoUpright BT"
 "GeoSlab703 MdCn BT"
 "DeVinne Txt BT"
 "Century725 Cn BT"
 "Schadow BT"
 "Humnst777 Cn BT"
 "Humnst777 BlkCn BT"
 "Century751 No2 BT"
 "Century751 SeBd BT"
 "CentSchbkCyrill BT"
 "DFGothic-EB"
 "\243ģ\306\326\320̫\277\254\225\370\314\345"
 "DFMincho-UB"
 "DFMincho-SU"
 "\243ģ\306\303\367\263\257\314\345W5"
 "DFPOP1-W9"
 "Swis721 WGL4 BT"
 "Bodoni Bk BT"
 "Bodoni Bd BT"
 "NewsGoth BT"
 "NewsGoth Lt BT"
 "Futura Bk BT"
 "Square721 BT"
 "Square721 Cn BT"
 "Clarendon Lt BT"
 "Clarendon BT"
 "Humanst521 Lt BT"
 "Humanst521 BT"
 "GeoSlab703 Md BT"
 "News701 BT"
 "HanaMinA"
 "HanaMinB")

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

测试一下这两个函数

(defun cfs--font-exists-p (font)
  (let ((all-fonts (cfs--font-family-list)))
    (or (member font all-fonts))))

(defun cfs--font-family-list ()
  (let ((fonts (font-family-list))
        results)
    (dolist (font fonts)
      (push (substring-no-properties
             (decode-coding-string font 'gbk)) results)
      (push (substring-no-properties
             (decode-coding-string font 'utf-8)) results))
    (delete-dups results)))

@saccohuo
Copy link
Author

字体写的是正常了,但是显示仍然不正常。
[org-mode]: 英文字体: Monaco 14.0,中文字体: 黑体, EXTB字体:HanaMinB
image

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

测试一下这个

(defun cfs--font-exists-p (font)
  (let ((all-fonts (font-family-list)))
    (or (member font all-fonts)
        (cl-some
         #'(lambda (x)
             (or (string= (decode-coding-string x 'gbk) font)
                 (string= (decode-coding-string x 'utf-8) font)))
         all-fonts))))

@saccohuo
Copy link
Author

跟上面的结果一样,字体名称显示正常,但是中文字体仍然显示不正确。

image

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

测试一下这个

(list-fonts (font-spec :family "微软雅黑"
                       :size 12
                       :weight 'normal
                       :slant 'normal))

@saccohuo
Copy link
Author

提示nil哎

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

测试这个

(list-fonts (font-spec :family "\345\276\256\350\275\257\351\233\205\351\273\221"
                       :size 12
                       :weight 'normal
                       :slant 'normal))

@saccohuo
Copy link
Author

同样提示nil

@tumashu
Copy link
Owner

tumashu commented Aug 12, 2016

我擦,啥情况? 你没有微软雅黑字体?

@saccohuo
Copy link
Author

可是我用另外0601版本的时候显示正常哎

@tumashu
Copy link
Owner

tumashu commented Aug 13, 2016

@saccohuo
Copy link
Author

提示这个:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  x-list-fonts(nil nil nil 1)
  (or (x-list-fonts fontname nil nil 1) (x-list-fonts (encode-coding-string fontname (quote gbk)) nil nil 1) (x-list-fonts (encode-coding-string fontname (quote utf-8)) nil nil 1))
  (car (or (x-list-fonts fontname nil nil 1) (x-list-fonts (encode-coding-string fontname (quote gbk)) nil nil 1) (x-list-fonts (encode-coding-string fontname (quote utf-8)) nil nil 1)))
  (let* ((font-xlfd (car (or (x-list-fonts fontname nil nil 1) (x-list-fonts (encode-coding-string fontname (quote gbk)) nil nil 1) (x-list-fonts (encode-coding-string fontname (quote utf-8)) nil nil 1))))) (if (and font-xlfd (x-decompose-font-name font-xlfd)) (progn font-xlfd)))
  cfs--get-xlfd(nil)
  (or (cfs--get-xlfd font) font)
  (if prefer-shortname font (or (cfs--get-xlfd font) font))
  (let ((font (cl-find-if (function cfs--font-exists-p) x))) (if prefer-shortname font (or (cfs--get-xlfd font) font)))
  (lambda (x) (let ((font (cl-find-if (function cfs--font-exists-p) x))) (if prefer-shortname font (or (cfs--get-xlfd font) font))))(("微软雅黑" "Noto Sans S Chinese Regular" "Microsoft Yahei" "Microsoft_Yahei" "文泉驿等宽微米黑" "文泉驿等宽正黑" "黑体" "Hiragino Sans GB" "文泉驿正黑" "文泉驿点阵正黑" "SimHei" "SimSun" "NSimSun" "FangSong" "KaiTi" "FangSong_GB2312" "KaiTi_GB2312" "LiSu" "YouYuan" "新宋体" "宋体" "楷体_GB2312" "仿宋_GB2312" "幼圆" "隶书" "STXihei" "STKaiti" "STSong" "STZhongsong" "STFangsong" "FZShuTi" "FZYaoti" "STCaiyun" "STHupo" "STLiti" "STXingkai" "STXinwei" "方正姚体" "方正舒体" "方正粗圆_GBK" "华文仿宋" "华文中宋" "华文彩云" "华文新魏" "华文细黑" "华文行楷" "微软雅黑" "Noto Sans S Chinese Regular" "Microsoft Yahei" "Microsoft_Yahei" ...))
  mapcar((lambda (x) (let ((font (cl-find-if (function cfs--font-exists-p) x))) (if prefer-shortname font (or (cfs--get-xlfd font) font)))) (("Monaco" "Consolas" "DejaVu Sans Mono" "Droid Sans Mono" "PragmataPro" "Courier" "Courier New" "Ubuntu Mono" "Liberation Mono" "MonacoB" "MonacoB2" "MonacoBSemi" "Droid Sans Mono Pro" "Inconsolata" "Source Code Pro" "Lucida Console" "Envy Code R" "Andale Mono" "Lucida Sans Typewriter" "monoOne" "Lucida Typewriter" "Panic Sans" "Hack" "Bitstream Vera Sans Mono" "HyperFont" "PT Mono" "Ti92Pluspc" "Excalibur Monospace" "Menlof" "Cousine" "Fira Mono" "Lekton" "M+ 1mn" "BPmono" "Free Mono" "Anonymous Pro" "ProFont" "ProFontWindows" "Latin Modern Mono" "Code 2002" "ProggyCleanTT" "ProggyTinyTT" "Monaco" "Consolas" "DejaVu Sans Mono" "Droid Sans Mono" "PragmataPro" "Courier" "Courier New" "Ubuntu Mono" ...) ("微软雅黑" "Noto Sans S Chinese Regular" "Microsoft Yahei" "Microsoft_Yahei" "文泉驿等宽微米黑" "文泉驿等宽正黑" "黑体" "Hiragino Sans GB" "文泉驿正黑" "文泉驿点阵正黑" "SimHei" "SimSun" "NSimSun" "FangSong" "KaiTi" "FangSong_GB2312" "KaiTi_GB2312" "LiSu" "YouYuan" "新宋体" "宋体" "楷体_GB2312" "仿宋_GB2312" "幼圆" "隶书" "STXihei" "STKaiti" "STSong" "STZhongsong" "STFangsong" "FZShuTi" "FZYaoti" "STCaiyun" "STHupo" "STLiti" "STXingkai" "STXinwei" "方正姚体" "方正舒体" "方正粗圆_GBK" "华文仿宋" "华文中宋" "华文彩云" "华文新魏" "华文细黑" "华文行楷" "微软雅黑" "Noto Sans S Chinese Regular" "Microsoft Yahei" "Microsoft_Yahei" ...) ("HanaMinB" "HanaMinB")))
  cfs--get-valid-fonts()
  (let* ((valid-fonts (cfs--get-valid-fonts)) (valid-fontnames (cfs--get-valid-fonts t)) (english-main-fontname (nth 0 valid-fonts)) (chinese-main-fontname (nth 1 valid-fonts)) (chinese-extra-fontname (nth 2 valid-fonts)) (english-main-fontsize (cfs--float (nth 0 fontsizes-list))) (chinese-main-fontsize (cfs--float (nth 1 fontsizes-list))) (chinese-extra-fontsize (cfs--float (nth 2 fontsizes-list))) (english-symbol-fontsize (cfs--float (nth 0 fontsizes-list))) (chinese-symbol-fontsize (cfs--float (nth 1 fontsizes-list))) (english-main-fontspec (font-spec :name english-main-fontname :size english-main-fontsize :weight (quote normal) :slant (quote normal))) (english-bold-fontspec (font-spec :name english-main-fontname :size english-main-fontsize :weight (quote bold) :slant (quote normal))) (english-italic-fontspec (font-spec :name english-main-fontname :size english-main-fontsize :weight (quote normal) :slant (quote italic))) (english-bold-italic-fontspec (font-spec :name english-main-fontname :size english-main-fontsize :weight (quote bold) :slant (quote italic))) (english-symbol-fontspec (font-spec :name english-main-fontname :size (or english-symbol-fontsize english-main-fontsize) :weight (quote normal) :slant (quote normal))) (chinese-main-fontspec (font-spec :name chinese-main-fontname :size chinese-main-fontsize :weight (quote normal) :slant (quote normal))) (chinese-symbol-fontspec (font-spec :name chinese-main-fontname :size (or chinese-symbol-fontsize chinese-main-fontsize) :weight (quote normal) :slant (quote normal))) (chinese-extra-fontspec (font-spec :name chinese-extra-fontname :size (or chinese-extra-fontsize chinese-main-fontsize) :weight (quote normal) :slant (quote normal)))) (if (cfs--fontspec-valid-p english-main-fontspec) (progn (set-face-attribute (quote default) nil :font english-main-fontspec) (if cfs-disable-bold (set-face-font (quote bold) english-main-fontspec) (if (cfs--fontspec-valid-p english-bold-fontspec) (set-face-font (quote bold) english-bold-fontspec) (message "Chinese-fonts-setup: 字体 %S 对应的粗体没有找到,不作处理!" english-main-fontname))) (if cfs-disable-italic (set-face-font (quote italic) english-main-fontspec) (if (cfs--fontspec-valid-p english-italic-fontspec) (set-face-font (quote italic) english-italic-fontspec) (message "Chinese-fonts-setup: 字体 %S 对应的斜体没有找到,不作处理!" english-main-fontname))) (if cfs-disable-bold-italic (set-face-font (quote bold-italic) english-main-fontspec) (if (cfs--fontspec-valid-p english-bold-italic-fontspec) (set-face-font (quote bold-italic) english-bold-italic-fontspec) (message "Chinese-fonts-setup: 字体 %S 对应的粗斜体没有找到,不作处理!" english-main-fontname))))) (if (cfs--fontspec-valid-p chinese-main-fontspec) (progn (let ((--dolist-tail-- (quote (kana han cjk-misc bopomofo gb18030))) charset) (while --dolist-tail-- (setq charset (car --dolist-tail--)) (set-fontset-font "fontset-default" charset chinese-main-fontspec) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (if (cfs--fontspec-valid-p english-main-fontspec) (progn (set-fontset-font "fontset-default" (quote symbol) english-symbol-fontspec))) (if (cfs--fontspec-valid-p chinese-extra-fontspec) (progn (set-fontset-font "fontset-default" nil chinese-extra-fontspec nil (quote prepend)))) (setq cfs--minibuffer-echo-string (format "[%s]: 英文字体: %s-%.1f,中文字体: %s, EXTB字体:%s" cfs--current-profile (or (nth 0 valid-fontnames) "无") english-main-fontsize (or (nth 1 valid-fontnames) "无") (or (nth 2 valid-fontnames) "无"))))
  cfs--set-font-1((14 16.5 16.5))
  (progn (if cfs-keep-frame-size (progn (setq height (* (frame-parameter frame (quote height)) (frame-char-height frame)) width (* (frame-parameter frame (quote width)) (frame-char-width frame))))) (cfs--set-font-1 fontsizes-list) (run-hook-with-args (quote cfs-set-font-finish-hook) fontsizes-list) (if cfs-keep-frame-size (progn (modify-frame-parameters frame (list (cons (quote height) (round height (frame-char-height frame))) (cons (quote width) (round width (frame-char-width frame))))))))
  (if (display-multi-font-p frame) (progn (if cfs-keep-frame-size (progn (setq height (* (frame-parameter frame (quote height)) (frame-char-height frame)) width (* (frame-parameter frame (quote width)) (frame-char-width frame))))) (cfs--set-font-1 fontsizes-list) (run-hook-with-args (quote cfs-set-font-finish-hook) fontsizes-list) (if cfs-keep-frame-size (progn (modify-frame-parameters frame (list (cons (quote height) (round height ...)) (cons (quote width) (round width ...))))))))
  (let ((frame (selected-frame)) height width) (if cfs-use-face-font-rescale (progn (cfs--set-face-font-rescale fontsizes-list) (setq fontsizes-list (list (car fontsizes-list))))) (if (display-multi-font-p frame) (progn (if cfs-keep-frame-size (progn (setq height (* (frame-parameter frame ...) (frame-char-height frame)) width (* (frame-parameter frame ...) (frame-char-width frame))))) (cfs--set-font-1 fontsizes-list) (run-hook-with-args (quote cfs-set-font-finish-hook) fontsizes-list) (if cfs-keep-frame-size (progn (modify-frame-parameters frame (list (cons ... ...) (cons ... ...))))))))
  cfs--set-font((14 16.5 16.5))
  (progn (cfs--set-font fontsizes-list))
  (if (display-graphic-p) (progn (cfs--set-font fontsizes-list)))
  (let* ((profile-name cfs--current-profile) (profile-step (cfs--get-profile-step profile-name)) (fontsizes-list (cfs--get-fontsizes profile-step))) (if (display-graphic-p) (progn (cfs--set-font fontsizes-list))))
  cfs-set-font-with-saved-step()
  (lambda nil (if (member cfs--current-profile cfs-profiles) nil (setq cfs--current-profile (car cfs-profiles))) (cfs-set-font-with-saved-step))()
  run-hooks(window-setup-hook)
  #[0 "\306 !�\n\204.
  funcall(#[0 "\306  !�\n\204.
  normal-top-level()

@tumashu
Copy link
Owner

tumashu commented Aug 24, 2016

这个应该解决了,关闭了

@tumashu tumashu closed this as completed Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants