From 906976cf0fd8326ed212524e309c823efdedbda1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 Jun 2010 00:38:25 -0400 Subject: texpdf, ensure default font is set (Liberation Sans) * a fix, (before this unless configured breaks) --- lib/sisu/v2/sysenv.rb | 1 + lib/sisu/v2/texpdf_format.rb | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') 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/ <