diff options
Diffstat (limited to 'lib/sisu/v5/sysenv.rb')
-rw-r--r-- | lib/sisu/v5/sysenv.rb | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 3092532b..0616abb7 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -281,7 +281,7 @@ module SiSU_Env @@tx ||=SiSU_Viz::TeX.new end def rc_path_options - @rc_path=[ + [ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_version_dir}", "#{$sisu_document_markup_directory_base_fixed_path}/.sisu", "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_version_dir}", @@ -297,14 +297,12 @@ module SiSU_Env S_CONF[:header_make] end def makefile - #if @markup_dir_changed_ - rc_path_options.each do |v| - if FileTest.exist?("#{v}/#{makefile_name}") - @sisu_make_path=v - break - end + rc_path_options.each do |v| + if FileTest.exist?("#{v}/#{makefile_name}") + @sisu_make_path=v + break end - #end + end @sisu_make_file_path=@sisu_make_path \ ? "#{@sisu_make_path}/#{makefile_name}" : nil @@ -552,7 +550,6 @@ module SiSU_Env n =n + '.' + @fn[:t] x << { f: "#{@fn[:m]}.#{@fn[:t]}", l: lng_base, n: n } end - #x << { f: "#{@fns}", l: lng_base } langs.each do |l| lng=SiSU_Env::StandardiseLanguage.new(l) if FileTest.file?("#{@fn[:m]}~#{lng.code}.#{@fn[:t]}") @@ -617,16 +614,10 @@ module SiSU_Env @m=@m.uniq end def filename(code,name,suffix) - #d=SiSU_Env::InfoEnv.new(@fns) - #fnl=d.i18n.lang_filename(code) "#{name}#{suffix}" - #if code - # "#{fnl[:pre]}#{name}#{fnl[:mid]}#{suffix}#{fnl[:post]}" - #else "#{name}#{suffix}" - #end end def lang(code) - @fn={ + { html: filename(code,'','.html'), book_index: filename(code,'book_index','.html'), concordance: filename(code,'concordance','.html'), @@ -671,7 +662,6 @@ module SiSU_Env book_idx_epub: filename(code,'book_index','.xhtml'), epub_concord: filename(code,'concordance','.xhtml'), } - @fn end end class SystemCall @@ -1790,6 +1780,9 @@ WOK end def font def texpdf + # you may wish to check selected font against available fonts: + # fc-list :outline -f "%{family}\n" + # fc-list :lang=ja def main (defined? @rc['default']['texpdf_font']) \ && (@rc['default']['texpdf_font']=~/\S{3,}/) \ @@ -1814,6 +1807,30 @@ WOK ? @rc['default']['texpdf_font_mono'] : 'Liberation Mono' end + def cjk + (defined? @rc['default']['texpdf_font_cjk']) \ + && (@rc['default']['texpdf_font_cjk']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font_cjk'] + : 'IPAGothic' # 'IPAGothic' # 'IPAMincho' # 'TakaoMincho' # 'VL Gothic' + end + def cjk_zh + (defined? @rc['default']['texpdf_font_cjk_zh']) \ + && (@rc['default']['texpdf_font_cjk_zh']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font_cjk_zh'] + : 'IPAGothic' + end + def cjk_ja + (defined? @rc['default']['texpdf_font_cjk_ja']) \ + && (@rc['default']['texpdf_font_cjk_ja']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font_cjk_ja'] + : 'IPAGothic' + end + def cjk_ko + (defined? @rc['default']['texpdf_font_cjk_ko']) \ + && (@rc['default']['texpdf_font_cjk_ko']=~/\S{3,}/) \ + ? @rc['default']['texpdf_font_cjk_ko'] + : 'IPAGothic' + end self end self |