def set_font_scale_index(self, scale_index): self.font_scale_index = clamp(scale_index, -6, 12) font = pango.FontDescription(self.font.to_string()) scale_factor = 2 ** (self.font_scale_index / 6) new_size = int(scale_factor * font.get_size()) if font.get_size_is_absolute(): font.set_absolute_size(new_size) else: font.set_size(new_size) super(GuakeTerminal, self).set_font(font)
def set_font_scale_index(self, scale_index): self.font_scale_index = clamp(scale_index, -6, 12) font = Pango.FontDescription(self.font.to_string()) scale_factor = 2**(self.font_scale_index / 6) new_size = int(scale_factor * font.get_size()) if font.get_size_is_absolute(): font.set_absolute_size(new_size) else: font.set_size(new_size) super(GuakeTerminal, self).set_font(font)