Browse Source

fix 'fontName' issue

(discovered during Mac OS 9 port)
master
Ivan Holmes 5 years ago
parent
commit
1ce8757de4
  1. 4
      chordsheet/render.py
  2. 2
      chordsheet/rlStylesheet.py

4
chordsheet/render.py

@ -49,7 +49,7 @@ class Tempo(Flowable):
self.tempo = tempo
self.text = "♩ = {t} bpm".format(t=self.tempo)
self.fontSize = paraStyle.fontSize
self.fontname = paraStyle.fontname
self.fontName = paraStyle.fontName
self.leading = paraStyle.leading
def wrap(self, availWidth, availHeight):
@ -59,7 +59,7 @@ class Tempo(Flowable):
def draw(self):
canvas = self.canv
canvas.setFont(self.fontname, self.fontSize)
canvas.setFont(self.fontName, self.fontSize)
canvas.drawString(0, self.leading * 0.25, self.text)

2
chordsheet/rlStylesheet.py

@ -10,7 +10,7 @@ def getStyleSheet(csStyle):
stylesheet = StyleSheet1()
stylesheet.add(ParagraphStyle(name='Master',
fontname=csStyle.font))
fontName=csStyle.font))
stylesheet.add(ParagraphStyle(name='Title',
leading=csStyle.lineSpacing*csStyle.titleFontSize,

Loading…
Cancel
Save