aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/texpdf_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/texpdf_format.rb')
-rw-r--r--lib/sisu/v2/texpdf_format.rb9
1 files changed, 8 insertions, 1 deletions
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