2 votes

Why is the code font not working on Firefox while it is on Chrome?

Tags: code, fonts
(defun stand-minutes ()
  "Stand minutes"
  (interactive)
  (let* (
         (todays-date (format-time-string "%Y-%m-%d"))
         (minutes-file "~/.config/emacs/minutes.txt"))
    (if (file-exists-p minutes-file)
        (progn
          (with-temp-buffer
            (insert-file-contents-literally minutes-file)
            (setq first-line (buffer-substring-no-properties
                        (line-beginning-position)
                        (line-end-position)))
            (unless (string= first-line todays-date)
              (find-file minutes-file)
              (erase-buffer)
              (insert todays-date "\n" "0")
              (save-buffer)
              (kill-buffer)
              (message "Updated minutes.txt to current date"))))
      (progn
        (find-file minutes-file)
        (insert todays-date "\n" "0")
        (save-buffer)
        (kill-buffer)
        (message "Created minutes.txt")))))

(stand-minutes)

Firefox: https://i.horizon.pics/2WXggwzowP.png
Firefox Developer Edition: https://i.horizon.pics/XkAkrmBNlA.png
Chromium: https://i.horizon.pics/A6zyJXswiK.png

1 comment

  1. hungariantoast
    Link
    Firefox inspector says Tildes code blocks are using the fallback monospace font, which suggests that I don't have any of the other fonts that Tildes uses for code blocks ("SF Mono", "Segoe UI...

    Firefox inspector says Tildes code blocks are using the fallback monospace font, which suggests that I don't have any of the other fonts that Tildes uses for code blocks ("SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier) installed on my system. In fact, in trying to figure this out, I made sure I didn't have any of those fonts installed on my system.

    And yet, the fallback monospace font the Firefox inspector is telling me it's using for the code block looks an awful lot like Courier. Even better, when I delete , Courier from the relevant CSS style, the font changes. It changes to what should be the actual fallback monospace font for my system DejaVu Sans Mono (which is still different from the font Chrome is using, btw).

    I will... just figure this out tomorrow. For now I've set code blocks to use my lord and savior Iosevka Fixed Medium and honestly I'll probably just keep it that way.