diff options
Diffstat (limited to 'Master/texmf-dist/source/fonts/gentium-tug/gentium.rb')
-rw-r--r-- | Master/texmf-dist/source/fonts/gentium-tug/gentium.rb | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/fonts/gentium-tug/gentium.rb b/Master/texmf-dist/source/fonts/gentium-tug/gentium.rb index 3e000645cf2..6e204049583 100644 --- a/Master/texmf-dist/source/fonts/gentium-tug/gentium.rb +++ b/Master/texmf-dist/source/fonts/gentium-tug/gentium.rb @@ -281,7 +281,7 @@ class Encoding return "\\DeclareFontShape{#{name_latex_uppercase}}{gentium}{#{width1}}{#{shape1}}{<->ssub * gentium/#{width2}/#{shape2}}{}" end def generate_fd - date = "2022/05/09" + date = Time.new.strftime("%Y/%m/%d") # set creation date to current date filename = "#{name_latex}gentium.fd" File.open(File.join($path_fd,filename), 'w') do |file| @@ -301,12 +301,22 @@ class Encoding if has_bold? then file.puts declare_font_shape("b", "n", "plus-bold") file.puts declare_font_shape("b", "it", "plus-bolditalic") + # gentium book as additional weights (semi bold, extra bold) + file.puts declare_font_shape("sb", "n", "book-regular") + file.puts declare_font_shape("sb", "it", "book-italic") + file.puts declare_font_shape("eb", "n", "book-bold") + file.puts declare_font_shape("eb", "it", "book-bolditalic") # TODO: set the correct tfm names in the following two lines if has_smallcaps? then file.puts declare_font_shape("m", "sc", "plus-regular-sc") file.puts declare_font_shape("m", "scit", "plus-italic-sc") file.puts declare_font_shape("b", "sc", "plus-bold-sc") file.puts declare_font_shape("b", "scit", "plus-bolditalic-sc") + # gentium book as additional weights (semi bold, extra bold) + file.puts declare_font_shape("sb", "sc", "book-regular-sc") + file.puts declare_font_shape("sb", "scit", "book-italic-sc") + file.puts declare_font_shape("eb", "sc", "book-bold-sc") + file.puts declare_font_shape("eb", "scit", "book-bolditalic-sc") end # TODO: a clever algorithm to do replacements instead # TODO: (Pavel) Look at substitutions (bold, small caps) @@ -315,6 +325,15 @@ class Encoding file.puts declare_font_shape_sub("bx", "sl", "b", "it") file.puts declare_font_shape_sub("bx", "it", "b", "it") file.puts declare_font_shape_sub("bx", "n", "b", "n") + # substitutions for additional weights + file.puts declare_font_shape_sub("sb", "sl", "sb", "it") + file.puts declare_font_shape_sub("sbx", "sl", "sb", "it") + file.puts declare_font_shape_sub("sbx", "it", "sb", "it") + file.puts declare_font_shape_sub("sbx", "n", "sb", "n") + file.puts declare_font_shape_sub("eb", "sl", "eb", "it") + file.puts declare_font_shape_sub("ebx", "sl", "eb", "it") + file.puts declare_font_shape_sub("ebx", "it", "eb", "it") + file.puts declare_font_shape_sub("ebx", "n", "eb", "n") else file.puts declare_font_shape_sub("m", "sl", "m", "it") end @@ -334,7 +353,7 @@ class Encoding return "\\DeclareFontShape{#{name_latex_uppercase}}{gentiumbook}{#{width1}}{#{shape1}}{<->ssub * gentiumbook/#{width2}/#{shape2}}{}" end def generate_fd_book - date = "2022/05/09" + date = Time.new.strftime("%Y/%m/%d") # set creation date to current date filename = "#{name_latex}gentiumbook.fd" File.open(File.join($path_fd,filename), 'w') do |file| @@ -354,12 +373,22 @@ class Encoding if has_bold? then file.puts declare_font_shape_book("b", "n", "book-bold") file.puts declare_font_shape_book("b", "it", "book-bolditalic") + # gentium plus as additional weights (semi light, semi bold) + file.puts declare_font_shape_book("sl", "n", "plus-regular") + file.puts declare_font_shape_book("sl", "it", "plus-italic") + file.puts declare_font_shape_book("sb", "n", "plus-bold") + file.puts declare_font_shape_book("sb", "it", "plus-bolditalic") # TODO: set the correct tfm names in the following two lines if has_smallcaps? then file.puts declare_font_shape_book("m", "sc", "book-regular-sc") file.puts declare_font_shape_book("m", "scit", "book-italic-sc") file.puts declare_font_shape_book("b", "sc", "book-bold-sc") file.puts declare_font_shape_book("b", "scit", "book-bolditalic-sc") + # gentium plus as additional weights (semi light, semi bold) + file.puts declare_font_shape_book("sl", "sc", "plus-regular-sc") + file.puts declare_font_shape_book("sl", "scit", "plus-italic-sc") + file.puts declare_font_shape_book("sb", "sc", "plus-bold-sc") + file.puts declare_font_shape_book("sb", "scit", "plus-bolditalic-sc") end # TODO: a clever algorithm to do replacements instead # TODO: (Pavel) Look at substitutions (bold, small caps) @@ -368,6 +397,12 @@ class Encoding file.puts declare_font_shape_sub_book("bx", "sl", "b", "it") file.puts declare_font_shape_sub_book("bx", "it", "b", "it") file.puts declare_font_shape_sub_book("bx", "n", "b", "n") + # substitutions for additional weights + file.puts declare_font_shape_sub_book("sl", "sl", "sl", "it") + file.puts declare_font_shape_sub_book("sb", "sl", "sb", "it") + file.puts declare_font_shape_sub_book("sbx", "sl", "sb", "it") + file.puts declare_font_shape_sub_book("sbx", "it", "sb", "it") + file.puts declare_font_shape_sub_book("sbx", "n", "sb", "n") else file.puts declare_font_shape_sub_book("m", "sl", "m", "it") end |