Skip to content

Commit

Permalink
unicode replacement for sharp and flat
Browse files Browse the repository at this point in the history
  • Loading branch information
acspike committed May 10, 2011
1 parent b42f045 commit fc14539
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions example_5_reportlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@
#mode Patterns
from segovia_scales import scales

sharp = u"\u266F"
flat = u"\u266D"

doc = SimpleDocTemplate("segovia_scales.pdf", bottomMargin = 0.25*inch, topMargin = 0.75*inch)
story = []
count = 0
for title,patterns in scales:
title = title.replace("#",sharp).replace("b",flat)
if count > 0 and count % 2 == 0:
story.append(PageBreak())
count += 1
story.append(Paragraph(title,styleT))
for kind,notes in patterns:
story.append(FBFlowable(fb7,notes, label=kind))
Expand Down

0 comments on commit fc14539

Please sign in to comment.