[gtk+/wip/matthiasc/font-variations: 255/260] Add a font variations demo



commit 103d27d47ef8df117798019aed85cfd7ea51e934
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Aug 16 23:48:52 2017 -0400

    Add a font variations demo
    
    Expand the font features demo to show off font variations.

 demos/gtk-demo/font-features.ui | 2840 ++++++++++++++++++++-------------------
 demos/gtk-demo/font_features.c  |  874 ++++++++++++-
 2 files changed, 2313 insertions(+), 1401 deletions(-)
---
diff --git a/demos/gtk-demo/font-features.ui b/demos/gtk-demo/font-features.ui
index 0bd2645..93910e1 100644
--- a/demos/gtk-demo/font-features.ui
+++ b/demos/gtk-demo/font-features.ui
@@ -8,19 +8,19 @@
     <child type="titlebar">
       <object class="GtkHeaderBar">
         <property name="visible">1</property>
-        <property name="show_close_button">1</property>
+        <property name="show-close-button">1</property>
         <property name="title">Font Features</property>
         <child>
           <object class="GtkButton" id="reset">
             <property name="visible">1</property>
-            <property name="can_focus">1</property>
-            <property name="receives_default">1</property>
+            <property name="can-focus">1</property>
+            <property name="receives-default">1</property>
             <property name="tooltip-text">Reset</property>
             <signal name="clicked" handler="reset" swapped="no"/>
             <child>
               <object class="GtkImage">
                 <property name="visible">1</property>
-                <property name="icon_name">view-refresh-symbolic</property>
+                <property name="icon-name">view-refresh-symbolic</property>
               </object>
             </child>
           </object>
@@ -33,8 +33,8 @@
         <child>
           <object class="GtkScrolledWindow">
             <property name="visible">1</property>
-            <property name="can_focus">1</property>
-            <property name="hscrollbar_policy">never</property>
+            <property name="can-focus">1</property>
+            <property name="hscrollbar-policy">never</property>
             <child>
               <object class="GtkViewport">
                 <property name="visible">1</property>
@@ -47,16 +47,24 @@
                     <child>
                       <object class="GtkFontButton" id="font">
                         <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <property name="receives_default">1</property>
+                        <property name="can-focus">1</property>
+                        <property name="receives-default">1</property>
                         <property name="font">Sans 12</property>
                         <signal name="font-set" handler="font_changed" swapped="no"/>
                       </object>
                     </child>
                     <child>
+                      <object class="GtkLabel">
+                        <property name="label" translatable="yes">Script &amp; Language</property>
+                        <property name="xalign">0</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                    <child>
                       <object class="GtkComboBox" id="script_lang">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
+                        <property name="can-focus">1</property>
                         <signal name="changed" handler="script_changed" swapped="no"/>
                         <child>
                           <object class="GtkCellRendererText"/>
@@ -68,1514 +76,1536 @@
                     </child>
                     <child>
                       <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="kern_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="kern_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="kern">
-                                    <property name="label" translatable="yes">Enabled</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="kern_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
                         <child type="label">
                           <object class="GtkLabel">
                             <property name="visible">1</property>
-                            <property name="label" translatable="yes">Kerning</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Font Features</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
                           </object>
                         </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
                         <child>
                           <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
                             <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="liga_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="liga_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="liga">
-                                    <property name="label" translatable="yes">Common Ligatures</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="liga_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="margin-top">10</property>
+                                <property name="label" translatable="yes">Kerning</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="dlig_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="dlig_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="dlig">
-                                    <property name="label" translatable="yes">Discretionary 
Ligatures</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="dlig_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="kern_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="kern_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="kern">
+                                        <property name="label" translatable="yes">Enabled</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="kern_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="hlig_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="hlig_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="hlig">
-                                    <property name="label" translatable="yes">Historical Ligatures</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="hlig_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Ligatures</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="clig_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="clig_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="clig">
-                                    <property name="label" translatable="yes">Contextual Ligatures</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="clig_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="liga_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="liga_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="liga">
+                                        <property name="label" translatable="yes">Common Ligatures</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="liga_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="dlig_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="dlig_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="dlig">
+                                        <property name="label" translatable="yes">Discretionary 
Ligatures</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="dlig_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="hlig_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="hlig_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="hlig">
+                                        <property name="label" translatable="yes">Historical 
Ligatures</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="hlig_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="clig_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="clig_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="clig">
+                                        <property name="label" translatable="yes">Contextual 
Ligatures</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="clig_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Ligatures</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="smcp_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="smcp_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="smcp">
-                                    <property name="label" translatable="yes">Small Caps</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="valign">baseline</property>
-                                    <property name="sensitive" bind-source="smcp_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Letter Case</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="c2sc_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="c2sc_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="c2sc">
-                                    <property name="label" translatable="yes">Small Caps from Caps</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="c2sc_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="smcp_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="smcp_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="smcp">
+                                        <property name="label" translatable="yes">Small Caps</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="valign">baseline</property>
+                                        <property name="sensitive" bind-source="smcp_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="c2sc_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="c2sc_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="c2sc">
+                                        <property name="label" translatable="yes">Small Caps from 
Caps</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="c2sc_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="pcap_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="pcap_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="pcap">
+                                        <property name="label" translatable="yes">Petite Caps</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="pcap_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="c2pc_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="c2pc_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="c2pc">
+                                        <property name="label" translatable="yes">Caps to Petite 
Caps</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="c2pc_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="unic_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="unic_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="unic">
+                                        <property name="label" translatable="yes">Unicase</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="unic_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="cpsp_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="cpsp_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="cpsp">
+                                        <property name="label" translatable="yes">Capital Spacing</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="cpsp_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="case_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="case_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="case">
+                                        <property name="label" translatable="yes">Case-sensitive 
Forms</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="case_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="pcap_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="pcap_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="pcap">
-                                    <property name="label" translatable="yes">Petite Caps</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="pcap_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Number Case</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="c2pc_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="c2pc_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="c2pc">
-                                    <property name="label" translatable="yes">Caps to Petite Caps</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="c2pc_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="numcasedefault_pres">
+                                        <property name="visible">1</property>
+                                        <property name="opacity">0</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="numcasedefault">
+                                        <property name="label" translatable="yes">Default</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="lnum_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="lnum">
+                                        <property name="label" translatable="yes">Lining</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <property name="group">numcasedefault</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="onum_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="onum">
+                                        <property name="label" translatable="yes">Old-Style</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="valign">baseline</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="group">numcasedefault</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="unic_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="unic_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="unic">
-                                    <property name="label" translatable="yes">Unicase</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="unic_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Number Spacing</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="cpsp_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="cpsp_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="cpsp">
-                                    <property name="label" translatable="yes">Capital Spacing</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="cpsp_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="numspacedefault_pres">
+                                        <property name="visible">1</property>
+                                        <property name="opacity">0</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="numspacedefault">
+                                        <property name="label" translatable="yes">Default</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="pnum_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="pnum">
+                                        <property name="label" translatable="yes">Proportional</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="group">numspacedefault</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="tnum_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="tnum">
+                                        <property name="label" translatable="yes">Tabular</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="group">numspacedefault</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="case_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="case_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="case">
-                                    <property name="label" translatable="yes">Case-sensitive Forms</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="case_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Fractions</property>
                               </object>
                             </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Letter Case</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="numcasedefault_pres">
-                                    <property name="visible">1</property>
-                                    <property name="opacity">0</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="numcasedefault">
-                                    <property name="label" translatable="yes">Default</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="fractiondefault_pres">
+                                        <property name="visible">1</property>
+                                        <property name="opacity">0</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="fractiondefault">
+                                        <property name="label" translatable="yes">Off</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="frac_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="frac">
+                                        <property name="label" translatable="yes">Normal</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="group">fractiondefault</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="afrc_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" id="afrc">
+                                        <property name="label" translatable="yes">Alternate</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="active">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="group">fractiondefault</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="lnum_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="lnum">
-                                    <property name="label" translatable="yes">Lining</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <property name="group">numcasedefault</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Numeric Extras</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="onum_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="onum">
-                                    <property name="label" translatable="yes">Old-Style</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="valign">baseline</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="group">numcasedefault</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="zero_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="zero_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="zero">
+                                        <property name="label" translatable="yes">Slashed Zero</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="zero_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="nalt_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="nalt_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="nalt">
+                                        <property name="label" translatable="yes">Alternative 
Annotations</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="nalt_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="sinf_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="sinf_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="sinf">
+                                        <property name="label" translatable="yes">Scientific 
Inferiors</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="sinf_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Number Case</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="numspacedefault_pres">
-                                    <property name="visible">1</property>
-                                    <property name="opacity">0</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="numspacedefault">
-                                    <property name="label" translatable="yes">Default</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Character Alternatives</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="pnum_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="pnum">
-                                    <property name="label" translatable="yes">Proportional</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="group">numspacedefault</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="swsh_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="swsh_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="swsh">
+                                        <property name="label" translatable="yes">Swash Glyphs</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="swsh_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="cswh_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="cswh_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="cswh">
+                                        <property name="label" translatable="yes">Contextual Swash</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="cswh_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="locl_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="locl_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="locl">
+                                        <property name="label" translatable="yes">Localized Forms</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="locl_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="calt_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="calt_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="calt">
+                                        <property name="label" translatable="yes">Contextual 
Alternatives</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="calt_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="hist_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="hist_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="hist">
+                                        <property name="label" translatable="yes">Historical 
Alternatives</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="hist_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="salt_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="salt_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="salt">
+                                        <property name="label" translatable="yes">Stylistic 
Alternatives</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="salt_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="titl_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="titl_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="titl">
+                                        <property name="label" translatable="yes">Titling 
Alternatives</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="titl_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="rand_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="rand_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="rand">
+                                        <property name="label" translatable="yes">Randomize</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="rand_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="subs_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="subs_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="subs">
+                                        <property name="label" translatable="yes">Subscript</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="subs_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="sups_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="sups_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="sups">
+                                        <property name="label" translatable="yes">Superscript</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="sups_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="tnum_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="tnum">
-                                    <property name="label" translatable="yes">Tabular</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="group">numspacedefault</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Positional Alternatives</property>
                               </object>
                             </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Number Spacing</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="fractiondefault_pres">
-                                    <property name="visible">1</property>
-                                    <property name="opacity">0</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="fractiondefault">
-                                    <property name="label" translatable="yes">Off</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="init_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="init_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="init">
+                                        <property name="label" translatable="yes">Initial Forms</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="init_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="medi_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="medi_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="medi">
+                                        <property name="label" translatable="yes">Medial Forms</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="medi_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="fina_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="fina_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="fina">
+                                        <property name="label" translatable="yes">Final Forms</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="fina_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="isol_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="isol_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="isol">
+                                        <property name="label" translatable="yes">Isolated Forms</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="isol_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox">
+                              <object class="GtkLabel">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="frac_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="frac">
-                                    <property name="label" translatable="yes">Normal</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="group">fractiondefault</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
+                                <property name="label" translatable="yes">Alternative Stylistic 
Sets</property>
                               </object>
                             </child>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="afrc_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="afrc">
-                                    <property name="label" translatable="yes">Alternate</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="active">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="group">fractiondefault</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
+                                <property name="halign">start</property>
+                                <property name="margin-start">20</property>
+                                <property name="margin-end">10</property>
+                                <property name="margin-top">10</property>
+                                <property name="margin-bottom">10</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="ss01_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss01_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss01">
+                                        <property name="label" translatable="yes">Set 1</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="ss01_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="ss02_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss02_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss02">
+                                        <property name="label" translatable="yes">Set 2</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="ss02_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="ss03_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss03_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss03">
+                                        <property name="label" translatable="yes">Set 3</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="ss03_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="ss04_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss04_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss04">
+                                        <property name="label" translatable="yes">Set 4</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="ss04_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkBox">
+                                    <property name="visible">1</property>
+                                    <child>
+                                      <object class="GtkImage" id="ss05_pres">
+                                        <property name="visible">1</property>
+                                        <property name="icon-name">object-select-symbolic</property>
+                                        <property name="icon-size">1</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss05_dflt">
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="ss05">
+                                        <property name="label" translatable="yes">Set 5</property>
+                                        <property name="visible">1</property>
+                                        <property name="can-focus">1</property>
+                                        <property name="draw-indicator">1</property>
+                                        <property name="valign">baseline</property>
+                                        <signal name="notify::active" handler="update_display" swapped="no"/>
+                                        <property name="sensitive" bind-source="ss05_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
+                                      </object>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
                             </child>
                           </object>
                         </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Fractions</property>
-                          </object>
-                        </child>
                       </object>
                     </child>
                     <child>
                       <object class="GtkExpander">
                         <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="zero_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="zero_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="zero">
-                                    <property name="label" translatable="yes">Slashed Zero</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="zero_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="nalt_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="nalt_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="nalt">
-                                    <property name="label" translatable="yes">Alternative 
Annotations</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="nalt_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="sinf_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="sinf_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="sinf">
-                                    <property name="label" translatable="yes">Scientific Inferiors</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="sinf_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
                         <child type="label">
-                          <object class="GtkLabel">
+                          <object class="GtkLabel" id="variations_heading">
                             <property name="visible">1</property>
-                            <property name="label" translatable="yes">Numeric Extras</property>
+                            <property name="label" translatable="yes">Font Variations</property>
+                            <property name="xalign">0</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
                           </object>
                         </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
                         <child>
-                          <object class="GtkBox">
+                          <object class="GtkGrid" id="variations_grid">
                             <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="swsh_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="swsh_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="swsh">
-                                    <property name="label" translatable="yes">Swash Glyphs</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="swsh_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="cswh_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="cswh_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="cswh">
-                                    <property name="label" translatable="yes">Contextual Swash</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="cswh_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="locl_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="locl_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="locl">
-                                    <property name="label" translatable="yes">Localized Forms</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="locl_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="calt_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="calt_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="calt">
-                                    <property name="label" translatable="yes">Contextual 
Alternatives</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="calt_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="hist_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="hist_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="hist">
-                                    <property name="label" translatable="yes">Historical 
Alternatives</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="hist_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="salt_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="salt_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="salt">
-                                    <property name="label" translatable="yes">Stylistic 
Alternatives</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="salt_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="titl_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="titl_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="titl">
-                                    <property name="label" translatable="yes">Titling Alternatives</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="titl_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="rand_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="rand_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="rand">
-                                    <property name="label" translatable="yes">Randomize</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="rand_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="subs_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="subs_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="subs">
-                                    <property name="label" translatable="yes">Subscript</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="subs_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="sups_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="sups_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="sups">
-                                    <property name="label" translatable="yes">Superscript</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="sups_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Character Alternatives</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="init_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="init_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="init">
-                                    <property name="label" translatable="yes">Initial Forms</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="init_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="medi_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="medi_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="medi">
-                                    <property name="label" translatable="yes">Medial Forms</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="medi_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="fina_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="fina_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="fina">
-                                    <property name="label" translatable="yes">Final Forms</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="fina_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="isol_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="isol_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="isol">
-                                    <property name="label" translatable="yes">Isolated Forms</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="isol_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Positional Alternatives</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkExpander">
-                        <property name="visible">1</property>
-                        <property name="can_focus">1</property>
-                        <child>
-                          <object class="GtkBox">
-                            <property name="visible">1</property>
-                            <property name="margin_start">10</property>
-                            <property name="margin_end">10</property>
-                            <property name="margin_top">10</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="ss01_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss01_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss01">
-                                    <property name="label" translatable="yes">Set 1</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="ss01_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="ss02_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss02_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss02">
-                                    <property name="label" translatable="yes">Set 2</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="ss02_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="ss03_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss03_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss03">
-                                    <property name="label" translatable="yes">Set 3</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="ss03_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="ss04_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss04_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss04">
-                                    <property name="label" translatable="yes">Set 4</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="ss04_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkBox">
-                                <property name="visible">1</property>
-                                <child>
-                                  <object class="GtkImage" id="ss05_pres">
-                                    <property name="visible">1</property>
-                                    <property name="icon-name">object-select-symbolic</property>
-                                    <property name="icon-size">1</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss05_dflt">
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="ss05">
-                                    <property name="label" translatable="yes">Set 5</property>
-                                    <property name="visible">1</property>
-                                    <property name="can_focus">1</property>
-                                    <property name="draw_indicator">1</property>
-                                    <property name="valign">baseline</property>
-                                    <signal name="notify::active" handler="update_display" swapped="no"/>
-                                    <property name="sensitive" bind-source="ss05_dflt" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel">
-                            <property name="visible">1</property>
-                            <property name="label" translatable="yes">Alternative Stylistic Sets</property>
+                            <property name="column-spacing">10</property>
+                            <property name="row-spacing">10</property>
                           </object>
                         </child>
                       </object>
@@ -1596,10 +1626,10 @@
             <child>
               <object class="GtkStack" id="stack">
                 <property name="visible">1</property>
-                <property name="margin_start">20</property>
-                <property name="margin_end">20</property>
-                <property name="margin_top">20</property>
-                <property name="margin_bottom">20</property>
+                <property name="margin-start">20</property>
+                <property name="margin-end">20</property>
+                <property name="margin-top">20</property>
+                <property name="margin-bottom">20</property>
                 <child>
                   <object class="GtkLabel" id="label">
                     <property name="visible">1</property>
@@ -1635,15 +1665,37 @@
             <child>
               <object class="GtkLabel" id="settings">
                 <property name="visible">1</property>
-                <property name="margin_start">20</property>
-                <property name="margin_end">20</property>
-                <property name="margin_bottom">20</property>
+                <property name="wrap">1</property>
+                <property name="margin-start">20</property>
+                <property name="margin-end">20</property>
+                <property name="margin-bottom">20</property>
                 <property name="xalign">0</property>
                 <property name="valign">end</property>
                 <property name="width-chars">50</property>
                 <property name="max-width-chars">50</property>
                 <property name="hexpand">1</property>
                 <property name="vexpand">1</property>
+                <style>
+                  <class name="monospace"/>
+                </style>
+              </object>
+            </child>
+            <child>
+              <object class="GtkLabel" id="description">
+                <property name="visible">1</property>
+                <property name="wrap">1</property>
+                <property name="margin-start">20</property>
+                <property name="margin-end">20</property>
+                <property name="margin-bottom">20</property>
+                <property name="xalign">0</property>
+                <property name="valign">end</property>
+                <property name="width-chars">50</property>
+                <property name="max-width-chars">50</property>
+                <property name="hexpand">1</property>
+                <property name="vexpand">0</property>
+                <style>
+                  <class name="monospace"/>
+                </style>
               </object>
             </child>
             <property name="hexpand">1</property>
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index b75508f..7582a86 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -6,6 +6,9 @@
  *
  * It can also be used to explore available features in OpenType fonts
  * and their effect.
+ *
+ * If the selected font supports OpenType font variations, then the
+ * axes are also offered for customization.
  */
 
 #include <gtk/gtk.h>
@@ -13,9 +16,13 @@
 #include <hb.h>
 #include <hb-ot.h>
 #include <hb-ft.h>
+#include <freetype/ftmm.h>
+#include <freetype/ftsnames.h>
+#include <freetype/ttnameid.h>
 
 static GtkWidget *label;
 static GtkWidget *settings;
+static GtkWidget *description;
 static GtkWidget *font;
 static GtkWidget *script_lang;
 static GtkWidget *resetbutton;
@@ -24,6 +31,9 @@ static GtkWidget *numspacedefault;
 static GtkWidget *fractiondefault;
 static GtkWidget *stack;
 static GtkWidget *entry;
+static GtkWidget *variations_heading;
+static GtkWidget *variations_grid;
+static GtkWidget *instance_combo;
 
 #define num_features 40
 
@@ -36,6 +46,8 @@ static const char *feature_names[num_features] = {
   "sups", "init", "medi", "fina", "isol", "ss01", "ss02", "ss03", "ss04", "ss05"
 };
 
+static void add_font_variations (GString *s);
+
 static void
 update_display (void)
 {
@@ -49,10 +61,24 @@ update_display (void)
   GtkTreeModel *model;
   GtkTreeIter iter;
   const char *lang;
+  PangoFontDescription *desc;
+  char *tmp;
 
   text = gtk_entry_get_text (GTK_ENTRY (entry));
 
-  font_desc = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (font));
+  desc = gtk_font_chooser_get_font_desc (GTK_FONT_CHOOSER (font));
+  pango_font_description_unset_fields (desc, PANGO_FONT_MASK_VARIATIONS);
+  tmp = pango_font_description_to_string (desc);
+
+  s = g_string_new (tmp);
+
+  g_free (tmp);
+  pango_font_description_free (desc);
+
+  add_font_variations (s);
+  font_desc = g_string_free (s, FALSE);
+
+  gtk_label_set_text (GTK_LABEL (description), font_desc);
 
   s = g_string_new ("");
 
@@ -79,9 +105,9 @@ update_display (void)
             g_string_append (s, ", ");
           g_string_append (s, gtk_buildable_get_name (GTK_BUILDABLE (toggle[i])));
           if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle[i])))
-            g_string_append (s, " 1");
+            g_string_append (s, " 1");
           else
-            g_string_append (s, " 0");
+            g_string_append (s, " 0");
           has_feature = TRUE;
         }
     }
@@ -90,7 +116,6 @@ update_display (void)
 
   gtk_label_set_text (GTK_LABEL (settings), font_settings);
 
-
   if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (script_lang), &iter))
     {
       model = gtk_combo_box_get_model (GTK_COMBO_BOX (script_lang));
@@ -122,13 +147,11 @@ get_pango_font (void)
 {
   PangoFontDescription *desc;
   PangoContext *context;
-  PangoFontMap *map;
 
   desc = gtk_font_chooser_get_font_desc (GTK_FONT_CHOOSER (font));
   context = gtk_widget_get_pango_context (font);
-  map = pango_context_get_font_map (context);
 
-  return pango_font_map_load_font (map, context, desc);
+  return pango_context_load_font (context, desc);
 }
 
 static struct { const char *name; hb_script_t script; } script_names[] = {
@@ -404,10 +427,834 @@ update_features (void)
   g_object_unref (pango_font);
 }
 
+#define FixedToFloat(f) (((float)(f))/65536.0)
+
+static void
+adjustment_changed (GtkAdjustment *adjustment,
+                    GtkEntry      *entry)
+{
+  char *str;
+
+  str = g_strdup_printf ("%g", gtk_adjustment_get_value (adjustment));
+  gtk_entry_set_text (GTK_ENTRY (entry), str);
+  g_free (str);
+
+  update_display ();
+}
+
+static void
+entry_activated (GtkEntry *entry,
+                 GtkAdjustment *adjustment)
+{
+  gdouble value;
+  gchar *err = NULL;
+
+  value = g_strtod (gtk_entry_get_text (entry), &err);
+  if (err != NULL)
+    gtk_adjustment_set_value (adjustment, value);
+}
+
+static void unset_instance (GtkAdjustment *adjustment);
+
+typedef struct {
+  guint32 tag;
+  GtkAdjustment *adjustment;
+} Axis;
+
+static GHashTable *axes;
+
+static void
+add_font_variations (GString *s)
+{
+  GHashTableIter iter;
+  Axis *axis;
+  char buf[G_ASCII_DTOSTR_BUF_SIZE];
+  char *sep = " @";
+
+  g_hash_table_iter_init (&iter, axes);
+  while (g_hash_table_iter_next (&iter, (gpointer *)NULL, (gpointer *)&axis))
+    {
+      char tag[5];
+      double value;
+
+      hb_tag_to_string (axis->tag, tag);
+      tag[4] = '\0';
+      value = gtk_adjustment_get_value (axis->adjustment);
+
+      g_string_append_printf (s, "%s%s=%s", sep, tag, g_ascii_dtostr (buf, sizeof (buf), value));
+      sep = ",";
+    }
+}
+
+static guint
+axes_hash (gconstpointer v)
+{
+  const Axis *p = v;
+
+  return p->tag;
+}
+
+static gboolean
+axes_equal (gconstpointer v1, gconstpointer v2)
+{
+  const Axis *p1 = v1;
+  const Axis *p2 = v2;
+
+  return p1->tag == p2->tag;
+}
+
+static void
+add_axis (FT_Var_Axis *ax, FT_Fixed value, int i)
+{
+  GtkWidget *axis_label;
+  GtkWidget *axis_entry;
+  GtkWidget *axis_scale;
+  GtkAdjustment *adjustment;
+  Axis *axis;
+
+  axis_label = gtk_label_new (ax->name);
+  gtk_widget_set_halign (axis_label, GTK_ALIGN_START);
+  gtk_widget_set_valign (axis_label, GTK_ALIGN_BASELINE);
+  gtk_grid_attach (GTK_GRID (variations_grid), axis_label, 0, i, 1, 1);
+  adjustment = gtk_adjustment_new ((double)FixedToFloat(value),
+                                   (double)FixedToFloat(ax->minimum),
+                                   (double)FixedToFloat(ax->maximum),
+                                   1.0, 10.0, 0.0);
+  axis_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
+  gtk_scale_add_mark (GTK_SCALE (axis_scale), (double)FixedToFloat(ax->def), GTK_POS_TOP, NULL);
+  gtk_widget_set_valign (axis_scale, GTK_ALIGN_BASELINE);
+  gtk_widget_set_hexpand (axis_scale, TRUE);
+  gtk_widget_set_size_request (axis_scale, 100, -1);
+  gtk_scale_set_draw_value (GTK_SCALE (axis_scale), FALSE);
+  gtk_grid_attach (GTK_GRID (variations_grid), axis_scale, 1, i, 1, 1);
+  axis_entry = gtk_entry_new ();
+  gtk_widget_set_valign (axis_entry, GTK_ALIGN_BASELINE);
+  gtk_entry_set_width_chars (GTK_ENTRY (axis_entry), 4);
+  gtk_grid_attach (GTK_GRID (variations_grid), axis_entry, 2, i, 1, 1);
+
+  axis = g_new (Axis, 1);
+  axis->tag = ax->tag;
+  axis->adjustment = adjustment;
+  g_hash_table_add (axes, axis);
+
+  adjustment_changed (adjustment, GTK_ENTRY (axis_entry));
+
+  g_signal_connect (adjustment, "value-changed", G_CALLBACK (adjustment_changed), axis_entry);
+  g_signal_connect (adjustment, "value-changed", G_CALLBACK (unset_instance), NULL);
+  g_signal_connect (axis_entry, "activate", G_CALLBACK (entry_activated), adjustment);
+}
+
+typedef struct {
+  char *name;
+  int n_axes;
+  guint32 *axes;
+  float   *coords;
+} Instance;
+
+static guint
+instance_hash (gconstpointer v)
+{
+  const Instance *p = v;
+
+  return g_str_hash (p->name);
+}
+
+static gboolean
+instance_equal (gconstpointer v1, gconstpointer v2)
+{
+  const Instance *p1 = v1;
+  const Instance *p2 = v2;
+
+  return g_str_equal (p1->name, p2->name);
+}
+
+static void
+free_instance (gpointer data)
+{
+  Instance *instance = data;
+
+  g_free (instance->name);
+  g_free (instance->axes);
+  g_free (instance->coords);
+  g_free (instance);
+}
+
+static GHashTable *instances;
+
+typedef struct {
+    const FT_UShort     platform_id;
+    const FT_UShort     encoding_id;
+    const char  fromcode[12];
+} FtEncoding;
+
+#define TT_ENCODING_DONT_CARE   0xffff
+
+static const FtEncoding   ftEncoding[] = {
+ {  TT_PLATFORM_APPLE_UNICODE,  TT_ENCODING_DONT_CARE,  "UTF-16BE" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_ID_ROMAN,        "MACINTOSH" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_ID_JAPANESE,     "SJIS" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_SYMBOL_CS,     "UTF-16BE" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_UNICODE_CS,    "UTF-16BE" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_SJIS,          "SJIS-WIN" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_GB2312,        "GB2312" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_BIG_5,         "BIG-5" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_WANSUNG,       "Wansung" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_JOHAB,         "Johab" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_ID_UCS_4,         "UTF-16BE" },
+ {  TT_PLATFORM_ISO,            TT_ISO_ID_7BIT_ASCII,   "ASCII" },
+ {  TT_PLATFORM_ISO,            TT_ISO_ID_10646,        "UTF-16BE" },
+ {  TT_PLATFORM_ISO,            TT_ISO_ID_8859_1,       "ISO-8859-1" },
+};
+
+typedef struct {
+    const FT_UShort     platform_id;
+    const FT_UShort     language_id;
+    const char  lang[8];
+} FtLanguage;
+
+#define TT_LANGUAGE_DONT_CARE   0xffff
+
+static const FtLanguage   ftLanguage[] = {
+ {  TT_PLATFORM_APPLE_UNICODE,  TT_LANGUAGE_DONT_CARE,              "" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ENGLISH,              "en" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_FRENCH,               "fr" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GERMAN,               "de" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ITALIAN,              "it" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_DUTCH,                "nl" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SWEDISH,              "sv" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SPANISH,              "es" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_DANISH,               "da" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_PORTUGUESE,           "pt" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_NORWEGIAN,            "no" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_HEBREW,               "he" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_JAPANESE,             "ja" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ARABIC,               "ar" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_FINNISH,              "fi" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GREEK,                "el" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ICELANDIC,            "is" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MALTESE,              "mt" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TURKISH,              "tr" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_CROATIAN,             "hr" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_CHINESE_TRADITIONAL,  "zh-tw" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_URDU,                 "ur" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_HINDI,                "hi" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_THAI,                 "th" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_KOREAN,               "ko" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_LITHUANIAN,           "lt" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_POLISH,               "pl" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_HUNGARIAN,            "hu" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ESTONIAN,             "et" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_LETTISH,              "lv" },
+/* {  TT_PLATFORM_MACINTOSH,    TT_MAC_LANGID_SAAMISK, ??? */
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_FAEROESE,             "fo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_FARSI,                "fa" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_RUSSIAN,              "ru" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_CHINESE_SIMPLIFIED,   "zh-cn" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_FLEMISH,              "nl" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_IRISH,                "ga" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ALBANIAN,             "sq" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ROMANIAN,             "ro" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_CZECH,                "cs" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SLOVAK,               "sk" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SLOVENIAN,            "sl" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_YIDDISH,              "yi" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SERBIAN,              "sr" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MACEDONIAN,           "mk" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_BULGARIAN,            "bg" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_UKRAINIAN,            "uk" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_BYELORUSSIAN,         "be" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_UZBEK,                "uz" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_KAZAKH,               "kk" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_AZERBAIJANI,          "az" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT, "az" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT,    "ar" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ARMENIAN,             "hy" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GEORGIAN,             "ka" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MOLDAVIAN,            "mo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_KIRGHIZ,              "ky" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TAJIKI,               "tg" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TURKMEN,              "tk" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MONGOLIAN,            "mo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT,"mo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT, "mo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_PASHTO,               "ps" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_KURDISH,              "ku" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_KASHMIRI,             "ks" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SINDHI,               "sd" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TIBETAN,              "bo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_NEPALI,               "ne" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SANSKRIT,             "sa" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MARATHI,              "mr" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_BENGALI,              "bn" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ASSAMESE,             "as" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GUJARATI,             "gu" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_PUNJABI,              "pa" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ORIYA,                "or" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MALAYALAM,            "ml" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_KANNADA,              "kn" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TAMIL,                "ta" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TELUGU,               "te" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SINHALESE,            "si" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_BURMESE,              "my" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_KHMER,                "km" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_LAO,                  "lo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_VIETNAMESE,           "vi" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_INDONESIAN,           "id" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TAGALOG,              "tl" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MALAY_ROMAN_SCRIPT,   "ms" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MALAY_ARABIC_SCRIPT,  "ms" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_AMHARIC,              "am" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TIGRINYA,             "ti" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GALLA,                "om" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SOMALI,               "so" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SWAHILI,              "sw" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_RUANDA,               "rw" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_RUNDI,                "rn" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_CHEWA,                "ny" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MALAGASY,             "mg" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_ESPERANTO,            "eo" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_WELSH,                "cy" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_BASQUE,               "eu" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_CATALAN,              "ca" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_LATIN,                "la" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_QUECHUA,              "qu" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GUARANI,              "gn" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_AYMARA,               "ay" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TATAR,                "tt" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_UIGHUR,               "ug" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_DZONGKHA,             "dz" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_JAVANESE,             "jw" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SUNDANESE,            "su" },
+
+#if 0  /* these seem to be errors that have been dropped */
+
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SCOTTISH_GAELIC },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_IRISH_GAELIC },
+
+#endif
+
+  /* The following codes are new as of 2000-03-10 */
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GALICIAN,             "gl" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_AFRIKAANS,            "af" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_BRETON,               "br" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_INUKTITUT,            "iu" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_SCOTTISH_GAELIC,      "gd" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_MANX_GAELIC,          "gv" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_IRISH_GAELIC,         "ga" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_TONGAN,               "to" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GREEK_POLYTONIC,      "el" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_GREELANDIC,           "ik" },
+ {  TT_PLATFORM_MACINTOSH,      TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT,"az" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_SAUDI_ARABIA,       "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_IRAQ,               "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_EGYPT,              "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_LIBYA,              "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_ALGERIA,            "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_MOROCCO,            "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_TUNISIA,            "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_OMAN,               "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_YEMEN,              "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_SYRIA,              "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_JORDAN,             "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_LEBANON,            "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_KUWAIT,             "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_UAE,                "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_BAHRAIN,            "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_QATAR,              "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_BULGARIAN_BULGARIA,        "bg" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CATALAN_SPAIN,             "ca" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CHINESE_TAIWAN,            "zh-tw" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CHINESE_PRC,               "zh-cn" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CHINESE_HONG_KONG,         "zh-hk" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CHINESE_SINGAPORE,         "zh-sg" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CHINESE_MACAU,             "zh-mo" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CZECH_CZECH_REPUBLIC,      "cs" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_DANISH_DENMARK,            "da" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GERMAN_GERMANY,            "de" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GERMAN_SWITZERLAND,        "de" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GERMAN_AUSTRIA,            "de" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GERMAN_LUXEMBOURG,         "de" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GERMAN_LIECHTENSTEI,       "de" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GREEK_GREECE,              "el" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_UNITED_STATES,     "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_UNITED_KINGDOM,    "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_AUSTRALIA,         "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_CANADA,            "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_NEW_ZEALAND,       "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_IRELAND,           "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_SOUTH_AFRICA,      "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_JAMAICA,           "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_CARIBBEAN,         "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_BELIZE,            "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_TRINIDAD,          "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_ZIMBABWE,          "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_PHILIPPINES,       "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT,"es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_MEXICO,            "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT,"es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_GUATEMALA,         "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_COSTA_RICA,        "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_PANAMA,            "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC,"es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_VENEZUELA,         "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_COLOMBIA,          "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_PERU,              "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_ARGENTINA,         "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_ECUADOR,           "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_CHILE,             "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_URUGUAY,           "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_PARAGUAY,          "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_BOLIVIA,           "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_EL_SALVADOR,       "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_HONDURAS,          "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_NICARAGUA,         "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_PUERTO_RICO,       "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FINNISH_FINLAND,           "fi" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_FRANCE,             "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_BELGIUM,            "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_CANADA,             "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_SWITZERLAND,        "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_LUXEMBOURG,         "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_MONACO,             "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_HEBREW_ISRAEL,             "he" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_HUNGARIAN_HUNGARY,         "hu" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ICELANDIC_ICELAND,         "is" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ITALIAN_ITALY,             "it" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ITALIAN_SWITZERLAND,       "it" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_JAPANESE_JAPAN,            "ja" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA,"ko" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KOREAN_JOHAB_KOREA,        "ko" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_DUTCH_NETHERLANDS,         "nl" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_DUTCH_BELGIUM,             "nl" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL,   "no" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK,  "nn" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_POLISH_POLAND,             "pl" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_PORTUGUESE_BRAZIL,         "pt" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_PORTUGUESE_PORTUGAL,       "pt" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND,"rm" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ROMANIAN_ROMANIA,          "ro" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MOLDAVIAN_MOLDAVIA,        "mo" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_RUSSIAN_RUSSIA,            "ru" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_RUSSIAN_MOLDAVIA,          "ru" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CROATIAN_CROATIA,          "hr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SERBIAN_SERBIA_LATIN,      "sr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC,   "sr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SLOVAK_SLOVAKIA,           "sk" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ALBANIAN_ALBANIA,          "sq" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SWEDISH_SWEDEN,            "sv" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SWEDISH_FINLAND,           "sv" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_THAI_THAILAND,             "th" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TURKISH_TURKEY,            "tr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_URDU_PAKISTAN,             "ur" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_INDONESIAN_INDONESIA,      "id" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_UKRAINIAN_UKRAINE,         "uk" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_BELARUSIAN_BELARUS,        "be" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SLOVENE_SLOVENIA,          "sl" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ESTONIAN_ESTONIA,          "et" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_LATVIAN_LATVIA,            "lv" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_LITHUANIAN_LITHUANIA,      "lt" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA,"lt" },
+
+#ifdef TT_MS_LANGID_MAORI_NEW_ZELAND
+    /* this seems to be an error that have been dropped */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MAORI_NEW_ZEALAND,         "mi" },
+#endif
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FARSI_IRAN,                "fa" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_VIETNAMESE_VIET_NAM,       "vi" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARMENIAN_ARMENIA,          "hy" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN,    "az" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC, "az" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_BASQUE_SPAIN,              "eu" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SORBIAN_GERMANY,           "wen" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MACEDONIAN_MACEDONIA,      "mk" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SUTU_SOUTH_AFRICA,         "st" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TSONGA_SOUTH_AFRICA,       "ts" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TSWANA_SOUTH_AFRICA,       "tn" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_VENDA_SOUTH_AFRICA,        "ven" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_XHOSA_SOUTH_AFRICA,        "xh" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ZULU_SOUTH_AFRICA,         "zu" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA,    "af" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GEORGIAN_GEORGIA,          "ka" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS,   "fo" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_HINDI_INDIA,               "hi" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MALTESE_MALTA,             "mt" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SAAMI_LAPONIA,             "se" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM,"gd" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_IRISH_GAELIC_IRELAND,      "ga" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MALAY_MALAYSIA,            "ms" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM,   "ms" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KAZAK_KAZAKSTAN,           "kk" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SWAHILI_KENYA,             "sw" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN,    "uz" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC, "uz" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TATAR_TATARSTAN,           "tt" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_BENGALI_INDIA,             "bn" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_PUNJABI_INDIA,             "pa" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GUJARATI_INDIA,            "gu" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ORIYA_INDIA,               "or" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TAMIL_INDIA,               "ta" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TELUGU_INDIA,              "te" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KANNADA_INDIA,             "kn" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MALAYALAM_INDIA,           "ml" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ASSAMESE_INDIA,            "as" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MARATHI_INDIA,             "mr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SANSKRIT_INDIA,            "sa" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KONKANI_INDIA,             "kok" },
+
+  /* new as of 2001-01-01 */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ARABIC_GENERAL,            "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CHINESE_GENERAL,           "zh" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_GENERAL,           "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_WEST_INDIES,        "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_REUNION,            "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_CONGO,              "fr" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_SENEGAL,            "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_CAMEROON,           "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_COTE_D_IVOIRE,      "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_MALI,               "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA,"bs" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_URDU_INDIA,                "ur" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TAJIK_TAJIKISTAN,          "tg" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_YIDDISH_GERMANY,           "yi" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN,       "ky" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TURKMEN_TURKMENISTAN,      "tk" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MONGOLIAN_MONGOLIA,        "mn" },
+
+  /* the following seems to be inconsistent;
+     here is the current "official" way: */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TIBETAN_BHUTAN,            "bo" },
+  /* and here is what is used by Passport SDK */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TIBETAN_CHINA,             "bo" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_DZONGHKA_BHUTAN,           "dz" },
+  /* end of inconsistency */
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_WELSH_WALES,               "cy" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KHMER_CAMBODIA,            "km" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_LAO_LAOS,                  "lo" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_BURMESE_MYANMAR,           "my" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GALICIAN_SPAIN,            "gl" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MANIPURI_INDIA,            "mni" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SINDHI_INDIA,              "sd" },
+  /* the following one is only encountered in Microsoft RTF specification */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KASHMIRI_PAKISTAN,         "ks" },
+  /* the following one is not in the Passport list, looks like an omission */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KASHMIRI_INDIA,            "ks" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_NEPALI_NEPAL,              "ne" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_NEPALI_INDIA,              "ne" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRISIAN_NETHERLANDS,       "fy" },
+
+  /* new as of 2001-03-01 (from Office Xp) */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_HONG_KONG,         "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_INDIA,             "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_MALAYSIA,          "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_ENGLISH_SINGAPORE,         "en" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SYRIAC_SYRIA,              "syr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SINHALESE_SRI_LANKA,       "si" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_CHEROKEE_UNITED_STATES,    "chr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_INUKTITUT_CANADA,          "iu" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_AMHARIC_ETHIOPIA,          "am" },
+#if 0
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TAMAZIGHT_MOROCCO },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN },
+#endif
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_PASHTO_AFGHANISTAN,        "ps" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FILIPINO_PHILIPPINES,      "phi" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_DHIVEHI_MALDIVES,          "div" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_OROMO_ETHIOPIA,            "om" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TIGRIGNA_ETHIOPIA,         "ti" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_TIGRIGNA_ERYTHREA,         "ti" },
+
+  /* New additions from Windows Xp/Passport SDK 2001-11-10. */
+
+  /* don't ask what this one means... It is commented out currently. */
+#if 0
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GREEK_GREECE2 },
+#endif
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_UNITED_STATES,     "es" },
+  /* The following two IDs blatantly violate MS specs by using a */
+  /* sublanguage >,.                                         */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SPANISH_LATIN_AMERICA,     "es" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_NORTH_AFRICA,       "fr" },
+
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_MOROCCO,            "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FRENCH_HAITI,              "fr" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_BENGALI_BANGLADESH,        "bn" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN,   "ar" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN,"mn" },
+#if 0
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_EDO_NIGERIA },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_FULFULDE_NIGERIA },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_IBIBIO_NIGERIA },
+#endif
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_HAUSA_NIGERIA,             "ha" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_YORUBA_NIGERIA,            "yo" },
+  /* language codes from, to, are (still) unknown. */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_IGBO_NIGERIA,              "ibo" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_KANURI_NIGERIA,            "kau" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_GUARANI_PARAGUAY,          "gn" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_HAWAIIAN_UNITED_STATES,    "haw" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_LATIN,                     "la" },
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_SOMALI_SOMALIA,            "so" },
+#if 0
+  /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */
+  /*       not written (but OTOH the peculiar writing system is worth     */
+  /*       studying).                                                     */
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_YI_CHINA },
+#endif
+ {  TT_PLATFORM_MICROSOFT,      TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES,"pap" },
+};
+
+static const char *
+FcSfntNameLanguage (FT_SfntName *sname)
+{
+    int i;
+    FT_UShort platform_id = sname->platform_id;
+    FT_UShort language_id = sname->language_id;
+
+    for (i = 0; i < G_N_ELEMENTS (ftLanguage); i++)
+        if (ftLanguage[i].platform_id == platform_id &&
+            (ftLanguage[i].language_id == TT_LANGUAGE_DONT_CARE ||
+             ftLanguage[i].language_id == language_id))
+        {
+            if (ftLanguage[i].lang[0] == '\0')
+              return NULL;
+            else
+              return ftLanguage[i].lang;
+        }
+    return NULL;
+}
+
+static char *
+FcSfntNameTranscode (FT_SfntName *name)
+{
+    int        i;
+    const char *fromcode;
+
+    for (i = 0; i < G_N_ELEMENTS (ftEncoding); i++)
+        if (ftEncoding[i].platform_id == name->platform_id &&
+            (ftEncoding[i].encoding_id == TT_ENCODING_DONT_CARE ||
+             ftEncoding[i].encoding_id == name->encoding_id))
+            break;
+    if (i == G_N_ELEMENTS (ftEncoding))
+        return  NULL;
+    fromcode = ftEncoding[i].fromcode;
+
+    return g_convert ((const char *)name->string, name->string_len, "UTF-8", fromcode, NULL, NULL, NULL);
+}
+
+static char *
+get_sfnt_name (FT_Face ft_face,
+               guint   nameid)
+{
+  guint count;
+  guint i, j;
+  const char * const *langs = g_get_language_names ();
+  char *res = NULL;
+  guint pos = G_MAXUINT;
+
+  count = FT_Get_Sfnt_Name_Count (ft_face);
+  for (i = 0; i < count; i++)
+    {
+      FT_SfntName name;
+      const char *lang;
+
+      if (FT_Get_Sfnt_Name (ft_face, i, &name) != 0)
+        continue;
+
+      if (name.name_id != nameid)
+        continue;
+
+      lang = FcSfntNameLanguage (&name);
+      for (j = 0; j < pos && langs[j]; j++)
+        {
+          if (strcmp (lang, langs[j]) == 0)
+            {
+              pos = j;
+              g_free (res);
+              res = FcSfntNameTranscode (&name);
+            }
+        }
+
+      if (pos == 0)
+        break;
+    }
+
+  return res;
+}
+
+static gboolean
+is_valid_subfamily_id (guint id)
+{
+  return id == 2 || id == 17 || (255 < id && id < 32768);
+}
+
+static void
+add_instance (FT_Face             ft_face,
+              FT_MM_Var          *ft_mm_var,
+              FT_Var_Named_Style *ns,
+              GtkWidget          *combo,
+              int                 pos)
+{
+  Instance *instance;
+  int i;
+
+  instance = g_new0 (Instance, 1);
+
+  if (is_valid_subfamily_id (ns->strid))
+    instance->name = get_sfnt_name (ft_face, ns->strid);
+  if (!instance->name)
+    instance->name = g_strdup_printf ("Instance %d", pos);
+
+  g_hash_table_add (instances, instance);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), instance->name);
+
+  instance->n_axes = ft_mm_var->num_axis;
+  instance->axes = g_new (guint32, ft_mm_var->num_axis);
+  instance->coords = g_new (float, ft_mm_var->num_axis);
+
+  for (i = 0; i < ft_mm_var->num_axis; i++)
+    {
+      instance->axes[i] = ft_mm_var->axis[i].tag;
+      instance->coords[i] = FixedToFloat(ns->coords[i]);
+    }
+}
+
+static void
+unset_instance (GtkAdjustment *adjustment)
+{
+  if (instance_combo)
+    gtk_combo_box_set_active (GTK_COMBO_BOX (instance_combo), 0);
+}
+
+static void
+instance_changed (GtkComboBox *combo)
+{
+  char *text;
+  Instance *instance;
+  Instance ikey;
+  int i;
+
+  text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo));
+  if (text[0] == '\0')
+    goto out;
+
+  ikey.name = text;
+  instance = g_hash_table_lookup (instances, &ikey);
+  if (!instance)
+    {
+      g_print ("did not find instance %s\n", text);
+      goto out;
+    }
+
+  for (i = 0; i < instance->n_axes; i++)
+    {
+      Axis *axis;
+      Axis akey;
+      guint32 tag;
+      gdouble value;
+
+      tag = instance->axes[i];
+      value = instance->coords[i];
+
+      akey.tag = tag;
+      axis = g_hash_table_lookup (axes, &akey);
+      if (axis)
+        {
+          g_signal_handlers_block_by_func (axis->adjustment, unset_instance, NULL);
+          gtk_adjustment_set_value (axis->adjustment, value);
+          g_signal_handlers_unblock_by_func (axis->adjustment, unset_instance, NULL);
+        }
+    }
+
+out:
+  g_free (text);
+}
+
+static void
+update_font_variations (void)
+{
+  GtkWidget *child, *next;
+  PangoFont *pango_font;
+  FT_Face ft_face;
+  FT_MM_Var *ft_mm_var;
+  FT_Error ret;
+
+  child = gtk_widget_get_first_child (variations_grid);
+  while (child != NULL)
+    {
+      next = gtk_widget_get_next_sibling (child);
+      gtk_widget_destroy (child);
+      child = next;
+    }
+
+  instance_combo = NULL;
+
+  g_hash_table_remove_all (axes);
+  g_hash_table_remove_all (instances);
+
+  pango_font = get_pango_font ();
+  ft_face = pango_fc_font_lock_face (PANGO_FC_FONT (pango_font)),
+
+  ret = FT_Get_MM_Var (ft_face, &ft_mm_var);
+  if (ret == 0)
+    {
+      unsigned int i;
+      FT_Fixed *coords;
+
+      if (ft_mm_var->num_namedstyles > 0)
+        {
+           GtkWidget *label;
+           GtkWidget *combo;
+
+           label = gtk_label_new ("Instance");
+           gtk_label_set_xalign (GTK_LABEL (label), 0);
+           gtk_widget_set_halign (label, GTK_ALIGN_START);
+           gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
+           gtk_grid_attach (GTK_GRID (variations_grid), label, 0, -1, 2, 1);
+
+           combo = gtk_combo_box_text_new ();
+           gtk_widget_set_valign (combo, GTK_ALIGN_BASELINE);
+           g_signal_connect (combo, "changed", G_CALLBACK (instance_changed), NULL);
+           gtk_grid_attach (GTK_GRID (variations_grid), combo, 1, -1, 2, 1);
+
+           gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "");
+
+           for (i = 0; i < ft_mm_var->num_namedstyles; i++)
+             add_instance (ft_face, ft_mm_var, &ft_mm_var->namedstyle[i], combo, i);
+
+           instance_combo = combo;
+        }
+
+      coords = g_new (FT_Fixed, ft_mm_var->num_axis);
+      ret = FT_Get_Var_Design_Coordinates (ft_face, ft_mm_var->num_axis, coords);
+      if (ret == 0)
+        {
+          for (i = 0; i < ft_mm_var->num_axis; i++)
+            add_axis (&ft_mm_var->axis[i], coords[i], i);
+        }
+      g_free (coords);
+      free (ft_mm_var);
+    }
+
+  pango_fc_font_unlock_face (PANGO_FC_FONT (pango_font));
+  g_object_unref (pango_font);
+}
+
 static void
 font_changed (void)
 {
   update_script_combo ();
+  update_font_variations ();
 }
 
 static void
@@ -494,6 +1341,7 @@ do_font_features (GtkWidget *do_widget)
       window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
       label = GTK_WIDGET (gtk_builder_get_object (builder, "label"));
       settings = GTK_WIDGET (gtk_builder_get_object (builder, "settings"));
+      description = GTK_WIDGET (gtk_builder_get_object (builder, "description"));
       resetbutton = GTK_WIDGET (gtk_builder_get_object (builder, "reset"));
       font = GTK_WIDGET (gtk_builder_get_object (builder, "font"));
       script_lang = GTK_WIDGET (gtk_builder_get_object (builder, "script_lang"));
@@ -513,6 +1361,18 @@ do_font_features (GtkWidget *do_widget)
           g_free (iname);
         }
 
+      variations_heading = GTK_WIDGET (gtk_builder_get_object (builder, "variations_heading"));
+      variations_grid = GTK_WIDGET (gtk_builder_get_object (builder, "variations_grid"));
+      if (instances == NULL)
+        instances = g_hash_table_new_full (instance_hash, instance_equal, NULL, free_instance);
+      else
+        g_hash_table_remove_all (instances);
+
+      if (axes == NULL)
+        axes = g_hash_table_new_full (axes_hash, axes_equal, NULL, g_free);
+      else
+        g_hash_table_remove_all (axes);
+
       font_changed ();
 
       g_signal_connect (window, "destroy",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]