ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.52k stars 2.21k forks source link

Missing Characters copied from PDF #4490

Closed TheShadowKnows55 closed 7 years ago

TheShadowKnows55 commented 7 years ago

Issue:

I copied Chinese phrases out of a pdf file into Anki (Desktop) and synced with my Ankidroid. In the Ankidroid version, sometimes there are characters missing in the phrase - the whole phrase shows up in the Editing mode for my card, but not in the preview card, in the preview card there is only a space - If I copy that space to somewhere else, it shows me the character...

naturally I thought it has something to do with the fonts - I changed fonts and card type - but it did not help - The Desktop Version can handle it normally... but not the Ankidroid Version.

Reproduction Steps
  1. Download this PDF File

1. Text_Teil1_Masterübersetzung.pdf

  1. Copy the first Sentence in Anki, Sync with Ankidroid
  2. Check the Preview and the Editing Mode

Expected Result: The Preview should exactly show the Sentence I copied Actual Result: A Few Characters are indeed missing.

eginhard commented 7 years ago

Try Google Noto, that's generally the most reliable font: https://ankidroid.org/docs/manual.html#customFonts

TheShadowKnows55 commented 7 years ago

Hi, thank you for the list - I did not find a nice Chinese font anywhere close to the "Kaiti" font sadly.

In any case - This does not seem to be a font issue, I changed fonts in the card-type, but the characters were missing anyway. In addition the font I had can easily process things like 革 or 干 - but It can't process them when I copy it directly out of this pdf file, nor can other fonts process those particular copied signs. (Careful, only when I copy them out of the pdf file, the above problem occurs - If I copy the 革 or 干 from anywhere else, it works like it should work)

I can also reproduce this with the way described above - It's strange because changing the font to let's say the system font I have the exact issue.

eginhard commented 7 years ago

Could you attach a deck with one card where the characters work for you and one where they don't? For me everything works fine, so it does sound rather like a font issue. In addition to specifying a font in the card template, you also need to make sure it's actually added to your device as described in the Anki manual: http://ankisrs.net/docs/manual.html#installingfonts

TheShadowKnows55 commented 7 years ago

Okay, file attached (had to package it since github doesn't allow filetype) _Fachvokabeln.apkg.zip

In the Vocabulary list there is an entry named 全面深化改革. (the rest is all working)

My Card Type wants this phrase to use a certain "KaiTi.ttf" It doesn't work with this, nor without it (standard Font) I'm still using the somewhat older method for Ankidroid and have a "fonts" folder created...I'm not sure if that's the problem, since it works with all other cards in my other decks. I used Anki extensively since years and never came across this.

If It's a font issue I expect my Font file to ignore all other Words or sentences where the Character 面 and 革 appear, but it doesn't, the font file processes them in all other cards, except the ones I created by copying from this particular pdf.

Thanks for the help btw.

eginhard commented 7 years ago

The character on the card (copied from the PDF) and the one in your previous post are different: https://unicodelookup.com/#⾰革/1

It might not be supported by that font, so I'd recommend using Google Noto as described above.