Hebrew font displaying differently in different places

Hi all, I have started learning Hebrew and changed the font on my cards (styling) to SBL Hebrew so it displays correctly. However, while the characters look perfect in the editor, when I am actually quizzed on them they look different. See here: Imgur: The magic of the Internet

Can anyone advise how I can fix how they display on the flashcards themselves?

1 Like

The top is the Editing font in the Browse window. Adding/Editing - Anki Manual

The bottom is the Styling font used to make that card. Styling & HTML - Anki Manual

It doesn’t look like they are the same.

3 Likes

Thank you, that works! Do you know how to do the same for the mobile app?

If you install the font in your collection as described (further down) in the Styling section – it will sync to your other devices and be available to display your cards.

1 Like

Thank you. I’ve been trying to install the font to sync it over to mobile but with no success. I’ve used this code if you’d be able to point out where I’ve gone wrong?

Try putting the font-family name in quotes, since it has a space – "SBL Hebrew". And you’re missing a semicolon at the end of a line. You added the file with that new filename to your collection.media folder?

1 Like

Thank you for your help. That seems to have been the right fix, but the Android app now gives me an error: “Failed to load SBL Hebrew.ttf” Any ideas?

(Edit: Yes, did add it to the indicated folder.)

If that’s the exact text of the error, then are you being consistent about the leading-underscore? AnkiDroid should know that the filename is _SBL Hebrew.ttf.

If not – is it possible that the file hasn’t synced to AnkiDroid yet?

2 Likes

I forced the sync, so it should work. I’ve made sure everything matches, so I’m not sure where I’m going wrong… Here’s the error:

Forcing a one-way sync doesn’t impact Media Sync.

But in that error, it looks like the file is called _SBLHebrew.ttf – underscore, but no space. Is that what the file in your collection.media is actually called?

1 Like

Yeah, it is, I did it without the space there as I wasn’t sure if the space would break it. When would media sync happen if that’s the issue?

Media sync should already be happening. Unless it’s not completing for some reason or backed up with other files.

Can you post the text of your current Styling template again? – as text this time please, just copy/paste it and use a –
```

code/preformatted text block.

```

And can you post a screenshot of how your font file appears in your collection media?

Yes, sure, thank you!

Styling:

.card {
  font-family: SBL Hebrew;
  font-size: 20px;
  text-align: center;
  color: black;
  background-color: white;
}

@font-face {
  font-family: SBL Hebrew;
  src: url("_SBLHebrew.ttf");
}

Font file in folder:

I don’t think your file has the right filename. It shows in that screenshot as ending in .ttf – but the file right next to it (which is probably an image) has no extension, so I think File Explorer is hiding extensions. You can click View at the top of the screen to make it show extensions, or right-click on the font file and open Properties – what’s the full name of the file?

2 Likes

Oh yeah, it’s _SBLHebrew.ttf.ttf

I took out the .ttf I’d added, and it looks like it’s working now on mobile. Thank you so so so much for your help. I greatly appreciate the time you’ve taken and your patience!

2 Likes