Sets the font size in the context. >>> from pagebot.toolbox.units import pt >>> from pagebot import getContext >>> context = getContext() >>> context.newPage(420, 420) >>> context.fontSize(pt(12))
(self, fontSize)
| 789 | return self.b.fallbackFont(fontName) |
| 790 | |
| 791 | def fontSize(self, fontSize): |
| 792 | """Sets the font size in the context. |
| 793 | |
| 794 | >>> from pagebot.toolbox.units import pt |
| 795 | >>> from pagebot import getContext |
| 796 | >>> context = getContext() |
| 797 | >>> context.newPage(420, 420) |
| 798 | >>> context.fontSize(pt(12)) |
| 799 | """ |
| 800 | fspt = upt(fontSize) |
| 801 | self._fontSize = fspt |
| 802 | self.b.fontSize(fspt) # Render fontSize unit to value |
| 803 | |
| 804 | # Babelstring |
| 805 |