diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v2/sysenv.rb | 1 | ||||
-rw-r--r-- | lib/sisu/v2/texpdf_format.rb | 9 |
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 |