mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-01 01:15:39 +01:00
Modify pylrs to write strings using the text tag rather than raw text.
This commit is contained in:
parent
51458628ab
commit
2ee9ec1f4e
2 changed files with 5 additions and 2 deletions
|
|
@ -316,7 +316,7 @@ def writeRuledLine(f, lineInfo):
|
|||
Box = (0xF5C6, LINE_TYPE_ENCODING, writeWord),
|
||||
BoxEnd = (0xF5C7,),
|
||||
Space = (0xF5CA, writeSignedWord),
|
||||
textstring = (0xF5CC, writeUnicode), # when is this used?
|
||||
textstring = (0xF5CC, writeUnicode),
|
||||
Plot = (0xF5D1, "<HHII"),
|
||||
CR = (0xF5D2,),
|
||||
RegisterFont = (0xF5D8, writeDWord),
|
||||
|
|
|
|||
|
|
@ -1654,7 +1654,10 @@ def __init__(self, text):
|
|||
|
||||
def toLrfContainer(self, lrfWriter, parent):
|
||||
if self.text:
|
||||
parent.appendLrfTag(LrfTag("rawtext", self.text))
|
||||
if isinstance(self.text, str):
|
||||
parent.appendLrfTag(LrfTag("rawtext", self.text))
|
||||
else:
|
||||
parent.appendLrfTag(LrfTag("textstring", self.text))
|
||||
|
||||
|
||||
class CR(LrsSimpleChar1, LrsContainer):
|
||||
|
|
|
|||
Loading…
Reference in a new issue