pylrs bug with TextBlock(textstyle,blockstyle,blockattr=value)?
When I specify a blockstyle attribute in a TextBlock(), it doesn't appear to have any effect. (I can work around this by creating a new blockstyle with the change.)
It doesn't look like the code does anything with those "overriding" values. E.g.:
self.textSettings = {}
self.blockSettings = {}
for name, value in settings.items():
if name in TextStyle.validSettings:
self.textSettings[name] = value
elif name in BlockStyle.validSettings:
self.blockSettings[name] = value
else:
raise LrsError, "%s not a valid setting for TextBlock" % name
captures the override values in either self.textSettings or self.blockSettings as appropriate, and then
self.textStyle = textStyle
self.blockStyle = blockStyle
# create a textStyle with our current text settings (for Span to find)
self.currentTextStyle = textStyle.copy()
self.currentTextStyle.attrs.update(self.textSettin gs)
copies overriding textStyle values into the currentTextStyle, but there is nothing similar for the overriding blockStyle values.
Am I missing something here?
Thanks!
Steve
|