<commit_before>;configure emacs font
;; avaiable font list pair, can work correctly in org-mode
(setq emacs-font-list '((
			 ("Consolas" 11) ;;en font name and size
			 ("Microsoft YaHei" 16)) ;; han font name and size
			(
			 ("DejaVu Sans Mono" 10) 
			 ( "WenQuanYi Micro Hei" 16))))

(defun font-existp (font-name)
  "check the given font-name is installed in curren system"
  (interactive)
  (if (null (x-list-fonts font-name))
      nil t))

(defun emacs-font-configure ()
  "configure the emacs fonts"
  (catch 'loop
    (dolist (font-pair emacs-font-list)
      (let ((en-font-list (car font-pair))
	    (han-font-list (first (cdr font-pair))))
	(let ((en-font-name (car en-font-list))
	      (en-font-size (first (cdr en-font-list)))
	      (han-font-name (car han-font-list))
	      (han-font-size (first (cdr han-font-list))))
	  (if (and (font-existp en-font-name)
		   (font-existp han-font-name))
	      (progn 
		(set-face-attribute 'default nil :font (format "%s %d" en-font-name en-font-size))
		(dolist (charset '(kana han symbol cjk-misc bopomofo))
		  (set-fontset-font t
				    charset
				    (font-spec :family han-font-name :size han-font-size)))
		(throw 'loop t))))))))

;;start font configuration
(emacs-font-configure)

(provide 'init-font-config)<commit_msg>update font config<commit_after>;configure emacs font
;; avaiable font list pair, can work correctly in org-mode
(defvar emacs-font-list '((
			 ("Consolas" 10) ;;en font name and size
			 ("Microsoft YaHei" 14)) ;; han font name and size
			(
			 ("DejaVu Sans Mono" 9) 
			 ("<NAME>" 14)))
  "Emacs font list: en font and han font pair")

(defun font-existp (font-name)
  "check the given font-name is installed in curren system"
  (interactive)
  (if (null (x-list-fonts font-name))
      nil t))

(defun emacs-font-configure ()
  "configure the emacs fonts"
  (catch 'loop
    (dolist (font-pair emacs-font-list)
      (let* ((en-font-list (car font-pair))
	     (han-font-list (first (cdr font-pair)))
	     (en-font-name (car en-font-list))
	     (en-font-size (first (cdr en-font-list)))
	     (han-font-name (car han-font-list))
	     (han-font-size (first (cdr han-font-list))))
	(if (and (font-existp en-font-name)
		   (font-existp han-font-name))
	      (progn 
		(set-face-attribute 'default nil :font (format "%s %d" en-font-name en-font-size))
		(dolist (charset '(kana han symbol cjk-misc bopomofo))
		  (set-fontset-font t
				    charset
				    (font-spec :family han-font-name :size han-font-size)))
		(throw 'loop t)))))))

;;start font configuration
(emacs-font-configure)

(provide 'init-font-config)
{'fraction_non_alphanumeric': 0.15690776884806737, 'fraction_numerical': 0.0057405281285878304, 'mean_word_length': 3.0907668231611893, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1313316', 'n_tokens_mistral': 1038, 'n_tokens_neox': 933, 'n_words': 267}