diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v6/sysenv.rb | 46 | ||||
-rw-r--r-- | lib/sisu/v6/texpdf_format.rb | 80 |
2 files changed, 63 insertions, 63 deletions
diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb index bc3f1a74..fd36691e 100644 --- a/lib/sisu/v6/sysenv.rb +++ b/lib/sisu/v6/sysenv.rb @@ -1880,51 +1880,51 @@ WOK # fc-list :outline -f "%{family}\n" # fc-list :lang=ja def main - (defined? @rc['default']['texpdf_font']) \ - && (@rc['default']['texpdf_font']=~/\S{3,}/) \ - ? @rc['default']['texpdf_font'] + (defined? @rc['default']['texpdf_fontface']) \ + && (@rc['default']['texpdf_fontface']=~/\S{3,}/) \ + ? @rc['default']['texpdf_fontface'] : 'Liberation Sans' end def sans # not used - (defined? @rc['default']['texpdf_font_sans']) \ - && (@rc['default']['texpdf_font_sans']=~/\S{3,}/) \ - ? @rc['default']['texpdf_font_sans'] + (defined? @rc['default']['texpdf_fontface_sans']) \ + && (@rc['default']['texpdf_fontface_sans']=~/\S{3,}/) \ + ? @rc['default']['texpdf_fontface_sans'] : 'Liberation Sans' end def serif # not used - (defined? @rc['default']['texpdf_font_serif']) \ + (defined? @rc['default']['texpdf_fontface_serif']) \ && (@rc['default']['texpdf_font_serif']=~/\S{3,}/) \ - ? @rc['default']['texpdf_font_serif'] + ? @rc['default']['texpdf_fontface_serif'] : 'Liberation Serif' end def mono - (defined? @rc['default']['texpdf_font_mono']) \ - && (@rc['default']['texpdf_font_mono']=~/\S{3,}/) \ - ? @rc['default']['texpdf_font_mono'] + (defined? @rc['default']['texpdf_fontface_mono']) \ + && (@rc['default']['texpdf_fontface_mono']=~/\S{3,}/) \ + ? @rc['default']['texpdf_fontface_mono'] : 'Liberation Mono' end def cjk - (defined? @rc['default']['texpdf_font_cjk']) \ - && (@rc['default']['texpdf_font_cjk']=~/\S{3,}/) \ - ? @rc['default']['texpdf_font_cjk'] + (defined? @rc['default']['texpdf_fontface_cjk']) \ + && (@rc['default']['texpdf_fontface_cjk']=~/\S{3,}/) \ + ? @rc['default']['texpdf_fontface_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'] + (defined? @rc['default']['texpdf_fontface_cjk_zh']) \ + && (@rc['default']['texpdf_fontface_cjk_zh']=~/\S{3,}/) \ + ? @rc['default']['texpdf_fontface_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'] + (defined? @rc['default']['texpdf_fontface_cjk_ja']) \ + && (@rc['default']['texpdf_fontface_cjk_ja']=~/\S{3,}/) \ + ? @rc['default']['texpdf_fontface_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'] + (defined? @rc['default']['texpdf_fontface_cjk_ko']) \ + && (@rc['default']['texpdf_fontface_cjk_ko']=~/\S{3,}/) \ + ? @rc['default']['texpdf_fontface_cjk_ko'] : 'IPAGothic' end self diff --git a/lib/sisu/v6/texpdf_format.rb b/lib/sisu/v6/texpdf_format.rb index ea5f383f..f7e18dc8 100644 --- a/lib/sisu/v6/texpdf_format.rb +++ b/lib/sisu/v6/texpdf_format.rb @@ -771,50 +771,50 @@ module SiSU_TeX_Pdf { mainlang: mainlang, otherlang: otherlang } end def tex_head_encode - texpdf_font=if defined? @md.make.texpdf_font.main \ - and not @md.make.texpdf_font.main.nil? \ - and @md.make.texpdf_font.main=~/\S{3,}/ - @md.make.texpdf_font.main + texpdf_fontface=if defined? @md.make.texpdf_fontface.main \ + and not @md.make.texpdf_fontface.main.nil? \ + and @md.make.texpdf_fontface.main=~/\S{3,}/ + @md.make.texpdf_fontface.main else @env.font.texpdf.main end - texpdf_font_sans=if defined? @md.make.texpdf_font.sans \ - and not @md.make.texpdf_font.sans.nil? \ - and @md.make.texpdf_font.sans=~/\S{3,}/ # not used - @md.make.texpdf_font.sans + texpdf_fontface_sans=if defined? @md.make.texpdf_fontface.sans \ + and not @md.make.texpdf_fontface.sans.nil? \ + and @md.make.texpdf_fontface.sans=~/\S{3,}/ # not used + @md.make.texpdf_fontface.sans else @env.font.texpdf.sans end - texpdf_font_serif=if defined? @md.make.texpdf_font.serif \ - and not @md.make.texpdf_font.serif.nil? \ - and @md.make.texpdf_font.serif=~/\S{3,}/ # not used - @md.make.texpdf_font.serif + texpdf_fontface_serif=if defined? @md.make.texpdf_fontface.serif \ + and not @md.make.texpdf_fontface.serif.nil? \ + and @md.make.texpdf_fontface.serif=~/\S{3,}/ # not used + @md.make.texpdf_fontface.serif else @env.font.texpdf.serif end - texpdf_font_mono=if defined? @md.make.texpdf_font.mono \ - and not @md.make.texpdf_font.mono.nil? \ - and @md.make.texpdf_font.mono=~/\S{3,}/ - @md.make.texpdf_font.mono + texpdf_fontface_mono=if defined? @md.make.texpdf_fontface.mono \ + and not @md.make.texpdf_fontface.mono.nil? \ + and @md.make.texpdf_fontface.mono=~/\S{3,}/ + @md.make.texpdf_fontface.mono else @env.font.texpdf.mono end - texpdf_font_cjk=if @md.opt.lng =~/zh/ \ - and defined? @md.make.texpdf_font.cjk_zh \ - and not @md.make.texpdf_font.cjk_zh.nil? \ - and @md.make.texpdf_font.cjk_zh=~/\S{3,}/ - @md.make.texpdf_font.cjk_zh + texpdf_fontface_cjk=if @md.opt.lng =~/zh/ \ + and defined? @md.make.texpdf_fontface.cjk_zh \ + and not @md.make.texpdf_fontface.cjk_zh.nil? \ + and @md.make.texpdf_fontface.cjk_zh=~/\S{3,}/ + @md.make.texpdf_fontface.cjk_zh elsif @md.opt.lng =~/ja/ \ - and defined? @md.make.texpdf_font.cjk_ja \ - and not @md.make.texpdf_font.cjk_ja.nil? \ - and @md.make.texpdf_font.cjk_ja=~/\S{3,}/ - @md.make.texpdf_font.cjk_ja + and defined? @md.make.texpdf_fontface.cjk_ja \ + and not @md.make.texpdf_fontface.cjk_ja.nil? \ + and @md.make.texpdf_fontface.cjk_ja=~/\S{3,}/ + @md.make.texpdf_fontface.cjk_ja elsif @md.opt.lng =~/ko/ \ - and defined? @md.make.texpdf_font.cjk_ko \ - and not @md.make.texpdf_font.cjk_ko.nil? \ - and @md.make.texpdf_font.cjk_ko=~/\S{3,}/ - @md.make.texpdf_font.cjk_ko + and defined? @md.make.texpdf_fontface.cjk_ko \ + and not @md.make.texpdf_fontface.cjk_ko.nil? \ + and @md.make.texpdf_fontface.cjk_ko=~/\S{3,}/ + @md.make.texpdf_fontface.cjk_ko elsif @md.opt.lng =~/(?:zh|ja|ko)/ \ - and defined? @md.make.texpdf_font.cjk \ - and not @md.make.texpdf_font.cjk.nil? \ - and @md.make.texpdf_font.cjk=~/\S{3,}/ - @md.make.texpdf_font.cjk + and defined? @md.make.texpdf_fontface.cjk \ + and not @md.make.texpdf_fontface.cjk.nil? \ + and @md.make.texpdf_fontface.cjk=~/\S{3,}/ + @md.make.texpdf_fontface.cjk else case @md.opt.lng when /zh/ then @env.font.texpdf.cjk_zh @@ -832,22 +832,22 @@ module SiSU_TeX_Pdf <<-WOK \\usepackage{ucs, fontspec, xltxtra, xunicode, xeCJK} \\setmainCJKlanguage{#{tex_head_lang[:mainlang]}} -\\setCJKmainfont{#{texpdf_font_cjk}} +\\setCJKmainfont{#{texpdf_fontface_cjk}} \\XeTeXlinebreaklocale "#{tex_head_lang[:mainlang]}" \\XeTeXlinebreakskip = 0pt plus 1pt \\setotherlanguage{#{tex_head_lang[:otherlang]}} -\\setmainfont{#{texpdf_font}} -\\setmonofont[Scale=0.85]{#{texpdf_font_mono}} +\\setmainfont{#{texpdf_fontface}} +\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}} WOK else <<-WOK \\usepackage{polyglossia, ucs, fontspec, xltxtra, xunicode} \\setmainlanguage{#{tex_head_lang[:mainlang]}} \\setotherlanguage{#{tex_head_lang[:otherlang]}} -\\setmainfont{#{texpdf_font}} -\\setmonofont[Scale=0.85]{#{texpdf_font_mono}} -% \\setsansfont{#{texpdf_font_sans}} -% \\setromanfont{#{texpdf_font_serif}} +\\setmainfont{#{texpdf_fontface}} +\\setmonofont[Scale=0.85]{#{texpdf_fontface_mono}} +% \\setsansfont{#{texpdf_fontface_sans}} +% \\setromanfont{#{texpdf_fontface_serif}} WOK end when /pdf/ |