summaryrefslogtreecommitdiff
path: root/modules/htmlformat.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/htmlformat.py')
-rw-r--r--modules/htmlformat.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/htmlformat.py b/modules/htmlformat.py
index ca2b2228a..e7b5051da 100644
--- a/modules/htmlformat.py
+++ b/modules/htmlformat.py
@@ -185,6 +185,7 @@ class Link:
class FontSize:
+ """FontSize is being deprecated - use FontAttr(..., size="...") instead."""
def __init__(self, size, *items):
self.items = list(items)
self.size = size
@@ -196,6 +197,23 @@ class FontSize:
output = output + '</font>'
return output
+class FontAttr:
+ """Present arbitrary font attributes."""
+ def __init__(self, *items, **kw):
+ self.items = list(items)
+ self.attrs = kw
+
+ def Format(self, indent=0):
+ seq = []
+ for k, v in self.attrs.items():
+ seq.append('%s="%s"' % (k, v))
+ output = '<font %s>' % string.join(seq, ' ')
+ for item in self.items:
+ output = output + HTMLFormatObject(item, indent)
+ output = output + '</font>'
+ return output
+
+
class Container:
def __init__(self, *items):