Update both screen samples with the font settings. Called on font initialization and change events. Accesses font_name, font_size, and font_bold Variables. Updates font_sample and highlight page highlight_sample.
(self, event=None)
| 435 | self.font_name.set(font.lower()) |
| 436 | |
| 437 | def set_samples(self, event=None): |
| 438 | """Update both screen samples with the font settings. |
| 439 | |
| 440 | Called on font initialization and change events. |
| 441 | Accesses font_name, font_size, and font_bold Variables. |
| 442 | Updates font_sample and highlight page highlight_sample. |
| 443 | """ |
| 444 | font_name = self.font_name.get() |
| 445 | font_weight = tkfont.BOLD if self.font_bold.get() else tkfont.NORMAL |
| 446 | new_font = (font_name, self.font_size.get(), font_weight) |
| 447 | self.font_sample['font'] = new_font |
| 448 | self.highlight_sample['font'] = new_font |
| 449 | |
| 450 | |
| 451 | class HighPage(Frame): |