openlp/openlp/core/lib/theme.py

609 lines
22 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2012-12-28 22:06:43 +00:00
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
2012-12-29 20:56:56 +00:00
# Copyright (c) 2008-2013 Raoul Snyman #
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
2012-11-11 21:16:14 +00:00
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
2012-10-21 13:16:22 +00:00
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
2010-06-19 17:31:42 +00:00
"""
Provide the theme XML and handling functions for OpenLP v2 themes.
"""
import os
2010-09-11 06:59:36 +00:00
import re
2010-10-09 10:59:49 +00:00
import logging
2013-10-13 13:51:13 +00:00
import json
from xml.dom.minidom import Document
from lxml import etree, objectify
2013-10-13 13:51:13 +00:00
from openlp.core.common import AppLocation
2013-10-13 13:51:13 +00:00
from openlp.core.lib import str_to_bool, ScreenList, get_text_file_string
2010-10-09 10:59:49 +00:00
log = logging.getLogger(__name__)
2013-02-01 19:58:18 +00:00
2010-10-16 13:54:57 +00:00
class BackgroundType(object):
2011-02-02 15:52:17 +00:00
"""
Type enumeration for backgrounds.
"""
2010-10-16 13:54:57 +00:00
Solid = 0
Gradient = 1
Image = 2
2012-01-04 17:19:49 +00:00
Transparent = 3
2010-10-16 13:54:57 +00:00
@staticmethod
2011-02-02 15:52:17 +00:00
def to_string(background_type):
"""
Return a string representation of a background type.
"""
if background_type == BackgroundType.Solid:
2013-08-31 18:17:38 +00:00
return 'solid'
2011-02-02 15:52:17 +00:00
elif background_type == BackgroundType.Gradient:
2013-08-31 18:17:38 +00:00
return 'gradient'
2011-02-02 15:52:17 +00:00
elif background_type == BackgroundType.Image:
2013-08-31 18:17:38 +00:00
return 'image'
2012-01-04 17:19:49 +00:00
elif background_type == BackgroundType.Transparent:
2013-08-31 18:17:38 +00:00
return 'transparent'
2010-10-16 13:54:57 +00:00
@staticmethod
def from_string(type_string):
2011-02-02 15:52:17 +00:00
"""
Return a background type for the given string.
"""
2013-08-31 18:17:38 +00:00
if type_string == 'solid':
2010-10-16 13:54:57 +00:00
return BackgroundType.Solid
2013-08-31 18:17:38 +00:00
elif type_string == 'gradient':
2010-10-16 13:54:57 +00:00
return BackgroundType.Gradient
2013-08-31 18:17:38 +00:00
elif type_string == 'image':
2010-10-16 13:54:57 +00:00
return BackgroundType.Image
2013-08-31 18:17:38 +00:00
elif type_string == 'transparent':
2012-01-04 17:19:49 +00:00
return BackgroundType.Transparent
2010-10-16 13:54:57 +00:00
2011-02-25 17:27:06 +00:00
2010-10-16 13:54:57 +00:00
class BackgroundGradientType(object):
2011-02-02 15:52:17 +00:00
"""
Type enumeration for background gradients.
"""
2010-10-16 13:54:57 +00:00
Horizontal = 0
Vertical = 1
Circular = 2
LeftTop = 3
LeftBottom = 4
@staticmethod
2011-02-02 15:52:17 +00:00
def to_string(gradient_type):
"""
Return a string representation of a background gradient type.
"""
if gradient_type == BackgroundGradientType.Horizontal:
2013-08-31 18:17:38 +00:00
return 'horizontal'
2011-02-02 15:52:17 +00:00
elif gradient_type == BackgroundGradientType.Vertical:
2013-08-31 18:17:38 +00:00
return 'vertical'
2011-02-02 15:52:17 +00:00
elif gradient_type == BackgroundGradientType.Circular:
2013-08-31 18:17:38 +00:00
return 'circular'
2011-02-02 15:52:17 +00:00
elif gradient_type == BackgroundGradientType.LeftTop:
2013-08-31 18:17:38 +00:00
return 'leftTop'
2011-02-02 15:52:17 +00:00
elif gradient_type == BackgroundGradientType.LeftBottom:
2013-08-31 18:17:38 +00:00
return 'leftBottom'
2010-10-16 13:54:57 +00:00
@staticmethod
def from_string(type_string):
2011-02-02 15:52:17 +00:00
"""
Return a background gradient type for the given string.
"""
2013-08-31 18:17:38 +00:00
if type_string == 'horizontal':
2010-10-16 13:54:57 +00:00
return BackgroundGradientType.Horizontal
2013-08-31 18:17:38 +00:00
elif type_string == 'vertical':
2010-10-16 13:54:57 +00:00
return BackgroundGradientType.Vertical
2013-08-31 18:17:38 +00:00
elif type_string == 'circular':
2010-10-16 13:54:57 +00:00
return BackgroundGradientType.Circular
2013-08-31 18:17:38 +00:00
elif type_string == 'leftTop':
2010-10-16 13:54:57 +00:00
return BackgroundGradientType.LeftTop
2013-08-31 18:17:38 +00:00
elif type_string == 'leftBottom':
2010-10-16 13:54:57 +00:00
return BackgroundGradientType.LeftBottom
2010-10-17 18:58:42 +00:00
class HorizontalType(object):
2011-02-02 15:52:17 +00:00
"""
Type enumeration for horizontal alignment.
"""
2010-10-17 18:58:42 +00:00
Left = 0
Right = 1
2011-02-18 03:15:09 +00:00
Center = 2
Justify = 3
2010-10-17 18:58:42 +00:00
2013-08-31 18:17:38 +00:00
Names = ['left', 'right', 'center', 'justify']
2010-10-17 18:58:42 +00:00
class VerticalType(object):
2011-02-02 15:52:17 +00:00
"""
Type enumeration for vertical alignment.
"""
2010-10-17 18:58:42 +00:00
Top = 0
Middle = 1
Bottom = 2
2013-08-31 18:17:38 +00:00
Names = ['top', 'middle', 'bottom']
2013-08-31 18:17:38 +00:00
BOOLEAN_LIST = ['bold', 'italics', 'override', 'outline', 'shadow', 'slide_transition']
2010-09-11 06:59:36 +00:00
2013-08-31 18:17:38 +00:00
INTEGER_LIST = ['size', 'line_adjustment', 'x', 'height', 'y', 'width', 'shadow_size', 'outline_size',
'horizontal_align', 'vertical_align', 'wrap_style']
2010-09-11 06:59:36 +00:00
2011-02-25 17:27:06 +00:00
class ThemeXML(object):
"""
A class to encapsulate the Theme XML.
"""
2013-08-31 18:17:38 +00:00
FIRST_CAMEL_REGEX = re.compile('(.)([A-Z][a-z]+)')
SECOND_CAMEL_REGEX = re.compile('([a-z0-9])([A-Z])')
2013-02-01 19:58:18 +00:00
def __init__(self):
"""
Initialise the theme object.
"""
2013-10-13 15:52:04 +00:00
# basic theme object with defaults
2013-10-13 13:51:13 +00:00
json_dir = os.path.join(AppLocation.get_directory(AppLocation.AppDir), 'core', 'lib', 'json')
json_file = os.path.join(json_dir, 'theme.json')
jsn = get_text_file_string(json_file)
jsn = json.loads(jsn)
for key, value in jsn.items():
setattr(self, key, value)
def extend_image_filename(self, path):
"""
Add the path name to the image name so the background can be rendered.
``path``
The path name to be added.
"""
2013-08-31 18:17:38 +00:00
if self.background_type == 'image':
2010-10-11 16:43:14 +00:00
if self.background_filename and path:
self.theme_name = self.theme_name.strip()
self.background_filename = self.background_filename.strip()
self.background_filename = os.path.join(path, self.theme_name, self.background_filename)
2010-11-05 19:20:41 +00:00
def _new_document(self, name):
"""
Create a new theme XML document.
"""
2010-11-05 19:20:41 +00:00
self.theme_xml = Document()
2013-08-31 18:17:38 +00:00
self.theme = self.theme_xml.createElement('theme')
self.theme_xml.appendChild(self.theme)
2013-08-31 18:17:38 +00:00
self.theme.setAttribute('version', '2.0')
self.name = self.theme_xml.createElement('name')
text_node = self.theme_xml.createTextNode(name)
self.name.appendChild(text_node)
self.theme.appendChild(self.name)
def add_background_transparent(self):
"""
Add a transparent background.
"""
2013-08-31 18:17:38 +00:00
background = self.theme_xml.createElement('background')
background.setAttribute('type', 'transparent')
self.theme.appendChild(background)
def add_background_solid(self, bkcolor):
"""
Add a Solid background.
``bkcolor``
The color of the background.
"""
2013-08-31 18:17:38 +00:00
background = self.theme_xml.createElement('background')
background.setAttribute('type', 'solid')
self.theme.appendChild(background)
2013-08-31 18:17:38 +00:00
self.child_element(background, 'color', str(bkcolor))
def add_background_gradient(self, startcolor, endcolor, direction):
"""
Add a gradient background.
``startcolor``
The gradient's starting colour.
``endcolor``
The gradient's ending colour.
``direction``
The direction of the gradient.
"""
2013-08-31 18:17:38 +00:00
background = self.theme_xml.createElement('background')
background.setAttribute('type', 'gradient')
self.theme.appendChild(background)
# Create startColor element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'startColor', str(startcolor))
# Create endColor element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'endColor', str(endcolor))
# Create direction element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'direction', str(direction))
2011-08-20 11:45:06 +00:00
def add_background_image(self, filename, borderColor):
"""
Add a image background.
``filename``
The file name of the image.
"""
2013-08-31 18:17:38 +00:00
background = self.theme_xml.createElement('background')
background.setAttribute('type', 'image')
self.theme.appendChild(background)
# Create Filename element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'filename', filename)
2011-08-20 11:45:06 +00:00
# Create endColor element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'borderColor', str(borderColor))
2013-08-31 18:17:38 +00:00
def add_font(self, name, color, size, override, fonttype='main', bold='False', italics='False',
line_adjustment=0, xpos=0, ypos=0, width=0, height=0, outline='False', outline_color='#ffffff',
outline_pixel=2, shadow='False', shadow_color='#ffffff', shadow_pixel=5):
"""
Add a Font.
``name``
The name of the font.
``color``
The colour of the font.
2010-11-06 07:58:46 +00:00
``size``
The size of the font.
``override``
Whether or not to override the default positioning of the theme.
``fonttype``
The type of font, ``main`` or ``footer``. Defaults to ``main``.
``weight``
The weight of then font Defaults to 50 Normal
``italics``
Does the font render to italics Defaults to 0 Normal
``xpos``
The X position of the text block.
``ypos``
The Y position of the text block.
``width``
The width of the text block.
``height``
The height of the text block.
``outline``
Whether or not to show an outline.
``outline_color``
The colour of the outline.
``outline_size``
How big the Shadow is
``shadow``
Whether or not to show a shadow.
``shadow_color``
The colour of the shadow.
``shadow_size``
How big the Shadow is
"""
2013-08-31 18:17:38 +00:00
background = self.theme_xml.createElement('font')
background.setAttribute('type', fonttype)
self.theme.appendChild(background)
# Create Font name element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'name', name)
# Create Font color element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'color', str(color))
# Create Proportion name element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'size', str(size))
# Create weight name element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'bold', str(bold))
# Create italics name element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'italics', str(italics))
# Create indentation name element
2013-08-31 18:17:38 +00:00
self.child_element(background, 'line_adjustment', str(line_adjustment))
# Create Location element
2013-08-31 18:17:38 +00:00
element = self.theme_xml.createElement('location')
element.setAttribute('override', str(override))
element.setAttribute('x', str(xpos))
element.setAttribute('y', str(ypos))
element.setAttribute('width', str(width))
element.setAttribute('height', str(height))
background.appendChild(element)
# Shadow
2013-08-31 18:17:38 +00:00
element = self.theme_xml.createElement('shadow')
element.setAttribute('shadowColor', str(shadow_color))
element.setAttribute('shadowSize', str(shadow_pixel))
value = self.theme_xml.createTextNode(str(shadow))
element.appendChild(value)
background.appendChild(element)
# Outline
2013-08-31 18:17:38 +00:00
element = self.theme_xml.createElement('outline')
element.setAttribute('outlineColor', str(outline_color))
element.setAttribute('outlineSize', str(outline_pixel))
value = self.theme_xml.createTextNode(str(outline))
element.appendChild(value)
background.appendChild(element)
def add_display(self, horizontal, vertical, transition):
"""
Add a Display options.
``horizontal``
The horizontal alignment of the text.
``vertical``
The vertical alignment of the text.
``transition``
Whether the slide transition is active.
"""
2013-08-31 18:17:38 +00:00
background = self.theme_xml.createElement('display')
self.theme.appendChild(background)
# Horizontal alignment
2013-08-31 18:17:38 +00:00
element = self.theme_xml.createElement('horizontalAlign')
value = self.theme_xml.createTextNode(str(horizontal))
element.appendChild(value)
background.appendChild(element)
# Vertical alignment
2013-08-31 18:17:38 +00:00
element = self.theme_xml.createElement('verticalAlign')
value = self.theme_xml.createTextNode(str(vertical))
element.appendChild(value)
background.appendChild(element)
# Slide Transition
2013-08-31 18:17:38 +00:00
element = self.theme_xml.createElement('slideTransition')
value = self.theme_xml.createTextNode(str(transition))
element.appendChild(value)
background.appendChild(element)
def child_element(self, element, tag, value):
"""
Generic child element creator.
"""
child = self.theme_xml.createElement(tag)
child.appendChild(self.theme_xml.createTextNode(value))
element.appendChild(child)
return child
def set_default_header_footer(self):
2012-05-16 13:14:32 +00:00
"""
2012-05-28 02:43:00 +00:00
Set the header and footer size into the current primary screen.
10 px on each side is removed to allow for a border.
2012-05-16 13:14:32 +00:00
"""
2012-05-27 10:02:03 +00:00
current_screen = ScreenList().current
self.font_main_y = 0
2013-08-31 18:17:38 +00:00
self.font_main_width = current_screen['size'].width() - 20
self.font_main_height = current_screen['size'].height() * 9 / 10
self.font_footer_width = current_screen['size'].width() - 20
self.font_footer_y = current_screen['size'].height() * 9 / 10
self.font_footer_height = current_screen['size'].height() / 10
2012-05-16 13:14:32 +00:00
def dump_xml(self):
"""
2010-09-11 11:11:19 +00:00
Dump the XML to file used for debugging
"""
2013-08-31 18:17:38 +00:00
return self.theme_xml.toprettyxml(indent=' ')
def extract_xml(self):
"""
2010-09-11 11:11:19 +00:00
Print out the XML string.
"""
2010-11-05 19:20:41 +00:00
self._build_xml_from_attrs()
2013-08-31 18:17:38 +00:00
return self.theme_xml.toxml('utf-8').decode('utf-8')
def extract_formatted_xml(self):
"""
Pull out the XML string formatted for human consumption
"""
2010-11-05 19:20:41 +00:00
self._build_xml_from_attrs()
2013-03-26 18:13:21 +00:00
return self.theme_xml.toprettyxml(indent=' ', newl='\n', encoding='utf-8')
def parse(self, xml):
"""
Read in an XML string and parse it.
``xml``
The XML string to parse.
"""
2013-08-31 18:17:38 +00:00
self.parse_xml(str(xml))
def parse_xml(self, xml):
"""
Parse an XML string.
``xml``
The XML string to parse.
"""
# remove encoding string
2013-08-31 18:17:38 +00:00
line = xml.find('?>')
2010-10-09 10:59:49 +00:00
if line:
xml = xml[line + 2:]
try:
2010-11-24 01:51:08 +00:00
theme_xml = objectify.fromstring(xml)
except etree.XMLSyntaxError:
2013-08-31 18:17:38 +00:00
log.exception('Invalid xml %s', xml)
2010-10-09 10:59:49 +00:00
return
2010-05-29 19:50:50 +00:00
xml_iter = theme_xml.getiterator()
for element in xml_iter:
2013-08-31 18:17:38 +00:00
master = ''
if element.tag == 'background':
2012-01-04 17:19:49 +00:00
if element.attrib:
for attr in element.attrib:
2012-12-28 22:06:43 +00:00
self._create_attr(element.tag, attr, element.attrib[attr])
2012-01-04 17:19:49 +00:00
parent = element.getparent()
if parent is not None:
2013-08-31 18:17:38 +00:00
if parent.tag == 'font':
master = parent.tag + '_' + parent.attrib['type']
2010-10-11 16:14:36 +00:00
# set up Outline and Shadow Tags and move to font_main
2013-08-31 18:17:38 +00:00
if parent.tag == 'display':
if element.tag.startswith('shadow') or element.tag.startswith('outline'):
self._create_attr('font_main', element.tag, element.text)
2012-01-04 17:19:49 +00:00
master = parent.tag
2013-08-31 18:17:38 +00:00
if parent.tag == 'background':
2012-01-04 17:19:49 +00:00
master = parent.tag
if master:
2010-10-16 07:21:24 +00:00
self._create_attr(master, element.tag, element.text)
if element.attrib:
for attr in element.attrib:
2010-10-07 05:15:02 +00:00
base_element = attr
# correction for the shadow and outline tags
2013-08-31 18:17:38 +00:00
if element.tag == 'shadow' or element.tag == 'outline':
2010-10-07 05:15:02 +00:00
if not attr.startswith(element.tag):
2013-08-31 18:17:38 +00:00
base_element = element.tag + '_' + attr
2012-12-28 22:06:43 +00:00
self._create_attr(master, base_element, element.attrib[attr])
else:
2013-08-31 18:17:38 +00:00
if element.tag == 'name':
self._create_attr('theme', element.tag, element.text)
2010-09-11 06:59:36 +00:00
2010-10-11 16:14:36 +00:00
def _translate_tags(self, master, element, value):
"""
Clean up XML removing and redefining tags
"""
master = master.strip().lstrip()
element = element.strip().lstrip()
2013-08-31 18:17:38 +00:00
value = str(value).strip().lstrip()
if master == 'display':
if element == 'wrapStyle':
2010-10-11 16:14:36 +00:00
return True, None, None, None
2013-08-31 18:17:38 +00:00
if element.startswith('shadow') or element.startswith('outline'):
master = 'font_main'
2010-10-11 16:14:36 +00:00
# fix bold font
2013-08-31 18:17:38 +00:00
if element == 'weight':
element = 'bold'
if value == 'Normal':
2010-10-11 16:14:36 +00:00
value = False
else:
value = True
2013-08-31 18:17:38 +00:00
if element == 'proportion':
element = 'size'
2010-10-11 16:14:36 +00:00
return False, master, element, value
2012-04-03 17:58:42 +00:00
def _create_attr(self, master, element, value):
2010-09-11 11:11:19 +00:00
"""
Create the attributes with the correct data types and name format
"""
2012-12-28 22:06:43 +00:00
reject, master, element, value = self._translate_tags(master, element, value)
2010-10-11 16:14:36 +00:00
if reject:
return
2010-09-11 06:59:36 +00:00
field = self._de_hump(element)
2013-08-31 18:17:38 +00:00
tag = master + '_' + field
2011-02-02 15:52:17 +00:00
if field in BOOLEAN_LIST:
setattr(self, tag, str_to_bool(value))
2011-02-02 15:52:17 +00:00
elif field in INTEGER_LIST:
setattr(self, tag, int(value))
2010-09-11 06:59:36 +00:00
else:
# make string value unicode
2013-08-31 18:17:38 +00:00
if not isinstance(value, str):
value = str(str(value), 'utf-8')
2010-10-29 06:44:38 +00:00
# None means an empty string so lets have one.
2013-08-31 18:17:38 +00:00
if value == 'None':
value = ''
setattr(self, tag, str(value).strip().lstrip())
2011-01-08 13:57:03 +00:00
def __str__(self):
"""
Return a string representation of this object.
"""
theme_strings = []
for key in dir(self):
2013-08-31 18:17:38 +00:00
if key[0:1] != '_':
theme_strings.append('%30s: %s' % (key, getattr(self, key)))
return '\n'.join(theme_strings)
2010-09-11 06:59:36 +00:00
def _de_hump(self, name):
2010-09-11 11:11:19 +00:00
"""
Change Camel Case string to python string
"""
2011-05-18 14:26:19 +00:00
sub_name = ThemeXML.FIRST_CAMEL_REGEX.sub(r'\1_\2', name)
return ThemeXML.SECOND_CAMEL_REGEX.sub(r'\1_\2', sub_name).lower()
2010-09-11 06:59:36 +00:00
2010-11-05 19:20:41 +00:00
def _build_xml_from_attrs(self):
2010-10-03 07:42:02 +00:00
"""
Build the XML from the varables in the object
"""
2010-11-05 19:20:41 +00:00
self._new_document(self.theme_name)
2012-12-28 22:06:43 +00:00
if self.background_type == BackgroundType.to_string(BackgroundType.Solid):
2010-10-17 19:34:10 +00:00
self.add_background_solid(self.background_color)
2012-12-28 22:06:43 +00:00
elif self.background_type == BackgroundType.to_string(BackgroundType.Gradient):
2010-10-03 07:42:02 +00:00
self.add_background_gradient(
2010-10-17 19:34:10 +00:00
self.background_start_color,
self.background_end_color,
2013-02-01 19:58:18 +00:00
self.background_direction
)
2012-12-28 22:06:43 +00:00
elif self.background_type == BackgroundType.to_string(BackgroundType.Image):
2011-02-08 02:45:37 +00:00
filename = os.path.split(self.background_filename)[1]
2011-08-20 11:45:06 +00:00
self.add_background_image(filename, self.background_border_color)
2012-12-28 22:06:43 +00:00
elif self.background_type == BackgroundType.to_string(BackgroundType.Transparent):
2012-01-04 17:19:49 +00:00
self.add_background_transparent()
2013-02-01 19:58:18 +00:00
self.add_font(
self.font_main_name,
2010-10-17 19:34:10 +00:00
self.font_main_color,
2010-11-05 19:20:41 +00:00
self.font_main_size,
2013-08-31 18:17:38 +00:00
self.font_main_override, 'main',
2010-11-05 19:20:41 +00:00
self.font_main_bold,
2010-10-17 19:34:10 +00:00
self.font_main_italics,
self.font_main_line_adjustment,
self.font_main_x,
self.font_main_y,
self.font_main_width,
self.font_main_height,
self.font_main_outline,
self.font_main_outline_color,
self.font_main_outline_size,
self.font_main_shadow,
self.font_main_shadow_color,
2013-02-01 19:58:18 +00:00
self.font_main_shadow_size
)
self.add_font(
self.font_footer_name,
2010-10-17 19:34:10 +00:00
self.font_footer_color,
2010-11-05 19:20:41 +00:00
self.font_footer_size,
2013-08-31 18:17:38 +00:00
self.font_footer_override, 'footer',
2010-11-05 19:20:41 +00:00
self.font_footer_bold,
2010-10-17 19:34:10 +00:00
self.font_footer_italics,
2013-02-01 19:58:18 +00:00
0, # line adjustment
2010-10-17 19:34:10 +00:00
self.font_footer_x,
self.font_footer_y,
self.font_footer_width,
self.font_footer_height,
self.font_footer_outline,
self.font_footer_outline_color,
self.font_footer_outline_size,
self.font_footer_shadow,
self.font_footer_shadow_color,
2013-02-01 19:58:18 +00:00
self.font_footer_shadow_size
)
self.add_display(
self.display_horizontal_align,
self.display_vertical_align,
2013-02-01 19:58:18 +00:00
self.display_slide_transition
)