[XeTeX] XeLaTeX PDF Glitch with Serbian Glyphs

Georg Duffner g.duffner at gmail.com
Tue Sep 17 12:07:49 CEST 2013


Am 16.09.2013 22:16, schrieb Alessandro Ceschini:
> Serbian Cyrillic requires a peculiar localisation because some glyphs
> are different from the standard. The PDF produced by XeLaTeX however
> must have some glitch because if I try copy/paste from it to another
> document the characters affected by Serbian localisation simply
> disappear :-\ ! This doesn't happen with PDF produced by LibreOffice
> 4.1, which now supports OpenType and therefore localised glyphs:
> characters are correctly copied, and even if the recipient program
> doesn't support OpenType, then standard glyphs are displayed.
>

Ciao Alessandro,

not knowing which font you are using, it’s a bit difficult to analyze 
your problem. But a very probable source for the behaviour you describe 
is that the font encodes the serbian characters (and others used in 
opentype substitutions) in the PUA, so they are linked to encoding slots 
different from the actual б, д, п, т, г etc. Linux Libertine is such a 
candidate. Its Serbian glyphs are encoded at F6C4 - F6C8 (in the Italic 
font), so if you copy/paste from a PDF it’ll paste a glyph "F6C4" 
instead of "0433" (г). Only few fonts contain a г at that position. In 
my tests, LibreOffice exported PDFs show the same result, but you won’t 
notice it, if you use Linux Libertine as target font, in LO because that 
one does have the desired letter at that code point. Changing the 
language from Serbian to Russian however will reveil that it’s fixed as 
Serbian г and won’t change back to the "generic" form.

If you try the same with EBGaramond, copy/paste should be fine (I don’t 
want to advertise EBG, I just haven’t found in a quick search another 
font that has the Serbian glyphs in unencoded slots).

Best regards,
Georg


More information about the XeTeX mailing list