aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-05-12 21:56:28 -0400
committerRalph Amissah <ralph@amissah.com>2014-05-12 21:56:28 -0400
commitdf9e4219258cd799a11be6f2d18f2af5b88d8352 (patch)
treeaf59c4b61a075705b530837492eaea37f4a2676d /lib/sisu/v6/sysenv.rb
parentv6: texpdf, headings and table of contents representation (diff)
v6: texpdf, pdf default font size configurable (cli & sisurc.yml) (no fractions)
* --pdf-fontsize-12 --pdf-fontsize-8 * default: texpdf_fontsize: 12 * (Closes: #744405)
Diffstat (limited to 'lib/sisu/v6/sysenv.rb')
-rw-r--r--lib/sisu/v6/sysenv.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb
index fd36691e..6136d248 100644
--- a/lib/sisu/v6/sysenv.rb
+++ b/lib/sisu/v6/sysenv.rb
@@ -1875,6 +1875,15 @@ WOK
"#{source_file_path}/#{file}"
end
def font
+ def size(pt=nil)
+ if pt && pt != :na
+ pt
+ elsif defined? @rc['default']['fontsize'] \
+ && @rc['default']['fontsize']=~/\d{1,2}/
+ @rc['default']['fontsize']
+ else :na
+ end
+ end
def texpdf
# you may wish to check selected font against available fonts:
# fc-list :outline -f "%{family}\n"
@@ -1927,6 +1936,19 @@ WOK
? @rc['default']['texpdf_fontface_cjk_ko']
: 'IPAGothic'
end
+ def size(pt=nil)
+ if pt && pt != :na
+ pt
+ elsif (defined? @rc['default']['texpdf_fontsize']) \
+ && (@rc['default']['texpdf_fontsize']=~/\d{1,2}/)
+ @rc['default']['texpdf_fontsize']
+ elsif (defined? @rc['default']['fontsize']) \
+ && (@rc['default']['fontsize']=~/\d{1,2}/)
+ @rc['default']['fontsize']
+ else
+ :na
+ end
+ end
self
end
self