Skip to content

Commit

Permalink
registerFontFamily never worked until now, since the directive wa…
Browse files Browse the repository at this point in the history
…s not

properly registered.
  • Loading branch information
strichter committed Dec 4, 2013
1 parent d683215 commit cb3345f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGES.rst
Expand Up @@ -5,7 +5,10 @@ CHANGES
2.3.1 (unreleased)
------------------

- Nothing changed yet.
- Report correct element during error reporting.

- ``registerFontFamily`` never worked until now, since the directive was not
properly registered.


2.3.0 (2013-09-03)
Expand Down
6 changes: 4 additions & 2 deletions src/z3c/rml/document.py
Expand Up @@ -194,10 +194,11 @@ class IRegisterFontFamily(interfaces.IRMLDirectiveSignature):

class RegisterFontFamily(directive.RMLDirective):
signature = IRegisterFontFamily
attrMapping = {'name': 'family'}

def process(self):
args = self.getAttributeValues(valuesOnly=True)
pdfmetrics.registerFontFamily(*args)
args = dict(self.getAttributeValues(attrMapping=self.attrMapping))
pdfmetrics.registerFontFamily(**args)


class IColorDefinition(interfaces.IRMLDirectiveSignature):
Expand Down Expand Up @@ -537,6 +538,7 @@ class DocInit(directive.RMLDirective):
'registerFont': RegisterFont,
'registerTTFont': RegisterTTFont,
'registerCidFont': RegisterCidFont,
'registerFontFamily': RegisterFontFamily,
'addMapping': AddMapping,
'logConfig': LogConfig,
'cropMarks': CropMarks,
Expand Down

0 comments on commit cb3345f

Please sign in to comment.