aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-06-12 00:47:47 -0400
committerRalph Amissah <ralph@amissah.com>2010-06-12 00:47:47 -0400
commit7b7d27c6a9087b9d4308152f9787d7e1b6ee9e09 (patch)
treebea3332cd5e8a5be04c5a934d4ea4cd12fb111c0 /lib
parentdebian/changelog (2.5.0-1) (diff)
parentupdate: changelog, version (2.5.1) (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/sysenv.rb1
-rw-r--r--lib/sisu/v2/texpdf_format.rb9
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb
index 8a9e38be..26e842ec 100644
--- a/lib/sisu/v2/sysenv.rb
+++ b/lib/sisu/v2/sysenv.rb
@@ -1268,6 +1268,7 @@ WOK
def font
def texpdf
(defined? @rc['default']['texpdf_font']) \
+ && (@rc['default']['texpdf_font']=~/\S{3,}/) \
? @rc['default']['texpdf_font'] \
: 'Liberation Sans' #'Liberation Sans' #'Liberation Serif'
end
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index e756aa03..ba615749 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -585,6 +585,7 @@ module SiSU_TeX_Pdf
class Format_head
def initialize(md,t_o)
@md,@t_o=md,t_o
+ @env=SiSU_Env::Info_env.new(@md.fns)
if t_o.class==Hash
@txt =t_o[:txt] || nil
@subtitle=t_o[:subtitle] || nil
@@ -642,13 +643,19 @@ module SiSU_TeX_Pdf
end
end
def tex_head_encode
+ texpdf_font=if defined? @md.make.texpdf_font \
+ and not @md.make.texpdf_font.nil? \
+ and @md.make.texpdf_font=~/\S{3,}/
+ @md.make.texpdf_font
+ else @env.font.texpdf
+ end
case @tex2pdf
when /xe/
<<WOK
\\usepackage{polyglossia, ucs, fontspec, xltxtra, xunicode}
\\setmainlanguage{#{tex_head_lang}}
\\setotherlanguage{english}
-\\setmainfont{#{@md.make.texpdf_font}}
+\\setmainfont{#{texpdf_font}}
WOK
when /pdf/
if @md.file_encoding =~ /iso-?8859/i #% iso8859