Open 0xCLARITY opened 4 years ago
Update:
This does not happen on my 2016 Macbook Pro running Mojave (OS X 10.14.6).
Same deck, (mostly) same extensions. Code Highlighting has the expected monospaced font.
I wonder if this is a bug with OS X 10.15?
This looks like the same bug as: https://github.com/glutanimate/mini-format-pack/issues/9
I'm having a similar issue, and am also on Catalina. It's this font during reviews as well.
This looks like the same bug as: glutanimate/mini-format-pack#9
Same problem with mini-format-pack installed, on Catalina.
This looks like the same bug as: glutanimate/mini-format-pack#9
Same problem with mini-format-pack installed, on Catalina.
I found a temporary solution.
Go to Tools → Add-ons → chosse "synatax highlighting for code" → View Files
Open main.py
, then modify the highlight_code
function.
# Actual code highlighting
def highlight_code(ed):
[...]
pretty_code = process_html(pretty_code) # line 415
# Add the following line after line 415 (change font type to Menlo)
pretty_code = pretty_code.replace("style=\"","style=\"font-family: Menlo;")
[...]
I change the font type to Menlo
. You can also change it to other types you like.
Be sure to include the font type in the Styling (shared between cards)
part of your card templates. It should be something like this.
.card {
font-family : Menlo, "PT Mono", Monaco, helvetica, arial, sans-serif;
...
}
Same problem when I upgraded to MacOS 10.15.4 from 10.14.x (During both editing and reviews)
Problem description
Please describe the issue concisely in here. In case of an error: Walk us through the steps you took to get there. What happened? What did you expect to happen?
Previously, code syntax used to be in a monospaced font when creating/editing a card. It now appears to be in Times New Roman or some other serif font.
Perhaps I'm missing the font used for previewing the code syntax on my computer now? This wasn't a problem previously, but something must have changed with my setup recently.
Checklist
Please replace the space inside the brackets with an x if the following items apply:
Information about your Anki set-up
Please fill out the section corresponding with your Anki version:
If you are using Anki 2.1
Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):
If you are using Anki 2.0
Please open Anki, go to Help → About, find the two lines starting with
Version:
andQt
, and copy-paste them between the backticks below:Please fill in details about your operating system (Windows/macOS/Linux, which version):
Please open Anki, go to Tools → Add-ons, take a screenshot of your installed add-ons, and paste it below:
Error message (if any)
If you've received an error message, please copy and paste it between the backticks below: