105 f = font.family().encode() |
105 f = font.family().encode() |
106 ps = font.pointSize() |
106 ps = font.pointSize() |
107 weight = -font.weight() |
107 weight = -font.weight() |
108 italic = font.italic() |
108 italic = font.italic() |
109 underline = font.underline() |
109 underline = font.underline() |
|
110 bold = font.bold() |
110 for style in rangeLow + rangeHigh: |
111 for style in rangeLow + rangeHigh: |
111 self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f) |
112 self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f) |
112 self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps) |
113 self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps) |
113 self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight) |
114 try: |
|
115 self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight) |
|
116 except AttributeError: |
|
117 self.SendScintilla(QsciScintilla.SCI_STYLESETBOLD, style, bold) |
114 self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic) |
118 self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic) |
115 self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline) |
119 self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline) |
116 |
120 |
117 def linesOnScreen(self): |
121 def linesOnScreen(self): |
118 """ |
122 """ |