Hello! I tried to make cyrillic symbols and words in pdf searchable, but it still is not. Also I cannot highlight them.
Is it possible to fix it somehow?
Hm, I’m afraid I can’t help you here. Did you update your PATH (see second item in Typesetting with XeLaTeX/LuaLaTeX — Matplotlib 3.5.1 documentation)?
On my Windows computer, I have TexLive installed, xelatex is in the PATH, and rcParams['pgf.texsystem'] is left at its default.
Because we pass strings on to an underlying latex implementation, I’m not even sure we should be trying to auto-escape (as we are as likely to get it wrong and escape something we should not as we are to fail to escape something we should).
If you set the pdf compression to 0 you can see the source of the problem:
plt.rcParams['pdf.compression'] = 0
45.2734375 0 Td
[ ( axis x) ] TJ
ET
q 0.01 0 0 0.01 0 0 cm /F1-DejaVuSans-uni041E Do Q
q 0.01 0 0 0.01 7.87109375 0 cm /F1-DejaVuSans-uni0441 Do Q
q 0.01 0 0 0.01 13.369140625 0 cm /F1-DejaVuSans-uni044C Do Q
q 0.01 0 0 0.01 22.44140625 0 cm /F1-DejaVuSans-uni0430 Do Q
q 0.01 0 0 0.01 28.5693359375 0 cm /F1-DejaVuSans-uni0431 Do Q
q 0.01 0 0 0.01 34.736328125 0 cm /F1-DejaVuSans-uni0441 Do Q
q 0.01 0 0 0.01 40.234375 0 cm /F1-DejaVuSans-uni0446 Do Q
q 0.01 0 0 0.01 47.041015625 0 cm /F1-DejaVuSans-uni0438 Do Q
q 0.01 0 0 0.01 53.5400390625 0 cm /F1-DejaVuSans-uni0441 Do Q
q 0.01 0 0 0.01 59.0380859375 1 cm /F1-DejaVuSans-uni0441 Do Q
Q
0.8 w
46.062992 36.980885 m
42.562992 36.980885 l
B
where ASCII gets encoded as an actual string and higher code points get encoded.
If you switch the font type to 42
plt.rcParams['pdf.fonttype'] = 42
in okular I get the Cyrillic to be selectable.
and what I think in the axis label in the pdf as a single (encoded) string.