Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow setting up hintstyle for own hinting in the font

  • Loading branch information...
commit 4808d109750d710145b7094df5e40cab6be4890a 1 parent 3aa248b
@tagoh tagoh authored
Showing with 67 additions and 54 deletions.
  1. +66 −53 data/fonts-tweak-prop.ui
  2. +1 −1  fontstweak/propui.py
View
119 data/fonts-tweak-prop.ui
@@ -83,13 +83,11 @@
<property name="icon_size">1</property>
<child>
<object class="GtkToolButton" id="add-font">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup" translatable="yes">Add a font</property>
<property name="tooltip_text" translatable="yes">Add a font</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Add a font</property>
<property name="use_underline">True</property>
<property name="icon_name">list-add-symbolic</property>
@@ -102,13 +100,11 @@
</child>
<child>
<object class="GtkToolButton" id="remove-font">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup" translatable="yes">Remove the font</property>
<property name="tooltip_text" translatable="yes">Remove the font</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Remove the font</property>
<property name="use_underline">True</property>
<property name="icon_name">list-remove-symbolic</property>
@@ -169,11 +165,9 @@
<child>
<object class="GtkCheckButton" id="checkbutton-subpixel-rendering">
<property name="label" translatable="yes">Use the sub-pixel rendering</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_checkbutton_subpixel_rendering_toggled" swapped="no"/>
@@ -218,11 +212,9 @@
<child>
<object class="GtkCheckButton" id="checkbutton-embedded-bitmap">
<property name="label" translatable="yes">Use the embedded bitmap font if any</property>
- <property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_checkbutton_embedded_bitmap_toggled" swapped="no"/>
@@ -275,11 +267,9 @@
<child>
<object class="GtkRadioButton" id="radiobutton-no-hinting">
<property name="label" translatable="yes">Do not use any hinting data</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -292,41 +282,50 @@
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="radiobutton-hinting">
- <property name="label" translatable="yes">Use hinting data in the font</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton-no-hinting</property>
- <signal name="toggled" handler="on_radiobutton_hinting_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box18">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
- <object class="GtkRadioButton" id="radiobutton-autohinting">
- <property name="label" translatable="yes">Use automatic-hinting feature</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton-hinting</property>
- <signal name="toggled" handler="on_radiobutton_autohinting_toggled" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton-hinting">
+ <property name="label" translatable="yes">Use hinting data in the font</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radiobutton-no-hinting</property>
+ <signal name="toggled" handler="on_radiobutton_hinting_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton-autohinting">
+ <property name="label" translatable="yes">Use automatic-hinting feature</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radiobutton-no-hinting</property>
+ <signal name="toggled" handler="on_radiobutton_autohinting_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -335,24 +334,31 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox-hintstyle">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="model">hintstyle-list</property>
- <property name="active">4</property>
- <signal name="changed" handler="on_combobox_hintstyle_changed" swapped="no"/>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext2"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <object class="GtkComboBox" id="combobox-hintstyle">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">12</property>
+ <property name="margin_bottom">12</property>
+ <property name="model">hintstyle-list</property>
+ <property name="active">4</property>
+ <signal name="changed" handler="on_combobox_hintstyle_changed" swapped="no"/>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -360,9 +366,12 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -432,11 +441,15 @@
</packing>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup-combobox">
+ <widgets>
+ <widget name="combobox-subpixel-rendering"/>
+ <widget name="alignment1"/>
+ </widgets>
+ </object>
<object class="GtkSizeGroup" id="sizegroup-properties">
<widgets>
<widget name="checkbutton-subpixel-rendering"/>
- <widget name="radiobutton-autohinting"/>
- <widget name="checkbutton-subpixel-rendering"/>
<widget name="checkbutton-embedded-bitmap"/>
<widget name="radiobutton-no-hinting"/>
<widget name="radiobutton-hinting"/>
View
2  fontstweak/propui.py
@@ -170,6 +170,7 @@ def on_checkbutton_embedded_bitmap_toggled(self, widget):
self.__apply_changes(lambda o: o.set_embedded_bitmap(widget.get_active()))
def on_radiobutton_no_hinting_toggled(self, widget):
+ self.combobox_hintstyle.set_sensitive(not widget.get_active())
if not widget.get_active():
return
self.__apply_changes(lambda o: o.set_hinting(False) == o.set_autohinting(False))
@@ -180,7 +181,6 @@ def on_radiobutton_hinting_toggled(self, widget):
self.__apply_changes(lambda o: o.set_hinting(True) == o.set_autohinting(False))
def on_radiobutton_autohinting_toggled(self, widget):
- self.combobox_hintstyle.set_sensitive(widget.get_active())
if not widget.get_active():
return
cb = (lambda o: o.set_hinting(False) == o.set_autohinting(True))
Please sign in to comment.
Something went wrong with that request. Please try again.