<commit_before>;;; ui/unicode/config.el -*- lexical-binding: t; -*-

(def-package! unicode-fonts
  :demand t
  :init
  (setq-default bidi-display-reordering t
                doom-unicode-font nil)
  :config
  ;; NOTE will impact startup time on first run
  (unicode-fonts-setup))<commit_msg>ui/unicode: initialize more intelligently<commit_after>;;; ui/unicode/config.el -*- lexical-binding: t; -*-

(def-package! unicode-fonts
  :init
  (setq-default bidi-display-reordering t
                doom-unicode-font nil)

  (defun +unicode|init-fonts (&optional frame)
    "Initialize `unicode-fonts', if in a GUI session."
    (when (display-graphic-p frame)
      (with-selected-frame frame
        (require 'unicode-fonts)
        ;; NOTE will impact startup time on first run
        (unicode-fonts-setup))))

  (add-hook! 'after-init-hook
    (if initial-window-system
        (+unicode|init-fonts)
      (add-hook 'after-make-frame-functions #'+unicode|init-fonts))))
{'fraction_non_alphanumeric': 0.13917525773195877, 'fraction_numerical': 0.0, 'mean_word_length': 2.963265306122449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1755083', 'n_tokens_mistral': 334, 'n_tokens_neox': 301, 'n_words': 73}