# puts font_families.sort @xxx_large_font_size = screen_size(9.5 * Pango::SCALE) @xx_large_font_size = screen_size(8 * Pango::SCALE) @x_large_font_size = screen_size(7 * Pango::SCALE) @large_font_size = screen_size(5.5 * Pango::SCALE) @normal_font_size = screen_size(4.5 * Pango::SCALE) @small_font_size = screen_size(4 * Pango::SCALE) @x_small_font_size = screen_size(3 * Pango::SCALE) @xx_small_font_size = screen_size(2.5 * Pango::SCALE) @font_family = find_font_family('Work Sans') @monospace_font_family = 'Courier Prime' @title_font_family = find_font_family('Work Sans') # colors foreground = "#000006" red = "#f81c49" green = "#2bba7e" blue = "#0499da" black = "#000000" dark_gray = "#333333" light_gray = "#a9a7ad" preformatted_foreground = "#00ffc2" @default_headline_line_color = red @default_headline_line_width = 2 @default_headline_line_expand = true @default_emphasis_color = red @default_emphasis_level2_color = "#ffffff" set_graffiti_color red set_graffiti_line_width 7 #@table_frame_color = "#ffffff" #@table_fill_color = "#0f0428" #@table_body_frame_color = "#ffffff" #@table_body_fill_color = "#3f3468" #@table_head_frame_color = "#ffffff" #@table_head_fill_color = "#rf0428" @preformatted_fill_color = black @preformatted_frame_color = light_gray @preformatted_frame_width = 5 # @preformatted_centering = true @space = screen_y(1) @image_slide_number_start_flag_color = green @image_slide_number_goal_flag_color = red #@slide_headline_hide = true @slide_background_image = 'images/assets/background-slide.png' include_theme("slide-background-image") @title_slide_background_image = 'images/assets/background-title.png' include_theme("title-slide-background-image") include_theme('default') match(Slide, HeadLine) do |heads| heads.margin_top = 20 heads.prop_set("weight", "normal") heads.prop_set "size", @large_font_size set_font_family(heads) end match(Slide) do |slides| slides.margin_left = 100 slides.margin_right = 100 slides.prop_set("foreground", foreground) end match TitleSlide do |slides| # slides.margin_left = 770 slides.prop_set("foreground", foreground) slides.prop_set "style", "normal" end match TitleSlide, Title do |title| title.margin_top = 0 title.prop_set "size", @xxx_large_font_size title.prop_set "font-family", @title_font_family title.prop_set "weight", "bold" title.prop_set "foreground", red end match TitleSlide, Subtitle do |subtitle| subtitle.prop_set "size", @xxx_large_font_size subtitle.prop_set "font-family", @title_font_family subtitle.prop_set "weight", "bold" end match TitleSlide, Author do |authors| authors.margin_top = 50 authors.prop_set "size", @large_font_size end match TitleSlide, ContentSource do |cs| cs.margin_top = 10 cs.prop_set "size", @small_font_size cs.prop_set "weight", "bold" cs.prop_set "foreground", red end match TitleSlide, Place do |cs| cs.margin_top = 150 cs.prop_set "size", @x_small_font_size end match TitleSlide, Date do |date| date.prop_set "size", @x_small_font_size end match TitleSlide, Institution do |i| i.prop_set "size", @x_small_font_size end #@slide_logo_image = 'images/mark_g.png' #include_theme('slide-logo') @item_image_1 = 'images/assets/bullet-point-36.png' @item_image_2 = 'images/assets/bullet-point-36.png' @item_image_3 = 'images/assets/bullet-point-24.png' include_theme("default-item-mark") add_image_path("rabbit-images") slide_body = [Slide, Body] item_list_item = [ItemList, ItemListItem] indent = 40 match(*(slide_body + (item_list_item * 1))) do |items| name = "item1" items.delete_pre_draw_proc_by_name(name) items.delete_post_draw_proc_by_name(name) draw_image_mark(items, @item_image_1, name, indent: indent) end match(*(slide_body + (item_list_item * 2))) do |items| name = "item2" items.delete_pre_draw_proc_by_name(name) items.delete_post_draw_proc_by_name(name) draw_image_mark(items, @item_image_2, name, indent: indent) end match(*(slide_body + (item_list_item * 3))) do |items| name = "item3" items.delete_pre_draw_proc_by_name(name) items.delete_post_draw_proc_by_name(name) draw_image_mark(items, @item_image_3, name, indent: indent) end enum_list_item = [EnumList, EnumListItem] match(*(slide_body + enum_list_item + item_list_item)) do |items| name = "enum-item1" items.delete_pre_draw_proc_by_name(name) items.delete_post_draw_proc_by_name(name) draw_image_mark(items, @item_image_1, name, indent: indent) end match(*(slide_body + enum_list_item + (item_list_item * 2))) do |items| name = "enum-item2" items.delete_pre_draw_proc_by_name(name) items.delete_post_draw_proc_by_name(name) draw_image_mark(items, @item_image_2, name, indent: indent) end # table all_table = ["**", Table] match(*(all_table + [TableBody, TableRow, TableCell])) do |cells| set_font_family(cells, @monospace_font_family) end match(*(all_table + [TableHead, TableRow, TableHeader])) do |headers| set_font_family(headers, @monospace_font_family) end match("**", Emphasis, Emphasis) do |texts| texts.prop_set("foreground", @default_emphasis_level2_color) texts.prop_set("weight", "normal") end # Chapter match Slide do |slides| slides.each do |slide| if slide.match?(/sub_chapter/) slide.horizontal_centering = true elsif slide.match?(/chapter/) set_font_family slide, @title_font_family slide.horizontal_centering = true elsif slide.match?(/cite/) slide.prop_set "foreground", foreground slide.horizontal_centering = true end end end match("**", PreformattedBlock) do |block| block.prop_set("foreground", preformatted_foreground) # block.prop_set("fill", dark_gray) end