From 1ce2c1255aee01fab9940fc26d251767bbf8c960 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 5 Jan 2011 16:53:28 +0100 Subject: [PATCH 1/1] use dejavu serif for cyrrylic --- librarian/pdf.py | 5 ++++- librarian/pdf/wl.sty | 8 ++++++++ librarian/xslt/wl2tex.xslt | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/librarian/pdf.py b/librarian/pdf.py index 2d45372..07272f2 100644 --- a/librarian/pdf.py +++ b/librarian/pdf.py @@ -282,7 +282,10 @@ def load_including_children(provider, slug=None, uri=None, file_path=None): else: raise ValueError('Neither slug, URI nor file path provided for a book.') - document = WLDocument.from_file(f, True, + text = f.read().decode('utf-8') + text = re.sub(ur"([\u0400-\u04ff]+)", ur"\1", text) + + document = WLDocument.from_string(text, True, parse_dublincore=True) f.close() diff --git a/librarian/pdf/wl.sty b/librarian/pdf/wl.sty index e676b8d..687efde 100644 --- a/librarian/pdf/wl.sty +++ b/librarian/pdf/wl.sty @@ -24,6 +24,14 @@ Scale=1.04, LetterSpace=-1.0 ] {JunicodeWL} +\newfontfamily\alien[ +SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}}, +Numbers=OldStyle, +Scale=0.85, +LetterSpace=-1.0 +] {DejaVu Serif} + + \defaultfontfeatures{ SizeFeatures={ {Size={-10}, FakeStretch=1.02, LetterSpace=2.0 }, diff --git a/librarian/xslt/wl2tex.xslt b/librarian/xslt/wl2tex.xslt index f5e137f..c3abdd6 100644 --- a/librarian/xslt/wl2tex.xslt +++ b/librarian/xslt/wl2tex.xslt @@ -319,6 +319,13 @@ + + + + + + + -- 2.20.1