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

Code block font is wired on Catalina #15

Open
hologerry opened this issue Oct 11, 2019 · 8 comments
Open

Code block font is wired on Catalina #15

hologerry opened this issue Oct 11, 2019 · 8 comments

Comments

@hologerry
Copy link

On my clean install Catalina and Anki, the code block font is wired.
But on the web and mobile app, the code block font is normal.
Screen Shot 2019-10-12 at 01 27 19

Please help me to fix this bug.
Thanks a lot!

@suvernev-d
Copy link

Try using custom fonts in CSS to make them look the same on every device.

  1. Download some monospaced font, say, from NerdFonts. I use Iosevka for example.
  2. Place it inside your Anki collection.media folder (Tools > Add-ons > Open add-ons folder (or view files)) with one leading underscore to prevent deletion on sync
  3. Add link to font in CSS and a rule for rendering monospaced stuff:

In your card's CSS:

@font-face { /* Iosevka */
  font-family: Iosevka;
  src: url('_Iosevka_Medium.ttf'); // this file should be in your collection.media folder
}
pre, kbd, tt, var, samp, code{
  font-family:"Iosevka";
}

@josh-works
Copy link

@gregorrr I'd love to take a stab at fixing this issue, #14, and #20.

Do you have any contribution guidelines, or would you just like a PR? I'll take a stab at getting this fixed, but the more guidelines you have on styling, linting, functionality, etc, the better the inbound PR will conform to your preferences.

Finally, do you know of any guides/resources to get a jump start on anki package development? Discord servers, etc?

@natfarleydev
Copy link

Hey @josh-works, PR #21 should fix #20, feel free to use these changes if it's helpful.

I found very little in terms of documentation for addons in general, but the Anki code was very readable (if a little verbose) in terms of finding out which behaviour needs modifying/extending.

@josh-works
Copy link

@natfarleydev great work w/the PRs!

I'd love to see them get merged, if @gregorrr is down. In a few days I'll run the updated code locally and see how it's working! Thanks a ton!

@natfarleydev
Copy link

@josh-works It looks like @gregorrr isn't active on github at the moment so I've made a fork to maintain bugfixes here: https://github.com/natfarleydev/anki-auto-markdown which links to https://ankiweb.net/shared/info/15061497. Feel free to fix and PR into there for now

Hopefully @gregorrr will come back at some point, but for now I'm happy to maintain the functionality in the fork as I use this plugin multiple times a day and Anki is going through a lot of changes at the moment

@josh-works
Copy link

@natfarleydev Thanks so much! I'm following it right now. I just typed a question here, then decided to open it as an issue. Cannot see an "open new issue" so can't open there.

Anyway, do you know how I'd go about using your version of the plugin instead of the "official" version?

I imagine Anki only knows to track @gregorrr's repo, not your fork.

Once you write it up, I'll make a PR w/updates to the README outlining the steps so future folks won't need to ask.

@natfarleydev
Copy link

I've re-uploaded the plugin here: https://ankiweb.net/shared/info/15061497 (note the 'fix version' at the end of the title, I've purposefully kept everything else as close to the original since I only want to maintain the plugin rather than rewrite). I'll continue to upload to the fix version plugin as needed.

I'll double check the issue tracker on my repo, it won't be much good as a home for fixes if we can't track bugs!

@natfarleydev
Copy link

@josh-works You should be able to raise issues on my fork now; I'm not fussy about process so feel free to raise as you want.

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

4 participants