izuzak / atom-pdf-view

Support for viewing PDF files in Atom.
https://atom.io/packages/pdf-view
MIT License
106 stars 30 forks source link

Text does not appear according to language settings #148

Closed PierreMarchand20 closed 7 years ago

PierreMarchand20 commented 7 years ago

I am on Mac OS 10.11.6 with french and english in the settings of my OS. For now, atom choose the language according to first language chosen in the settings of the OS so I am switching back and forth to get the right spell check. (tip got from https://github.com/atom/spell-check/issues/11)

And I noticed working with latextools that when I have a french language in first, text does not appear in pdf-view. Actually, I tried with other pdfs and text never appears if french is set in first. But it works well if I put english first.

izuzak commented 7 years ago

Thanks for opening an issue, @PierreMarchand20, but I have to say I don't understand what you're doing or what you're reporting as a problem.

Can you provide step-by-step instructions for reproducing the problem, a PDF with which the problem is reproducible, and screenshots which clearly demonstrate each of those steps and the final problem? Assume I have the latest stable version of Atom installed + this package and nothing else.

PierreMarchand20 commented 7 years ago

Ok then: I disabled every package except for pdf-view. I have the following language setting: capture d ecran 2016-08-29 a 11 20 43 I open a random pdf file and it works: capture d ecran 2016-08-29 a 11 28 42 But if I change my language setting: capture d ecran 2016-08-29 a 11 29 46 it does not work anymore: capture d ecran 2016-08-29 a 11 30 55 Nothing appear or sometime I get this kind of thing (the following picture is taken from another example): capture d ecran 2016-08-29 a 11 40 18 Notice it happens because of the text: capture d ecran 2016-08-29 a 11 41 57

izuzak commented 7 years ago

@PierreMarchand20 Thanks for those details. I just tried reproducing the problem using those steps and was not able to -- a PDF I have renders the same regardless of which language I select as primary. Can you share the PDF you're using to reproduce this so that I can try with that? You can add it as an attachment when you comment on this issue

PierreMarchand20 commented 7 years ago

Ok, I tried to reproduce it and I remarked something. It only happens when I open a pdf using terminal. For example: "atom gnuplot.pdf" with the following pdf and french in principal language (notice that you have to restart terminal each time you change the principal language)

gnuplot.pdf

If I open it by just clicking on, it works...

Luthaf commented 7 years ago

Same issue here. It looks related to the locale of the process.

Running atom in command line with en_US locale (LANG=en_US.UTF-8 atom file.pdf) works fine, but running it under the fr_FR locale (LANG=fr_FR.UTF-8 atom file.pdf) fails to render the fonts. The PDF is created by pdflatex with standard fonts (I think they are Type1 fonts).

This only happen on OS X, the fonts are rendered fine on Linux (CentOS 7).

PierreMarchand20 commented 7 years ago

I recently tried Atome beta because it solved the keybinding issue for international keyboard (http://blog.atom.io/2016/10/17/the-wonderful-world-of-keyboards.html) and it seems that there is no more issue with opening pdf files from command line and a system language different from english. I do not know why it works better than before, may be because of this solved issue about keybinding. Anyway, if someone can confirm it, I suggest we close this issue.

izuzak commented 7 years ago

I recently tried Atome beta because it solved the keybinding issue for international keyboard and it seems that there is no more issue with opening pdf files from command line and a system language different from english.

Thanks for letting us know, @PierreMarchand20. I'm going to close this, and if anyone can still reproduce this on Atom 1.12 -- let us know.