summaryrefslogtreecommitdiff
path: root/gtkui
diff options
context:
space:
mode:
authorpfaedit <pfaedit>2007-12-31 00:22:50 +0000
committerpfaedit <pfaedit>2007-12-31 00:22:50 +0000
commitf503974bf8084663bc289289f0fb1a48b8903b7d (patch)
tree4407eb00be0a2fbe6fb228d4d7b4bb63be5721fe /gtkui
parent17ff7e07e7599045aa6815014f7a59110f044b85 (diff)
Hey, it basically works. It'll display a fontview.
Nothing else though.
Diffstat (limited to 'gtkui')
-rw-r--r--gtkui/callbacks.h2176
-rw-r--r--gtkui/cursors.c906
-rw-r--r--gtkui/ff_interface.c4157
-rw-r--r--gtkui/fontforge.glade609
-rw-r--r--gtkui/fontforgegtk.h82
-rw-r--r--gtkui/fontview.c5676
-rw-r--r--gtkui/gwwvask.c132
-rw-r--r--gtkui/gwwvask.h11
-rw-r--r--gtkui/gwwvmenubar.c5
-rw-r--r--gtkui/interface.h12
-rw-r--r--gtkui/openfontdlg.c321
-rw-r--r--gtkui/prefs.c1024
-rw-r--r--gtkui/stamp.c5
-rw-r--r--gtkui/startgtk.c696
-rw-r--r--gtkui/stubs.c316
-rw-r--r--gtkui/support.c172
-rw-r--r--gtkui/support.h47
-rw-r--r--gtkui/uiutil.c637
-rw-r--r--gtkui/viewsgtk.h895
-rw-r--r--gtkui/windowmenu.c225
20 files changed, 17943 insertions, 161 deletions
diff --git a/gtkui/callbacks.h b/gtkui/callbacks.h
new file mode 100644
index 00000000..01d33e3c
--- /dev/null
+++ b/gtkui/callbacks.h
@@ -0,0 +1,2176 @@
+#include <gtk/gtk.h>
+
+
+gboolean
+FontView_Char (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer user_data);
+
+gboolean
+FontView_RequestClose (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data);
+
+gboolean
+FontView_DestroyWindow (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data);
+
+gboolean
+FontView_Resize (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data);
+
+gboolean
+FontView_ClearSelection (GtkWidget *widget,
+ GdkEventSelection *event,
+ gpointer user_data);
+
+void
+FontView_Realize (GtkWidget *widget,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateFile (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+Menu_New (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+Menu_Open (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+RecentMenuBuild (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Close (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Save (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SaveAs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+Menu_SaveAll (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Generate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_GenerateFamily (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Import (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_MergeKern (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RevertFile (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RevertToBackup (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RevertGlyph (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Print (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ExecScript (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+ScriptMenuBuild (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+Menu_Preferences (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+Menu_Quit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateEdit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Undo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Redo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Cut (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Copy (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyRef (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyLookupData (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyVWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyLBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyRBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Paste (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_PasteInto (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_PasteAfter (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SameGlyphAs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Clear (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ClearBackground (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyFg2Bg (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Join (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectAll (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_InvertSelection (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_DeselectAll (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectDefault (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectWhite (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectRed (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectGreen (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectBlue (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectYellow (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectCyan (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectMagenta (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectColorPicker (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectByName (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectByScript (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectWorthOutputting (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectChangedGlyphs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectUnhintedGlyphs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectAutohintable (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SelectByLookupSubtable (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_FindRpl (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RplRef (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_UnlinkRef (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateCopyFrom (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyFromAll (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyFromDisplayed (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyFromMetadata (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CopyFromTTInstrs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveUndoes (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateElement (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_FontInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CharInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_MathInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_BDFInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateDependents (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ShowDependentRefs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ShowDependentSubs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_GlyphRename (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_FindProbs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Validate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_BitmapsAvail (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RegenBitmaps (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveBitmapGlyphs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ChangeWeight (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Oblique (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Condense (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Inline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Outline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Shadow (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_WireFrame (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateTransformations (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Transform (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_PointOfView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_NonLinearTransform (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ExpandStroke (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_TilePath (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveOverlap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Intersect (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_FindInter (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Simplify (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SimplifyMore (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Cleanup (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CanonicalStart (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CanonicalContours (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AddExtrema (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RoundToInt (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RoundToHundredths (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Cluster (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Autotrace (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CorrectDir (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateBuild (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_BuildAccented (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_BuildComposite (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_MergeFonts (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Interpolate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CompareFonts (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontView_ToolsActivate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateHints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AutoHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AutoHintSubsPts (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AutoCounter (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_DontAutoHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AutoInstr (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_EditInstrs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_EditTable (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_PrivateToCvt (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ClearHints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ClearInstrs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Histograms (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_BuildReencode (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Compact (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_BuildForceEncoding (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AddEncodingSlots (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveUnusedSlots (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_DetachGlyphs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_DetachAndRemoveGlyphs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AddEncodingName (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_LoadEncoding (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_MakeFromFont (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveEncoding (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_DisplayByGroups (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_DefineGroups (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SaveNamelist (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_LoadNamelist (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RenameByNamelist (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CreateNamedGlyphs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ChangeChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Goto (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ShowAtt (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_DisplaySubstitutions (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateCombinations (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_KernPairs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateAnchoredPairs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Ligatures (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_GlyphLabel (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ShowMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_WindowSize (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_PixelSize (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_BitmapMagnification (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CenterWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ThirdsWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_SetWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AutoWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_AutoKern (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_KernClasses (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveKP (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_KernPairCloseup (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_VKernClasses (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_VKernFromH (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveVKP (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateCID (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Convert2CID (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ConvertByCMap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Flatten (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_FlattenByCMap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CIDInsertFont (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CIDInsertEmptyFont (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_RemoveFontFromCID (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ChangeSupplement (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CIDFontInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ActivateMM (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_CreateMM (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_MMValid (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_MMInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_Blend (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ChangeDefWeights (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+Menu_ActivateWindows (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_OpenOutline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_OpenBitmap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_OpenMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+WindowMenu_Warnings (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ContextualHelp (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MenuHelp_Help (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MenuHelp_Index (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MenuHelp_About (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MenuHelp_License (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+gboolean
+FontView_StatusExpose (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data);
+
+gboolean
+FontViewView_Mouse (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data);
+
+gboolean
+FontViewView_Resize (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data);
+
+gboolean
+FontViewView_Expose (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data);
+
+void
+FontView_VScroll (GtkRange *range,
+ gpointer user_data);
+
+gboolean
+SplashDismiss (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data);
+
+gboolean
+CharView_Char (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateFile (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Close (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Save (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SaveAs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Generate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_GenerateFamily (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Export (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Import (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RevertFile (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RevertGlyph (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Print (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Display (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateEdit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Undo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Redo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Cut (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Copy (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyRef (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyVWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyLBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyRBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyFeatures (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Paste (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Clear (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ClearBackground (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Merge (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Elide (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Join (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyFg2Bg (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CopyGridFit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_UnlinkRef (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RemoveUndoes (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivatePoints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Curve (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Corner (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Tangent (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Interpolated (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NotInterpolated (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateSelect (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectAll (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_InvertSelection (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectNone (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_FirstPoint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+on_first_point__next_contour1_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NextPoint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_PrevPoint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NextCP (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_PrevCP (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Contours (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectPointAt (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectAllPtsRefs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectAnchors (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectVWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SelectHM (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_MakeFirst (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AddAnchor (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_MakeLine (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CenterCPs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateElement (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_FontInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CharInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_GetInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateDependents (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_References (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ShowDepSubs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_FindProbs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_BitmapsAvail (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RegenBitmaps (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateTransform (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Transform (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_POV (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NonLinearTransform (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ExpandStroke (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_TilePath (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateOverlap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RemoveOverlap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Intersect (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Exclude (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_FindInter (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateSimplify (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Simplify (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SimplifyMore (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Cleanup (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AddExtrema (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateEffects (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Inline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Outline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Shadow (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Wireframe (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Metafont (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Autotrace (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateAlign (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AveragePoints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SpacePoints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SpaceRegions (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_MakeParallel (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RoundActivate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Round2Int (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Round2Hundredths (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Cluster (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateOrder (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_OrderFirst (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_OrderEarlier (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_OrderLater (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_OrderLast (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Clockwise (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CounterClockwise (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CorrectDir (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_BuildAccented (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_BuildComposite (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateHints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AutoHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_HintSubsPts (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AutoCounter (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_DontAutoHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AutoInstr (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_EditInstrs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Debug (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ClearHStem (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ClearVStem (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ClearInstrs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AddHHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AddVHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CreateHHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CreateVHint (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ReviewHints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Fit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ZoomOut (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ZoomIn (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NextChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_PrevChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NextDefChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_PrevDefChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_FormerGlyph (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Goto (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_FindInFontView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ShowPoints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActiveNumPoints (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NumPtsNone (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NumPtsTrueType (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NumPtsPS (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_NumPtsSvg (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_MarkExtrema (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_MarkPOI (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Fill (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_GridFit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateCombinations (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_KernPairs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AllAnchoredPairs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Ligatures (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivatePalettes (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ToolPalettes (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_LayersPalettes (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_DockPalettes (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ShowRulers (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_ActivateMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_CenterWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Thirds (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SetWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SetLBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SetRBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_SetVAdvance (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RemoveKP (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_RemoveVKP (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_KPCloseup (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_AnchorControl (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_MMActivate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_Reblend (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_MMViewActivate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_OpenOutline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_OpenBitmap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+CharViewMenu_OpenMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+gboolean
+CharView_StatusExpose (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data);
+
+gboolean
+CVTools_Expose (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data);
+
+gboolean
+CVTools_Char (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer user_data);
+
+gboolean
+CVTools_Mouse (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data);
+
+gboolean
+CVTools_MouseMotion (GtkWidget *widget,
+ GdkEventMotion *event,
+ gpointer user_data);
+
+void
+CharView_ForeVisible (GtkToggleButton *togglebutton,
+ gpointer user_data);
+
+void
+CharView_BackVisible (GtkToggleButton *togglebutton,
+ gpointer user_data);
+
+void
+CharView_GuideVisible (GtkToggleButton *togglebutton,
+ gpointer user_data);
+
+void
+CharView_HHintsVisible (GtkToggleButton *togglebutton,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateFile (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Close (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Save (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_SaveAs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Generate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_GenerateFamily (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_MergeKern (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Print (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Display (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateEdit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Undo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Redo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Cut (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Copy (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CopyRef (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CopyWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CopyVWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CopyLBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CopyRBearing (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Paste (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_SaveGlyphAs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Clear (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Join (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_UnlinkRef (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateElement (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_FontInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CharInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateDependents (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_References (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ShowDepSubs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_FindProbs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_BitmapsAvail (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_RegenBitmaps (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateTransformations
+ (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Transform (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_PointOfView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_NonLinearTransform (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ExpandStroke (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateOverlap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_RemoveOverlap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Intersect (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_FindInter (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateSimplify (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Simplify (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_SimplifyMore (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Cleanup (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_AddExtrema (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Round2Int (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_RoundToHundredths (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Cluster (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateEffects (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Inline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Outline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Shadow (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Wireframe (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Metafont (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Autotrace (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CorrectDir (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_BuildAccented (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_BuildComposite (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ZoomOut (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ZoomIn (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_InsertCharAfter (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_InsCharBefore (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ReplaceGlyph (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Subs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_NextChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_PrevChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_NextDefChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_PrevDefChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+on_find_in_fontview2_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Goto (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateCombinations (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_KernPairs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_AllAnchoredPairs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Ligatures (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ShowGrid (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_AntiAlias (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+on_vertical1_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_ActivateMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_CenterWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_Thirds (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_KernClasses (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_VKernClasses (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_VKernFromH (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_KernPair (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_OpenOutline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_OpenBitmap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+MetricsViewMenu_OpenMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ActivateFile (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Close (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Save (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_SaveAs (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Generate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_GenerateFamily (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Export (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Import (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_RevertFile (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ActivateEdit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Undo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Redo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Cut (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Copy (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Paste (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Clear (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_SelectAll (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_RemoveUndoes (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ActivateElement (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_FontInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_CharInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_BDFInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_BitmapsAvail (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_RegenBitmaps (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_TransformActiveate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_FlipH (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_FlipVert (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Rotate90CW (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Rotate90CCW (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Rotate180 (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Skew (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ActivateView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Fit (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ZoomOut (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ZoomIn (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_NextChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_PrevChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_NextDefChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_PrevDefChar (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_Goto (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_FindInFontView (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_BiggerPixel (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_SmallerPixel (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_PaletteActivate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ToolsPalette (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_LayersPalette (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ShaePalette (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_DockedPalette (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_ActivateMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_SetWidth (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_OpenOutline (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_OpenBitmap (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+BitmapViewMenu_OpenMetrics (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+gboolean
+BitmapView_StatusExpose (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data);
+
+void
+on_sans_serif1_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
+void
+FontViewMenu_ToolsActivate (GtkMenuItem *menuitem,
+ gpointer user_data);
diff --git a/gtkui/cursors.c b/gtkui/cursors.c
new file mode 100644
index 00000000..30601b8e
--- /dev/null
+++ b/gtkui/cursors.c
@@ -0,0 +1,906 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "fontforgegtk.h"
+
+#ifndef _CursorsMustBe16x16
+# define _CursorsMustBe16x16 0 /* X on Mac OSX can't handle anything bigger than 16x16 cursors (I think, it seems to manage smaller ones) */
+#endif
+
+GdkCursor *ct_magplus, *ct_magminus, *ct_mypointer, *ct_circle, *ct_square, *ct_triangle,
+ *ct_ruler, *ct_pen, *ct_knife, *ct_rotate, *ct_skew, *ct_scale, *ct_flip,
+ *ct_3drotate, *ct_perspective, *ct_hvcircle, *ct_g2circle;
+GdkCursor *ct_rect, *ct_elipse, *ct_poly, *ct_star, *ct_pencil, *ct_shift, *ct_line,
+ *ct_myhand, *ct_filledrect, *ct_filledelipse, *ct_setwidth, *ct_eyedropper;
+GdkCursor *ct_updown, *ct_leftright, *ct_nesw, *ct_nwse;
+GdkCursor *ct_rbearing, *ct_kerning, *ct_lbearing;
+GdkCursor *ct_prohibition, *ct_ddcursor;
+GdkCursor *ct_spiroleft, *ct_spiroright;
+GdkCursor *ct_pointer, *ct_backpointer, *ct_hand,
+ *ct_question, *ct_cross, *ct_4way, *ct_text, *ct_watch, *ct_draganddrop,
+ *ct_invisible;
+
+#define magplus_width 16
+#define magplus_height 16
+#define magplus_x_hot 5
+#define magplus_y_hot 5
+static unsigned char magplus_bits[] = {
+ 0xf8, 0x00, 0x06, 0x03, 0x22, 0x02, 0x21, 0x04, 0x21, 0x04, 0xfd, 0x05,
+ 0x21, 0x04, 0x21, 0x04, 0x22, 0x02, 0x06, 0x03, 0xf8, 0x04, 0x00, 0x08,
+ 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80};
+#define magminus_width 16
+#define magminus_height 16
+#define magminus_x_hot 5
+#define magminus_y_hot 5
+static unsigned char magminus_bits[] = {
+ 0xf8, 0x00, 0x06, 0x03, 0x02, 0x02, 0x01, 0x04, 0x01, 0x04, 0xfd, 0x05,
+ 0x01, 0x04, 0x01, 0x04, 0x02, 0x02, 0x06, 0x03, 0xf8, 0x04, 0x00, 0x08,
+ 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80};
+#if 0
+#define magmask_width 16
+#define magmask_height 16
+static unsigned char magmask_bits[] = {
+ 0xf8, 0x00, 0xfe, 0x03, 0x26, 0x03, 0x23, 0x06, 0x23, 0x06, 0xff, 0x07,
+ 0x23, 0x06, 0x23, 0x06, 0x26, 0x03, 0xfe, 0x07, 0xf8, 0x0e, 0x00, 0x1c,
+ 0x00, 0x38, 0x00, 0x70, 0x00, 0xe0, 0x00, 0xc0};
+#endif
+#if _CursorsMustBe16x16
+#define pointertri_width 16
+#define pointertri_height 16
+#define pointertri_x_hot 1
+#define pointertri_y_hot 0
+static unsigned char pointertri_bits[] = {
+ 0x02, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x7e, 0x00,
+ 0xfe, 0x00, 0xfe, 0x01, 0x3e, 0x00, 0x36, 0x10, 0x62, 0x30, 0x60, 0x70,
+ 0xc0, 0xf0, 0xc0, 0x70, 0x80, 0x31, 0x80, 0x11};
+#define pointertrimask_width 16
+#define pointertrimask_height 16
+static unsigned char pointertrimask_bits[] = {
+ 0x02, 0x00, 0x06, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00,
+ 0xff, 0x01, 0xff, 0x03, 0xff, 0x03, 0x3f, 0x10, 0x67, 0x30, 0x63, 0x70,
+ 0xc0, 0xf0, 0xc0, 0x70, 0x80, 0x31, 0x80, 0x11};
+#define pointersqr_width 16
+#define pointersqr_height 16
+#define pointersqr_x_hot 2
+#define pointersqr_y_hot 0
+static unsigned char pointersqr_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x00,
+ 0x80, 0xf1, 0x80, 0xf1, 0x00, 0xf3, 0x00, 0xf3};
+#define pointersqrmask_width 16
+#define pointersqrmask_height 16
+static unsigned char pointersqrmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0x7e, 0x00, 0xde, 0x00, 0xc6, 0x00,
+ 0x80, 0xf1, 0x80, 0xf1, 0x00, 0xf3, 0x00, 0xf3};
+#define pointercirc_width 16
+#define pointercirc_height 16
+#define pointercirc_x_hot 2
+#define pointercirc_y_hot 0
+static unsigned char pointercirc_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x70,
+ 0x80, 0xf9, 0x80, 0xf9, 0x00, 0xfb, 0x00, 0x73};
+#define pointercircmask_width 16
+#define pointercircmask_height 16
+static unsigned char pointercircmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0x7e, 0x00, 0xce, 0x00, 0xc6, 0x70,
+ 0x80, 0xf9, 0x80, 0xf9, 0x00, 0xfb, 0x00, 0x73};
+#define pointerhvcirc_width 16
+#define pointerhvcirc_height 16
+#define pointerhvcirc_x_hot 2
+#define pointerhvcirc_y_hot 0
+static unsigned char pointerhvcirc_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x70,
+ 0x80, 0xf9, 0x80, 0xf9, 0x00, 0xfb, 0x00, 0x73};
+#define pointerhvcircmask_width 16
+#define pointerhvcircmask_height 16
+static unsigned char pointerhvcircmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0x7e, 0x00, 0xce, 0x00, 0xc6, 0x70,
+ 0x80, 0xf9, 0x80, 0xf9, 0x00, 0xfb, 0x00, 0x73};
+#define pointerright_width 16
+#define pointerright_height 16
+#define pointerright_x_hot 2
+#define pointerright_y_hot 0
+static unsigned char pointerright_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0xf0, 0xc4, 0xf0, 0xc0, 0x30,
+ 0x80, 0x31, 0x80, 0x31, 0x00, 0xf3, 0x00, 0xf3};
+#define pointerrightmask_width 16
+#define pointerrightmask_height 16
+static unsigned char pointerrightmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0x7e, 0xf0, 0xce, 0xf0, 0xc6, 0x30,
+ 0x80, 0x31, 0x80, 0x31, 0x00, 0xf3, 0x00, 0xf3};
+#define pointerleft_width 16
+#define pointerleft_height 16
+#define pointerleft_x_hot 2
+#define pointerleft_y_hot 0
+static unsigned char pointerleft_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0xf0, 0xc4, 0xf0, 0xc0, 0xc0,
+ 0x80, 0xc1, 0x80, 0xc1, 0x00, 0xf3, 0x00, 0xf3};
+#define pointerleftmask_width 16
+#define pointerleftmask_height 16
+static unsigned char pointerleftmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0x7e, 0xf0, 0xce, 0xf0, 0xc6, 0xc0,
+ 0x80, 0xc1, 0x80, 0xc1, 0x00, 0xf3, 0x00, 0xf3};
+#else
+#define pointertri_width 16
+#define pointertri_height 24
+#define pointertri_x_hot 2
+#define pointertri_y_hot 0
+static unsigned char pointertri_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x00,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x08, 0x00, 0x1c,
+ 0x00, 0x3e, 0x00, 0x7f, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define pointertrimask_width 16
+#define pointertrimask_height 24
+static unsigned char pointertrimask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0xfe, 0x00, 0xee, 0x01, 0xe6, 0x01,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x07, 0x80, 0x07, 0x00, 0x0b, 0x00, 0x1c,
+ 0x00, 0x3e, 0x00, 0x7f, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define pointersqr_width 16
+#define pointersqr_height 24
+#define pointersqr_x_hot 2
+#define pointersqr_y_hot 0
+static unsigned char pointersqr_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x00,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x7c,
+ 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00};
+#define pointersqrmask_width 16
+#define pointersqrmask_height 24
+static unsigned char pointersqrmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0xfe, 0x00, 0xe6, 0x01, 0xe0, 0x01,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x07, 0x80, 0x07, 0x00, 0x03, 0x00, 0x7c,
+ 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00};
+#define pointercirc_width 16
+#define pointercirc_height 24
+#define pointercirc_x_hot 2
+#define pointercirc_y_hot 0
+static unsigned char pointercirc_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x00,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x38, 0x00, 0x7c,
+ 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x00};
+#define pointercircmask_width 16
+#define pointercircmask_height 24
+static unsigned char pointercircmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0xfe, 0x00, 0xee, 0x01, 0xe6, 0x01,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x07, 0x80, 0x07, 0x00, 0x3b, 0x00, 0x7c,
+ 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x00};
+#define pointerhvcirc_width 32
+#define pointerhvcirc_height 32
+#define pointerhvcirc_x_hot 2
+#define pointerhvcirc_y_hot 0
+static unsigned char pointerhvcirc_bits[] = {
+ 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
+ 0x3c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x80, 0x11, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0xa0, 0xfe, 0x0a, 0x00, 0x00, 0xfe, 0x00, 0x00,
+ 0x00, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define pointerhvcircmask_width 32
+#define pointerhvcircmask_height 32
+static unsigned char pointerhvcircmask_bits[] = {
+ 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00,
+ 0xfe, 0x03, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00,
+ 0xfe, 0x00, 0x00, 0x00, 0xee, 0x01, 0x00, 0x00, 0xe6, 0x01, 0x00, 0x00,
+ 0xc0, 0x13, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x17, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0xa0, 0xfe, 0x0a, 0x00, 0x00, 0xfe, 0x00, 0x00,
+ 0x00, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define pointerg2circ_width 32
+#define pointerg2circ_height 32
+#define pointerg2circ_x_hot 2
+#define pointerg2circ_y_hot 0
+static unsigned char pointerg2circ_bits[] = {
+ 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
+ 0x3c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+ 0x00, 0x13, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x00, 0x00,
+ 0x00, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define pointerg2circmask_width 32
+#define pointerg2circmask_height 32
+static unsigned char pointerg2circmask_bits[] = {
+ 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00,
+ 0xfe, 0x03, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00,
+ 0xfe, 0x00, 0x00, 0x00, 0xee, 0x01, 0x00, 0x00, 0xe6, 0x01, 0x00, 0x00,
+ 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00,
+ 0x80, 0x17, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x00, 0x00,
+ 0x00, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define pointerright_width 16
+#define pointerright_height 24
+#define pointerright_x_hot 2
+#define pointerright_y_hot 0
+static unsigned char pointerright_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x00,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x03, 0x00, 0x7b, 0x00, 0x78, 0x00, 0x60,
+ 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x78, 0x00, 0x78};
+#define pointerrightmask_width 16
+#define pointerrightmask_height 24
+static unsigned char pointerrightmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0xfe, 0x00, 0xee, 0x01, 0xe6, 0x01,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x03, 0x80, 0x7f, 0x00, 0x7f, 0x00, 0x60,
+ 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x78, 0x00, 0x78};
+#define pointerleft_width 16
+#define pointerleft_height 24
+#define pointerleft_x_hot 2
+#define pointerleft_y_hot 0
+static unsigned char pointerleft_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x00,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x03, 0x00, 0x7b, 0x00, 0x78, 0x00, 0x18,
+ 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x78, 0x00, 0x78};
+#define pointerleftmask_width 16
+#define pointerleftmask_height 24
+static unsigned char pointerleftmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0xfe, 0x00, 0xee, 0x01, 0xe6, 0x01,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x03, 0x80, 0x7f, 0x00, 0x7f, 0x00, 0x18,
+ 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x78, 0x00, 0x78};
+#endif
+#define pointercur_width 16
+#define pointercur_height 16
+#define pointercur_x_hot 2
+#define pointercur_y_hot 0
+static unsigned char pointercur_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+ 0xfc, 0x01, 0xfc, 0x03, 0x7c, 0x00, 0x6c, 0x00, 0xc4, 0x00, 0xc0, 0x00,
+ 0x80, 0x01, 0x80, 0x01, 0x00, 0x03, 0x00, 0x03};
+#define pointercurmask_width 16
+#define pointercurmask_height 16
+static unsigned char pointercurmask_bits[] = {
+ 0x04, 0x00, 0x0c, 0x00, 0x3c, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01,
+ 0xfe, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0xfe, 0x00, 0xee, 0x01, 0xe6, 0x01,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x07, 0x80, 0x07};
+#if _CursorsMustBe16x16
+#define rulercur_width 16
+#define rulercur_height 16
+#define rulercur_x_hot 0
+#define rulercur_y_hot 3
+static unsigned char rulercur_bits[] = {
+ 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x3f, 0x40, 0x22, 0x40, 0x24, 0x40,
+ 0x20, 0x40, 0x20, 0x49, 0x20, 0x49, 0x20, 0x49, 0xe0, 0x7f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#else
+#define rulercur_width 24
+#define rulercur_height 12
+#define rulercur_x_hot 0
+#define rulercur_y_hot 3
+static unsigned char rulercur_bits[] = {
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x3f, 0x00, 0x80,
+ 0x22, 0x00, 0x80, 0x24, 0x40, 0x80, 0x20, 0x40, 0x80, 0x20, 0x49, 0x92,
+ 0x20, 0x49, 0x92, 0x20, 0x49, 0x92, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00};
+#endif
+#define pencur_width 16
+#define pencur_height 16
+#define pencur_x_hot 6
+#define pencur_y_hot 0
+static unsigned char pencur_bits[] = {
+ 0x40, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x50, 0x01, 0x50, 0x01, 0x50, 0x01,
+ 0x48, 0x02, 0x48, 0x02, 0x44, 0x04, 0xa4, 0x04, 0x44, 0x04, 0x08, 0x02,
+ 0xf0, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01};
+#define pencurmask_width 16
+#define pencurmask_height 16
+static unsigned char pencurmask_bits[] = {
+ 0x40, 0x00, 0xe0, 0x00, 0xf0, 0x01, 0x58, 0x03, 0x58, 0x03, 0x58, 0x03,
+ 0x4c, 0x06, 0x4c, 0x06, 0x46, 0x0c, 0xe6, 0x0c, 0x46, 0x0c, 0x0c, 0x06,
+ 0xf8, 0x03, 0x18, 0x03, 0x18, 0x03, 0x18, 0x03};
+#define knifecur_width 16
+#define knifecur_height 16
+#define knifecur_x_hot 7
+#define knifecur_y_hot 4
+static unsigned char knifecur_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0x20, 0x40, 0x21, 0x00, 0xee,
+ 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define knifecurmask_width 16
+#define knifecurmask_height 16
+static unsigned char knifecurmask_bits[] = {
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0xf8, 0xff, 0x00, 0xfe,
+ 0x00, 0x7e, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define flipcur_width 16
+#define flipcur_height 16
+#define flipcur_x_hot 8
+#define flipcur_y_hot 8
+static unsigned char flipcur_bits[] = {
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x20, 0x09,
+ 0x20, 0x09, 0x30, 0x11, 0x30, 0x09, 0x28, 0x21, 0x28, 0x09, 0x24, 0x41,
+ 0x3c, 0x69, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00};
+#define flipcurmask_width 16
+#define flipcurmask_height 16
+static unsigned char flipcurmask_bits[] = {
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x20, 0x09,
+ 0x20, 0x09, 0x30, 0x19, 0x30, 0x19, 0x28, 0x29, 0x28, 0x29, 0x24, 0x49,
+ 0x3c, 0x79, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00};
+#define rotatecur_width 16
+#define rotatecur_height 16
+#define rotatecur_x_hot 3
+#define rotatecur_y_hot 12
+static unsigned char rotatecur_bits[] = {
+ 0x08, 0x01, 0x88, 0x07, 0x08, 0x09, 0x08, 0x10, 0x08, 0x20, 0x08, 0x20,
+ 0x08, 0x80, 0x08, 0x60, 0x08, 0x18, 0x08, 0x06, 0x88, 0x01, 0x68, 0x00,
+ 0xff, 0xff, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00};
+#define scalecur_width 16
+#define scalecur_height 16
+#define scalecur_x_hot 0
+#define scalecur_y_hot 15
+static unsigned char scalecur_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x05, 0x00, 0x00, 0x01, 0x04,
+ 0x00, 0x00, 0x7f, 0x04, 0x41, 0x00, 0x41, 0x04, 0x41, 0x00, 0x41, 0x04,
+ 0x41, 0x00, 0x41, 0x04, 0x41, 0x00, 0x7f, 0x05};
+#define scalecurmask_width 16
+#define scalecurmask_height 16
+static unsigned char scalecurmask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x01, 0x04, 0x01, 0x04,
+ 0x01, 0x04, 0x7f, 0x04, 0x41, 0x04, 0x41, 0x04, 0x41, 0x04, 0x41, 0x04,
+ 0x41, 0x04, 0x41, 0x04, 0x41, 0x04, 0xff, 0x07};
+#define skewcur_width 16
+#define skewcur_height 16
+#define skewcur_x_hot 0
+#define skewcur_y_hot 15
+static unsigned char skewcur_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7f, 0x05, 0x41, 0x00, 0x49, 0x02, 0x41, 0x00, 0x45, 0x01,
+ 0x41, 0x00, 0xc3, 0x00, 0x41, 0x00, 0x7f, 0x00};
+#define skewcurmask_width 16
+#define skewcurmask_height 16
+static unsigned char skewcurmask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x07, 0x49, 0x02, 0x49, 0x02, 0x45, 0x01, 0x45, 0x01,
+ 0xc3, 0x00, 0xc3, 0x00, 0x41, 0x00, 0x7f, 0x00};
+#define rotate3dcur_width 16
+#define rotate3dcur_height 16
+#define rotate3dcur_x_hot 1
+#define rotate3dcur_y_hot 13
+static unsigned char rotate3dcur_bits[] = {
+ 0x02, 0x00, 0xfa, 0x00, 0x8a, 0x00, 0x8a, 0x00, 0x8a, 0x00, 0x8a, 0x00,
+ 0x8a, 0x00, 0xfa, 0x00, 0x02, 0x1c, 0xaa, 0x22, 0x02, 0xaa, 0xaa, 0x72,
+ 0x02, 0x22, 0xff, 0x8f, 0x02, 0x02, 0x02, 0x3c};
+#define perspectivecur_width 16
+#define perspectivecur_height 16
+#define perspectivecur_x_hot 0
+#define perspectivecur_y_hot 15
+static unsigned char perspectivecur_bits[] = {
+ 0x41, 0x04, 0x41, 0x04, 0x21, 0x08, 0x21, 0x08, 0x11, 0x10, 0xf1, 0x1f,
+ 0x31, 0x19, 0x29, 0x28, 0xa9, 0x2a, 0x25, 0x48, 0x65, 0x4c, 0x25, 0x48,
+ 0xe3, 0x8f, 0x03, 0x80, 0x01, 0x00, 0xff, 0xff};
+#define setwidthcur_width 16
+#define setwidthcur_height 16
+#define setwidthcur_x_hot 14
+#define setwidthcur_y_hot 7
+static unsigned char setwidthcur_bits[] = {
+ 0x00, 0x00, 0x01, 0x40, 0x00, 0x40, 0x01, 0x40, 0x00, 0x40, 0x09, 0x48,
+ 0x04, 0x50, 0xab, 0x6a, 0x04, 0x50, 0x09, 0x48, 0x00, 0x40, 0x01, 0x40,
+ 0x00, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00};
+/*static unsigned char setwidthmask_bits[] = { */
+/* 0x00, 0x00, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x09, 0x48, */
+/* 0x05, 0x50, 0xff, 0x7f, 0x05, 0x50, 0x09, 0x48, 0x01, 0x40, 0x01, 0x40, */
+/* 0x01, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00}; */
+
+#define updown_width 8
+#define updown_height 15
+#define updown_x_hot 3
+#define updown_y_hot 7
+static unsigned char updown_bits[] = {
+ 0x08, 0x14, 0x36, 0x55, 0x14, 0x14, 0x14, 0x7f, 0x14, 0x14, 0x14, 0x55,
+ 0x36, 0x14, 0x08};
+#define leftright_width 16
+#define leftright_height 9
+#define leftright_x_hot 7
+#define leftright_y_hot 4
+static unsigned char leftright_bits[] = {
+ 0x80, 0x00, 0x88, 0x08, 0x84, 0x10, 0xfe, 0x3f, 0x81, 0x40, 0xfe, 0x3f,
+ 0x84, 0x10, 0x88, 0x08, 0x80, 0x00};
+#define nesw_width 16
+#define nesw_height 15
+#define nesw_x_hot 8
+#define nesw_y_hot 7
+static unsigned char nesw_bits[] = {
+ 0x00, 0xfc, 0x00, 0x90, 0x00, 0x88, 0x10, 0xc4, 0x20, 0xa2, 0x40, 0x91,
+ 0x80, 0x08, 0x40, 0x05, 0x20, 0x02, 0x12, 0x05, 0x8a, 0x08, 0x46, 0x10,
+ 0x22, 0x00, 0x12, 0x00, 0x7e, 0x00};
+#define nwse_width 16
+#define nwse_height 15
+#define nwse_x_hot 8
+#define nwse_y_hot 7
+static unsigned char nwse_bits[] = {
+ 0x7e, 0x00, 0x12, 0x00, 0x22, 0x00, 0x46, 0x10, 0x8a, 0x08, 0x12, 0x05,
+ 0x20, 0x02, 0x40, 0x05, 0x80, 0x08, 0x40, 0x91, 0x20, 0xa2, 0x10, 0xc4,
+ 0x00, 0x88, 0x00, 0x90, 0x00, 0xfc};
+#define rectcur_width 16
+#define rectcur_height 8
+#define rectcur_x_hot 0
+#define rectcur_y_hot 2
+static unsigned char rectcur_bits[] = {
+ 0x04, 0x00, 0x02, 0x00, 0xff, 0x7f, 0x12, 0x40, 0x14, 0x40, 0x10, 0x40,
+ 0xf0, 0x7f, 0x00, 0x00};
+#define elipsecur_width 16
+#define elipsecur_height 8
+#define elipsecur_x_hot 0
+#define elipsecur_y_hot 2
+static unsigned char elipsecur_bits[] = {
+ 0x04, 0x00, 0x02, 0x00, 0x3f, 0x1f, 0xc2, 0x60, 0x24, 0x80, 0xc0, 0x60,
+ 0x00, 0x1f, 0x00, 0x00};
+#define polycur_width 16
+#define polycur_height 16
+#define polycur_x_hot 1
+#define polycur_y_hot 7
+static unsigned char polycur_bits[] = {
+ 0x80, 0x01, 0x60, 0x06, 0x18, 0x18, 0x06, 0x60, 0x02, 0x40, 0x02, 0x40,
+ 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x06, 0x60,
+ 0x18, 0x18, 0x60, 0x06, 0x80, 0x01, 0x00, 0x00};
+#define starcur_width 16
+#define starcur_height 16
+#define starcur_x_hot 0
+#define starcur_y_hot 6
+static unsigned char starcur_bits[] = {
+ 0x10, 0x08, 0x70, 0x0e, 0x90, 0x09, 0x10, 0x08, 0x08, 0x10, 0x06, 0x60,
+ 0x01, 0x80, 0x06, 0x60, 0x08, 0x10, 0x10, 0x08, 0x90, 0x09, 0x70, 0x0e,
+ 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+#define pencil_width 16
+#define pencil_height 16
+#define pencil_x_hot 1
+#define pencil_y_hot 1
+static unsigned char pencil_bits[] = {
+ 0x00, 0x00, 0x0e, 0x00, 0x16, 0x00, 0x22, 0x00, 0x44, 0x00, 0x88, 0x00,
+ 0x10, 0x01, 0x20, 0x02, 0x40, 0x04, 0x80, 0x08, 0x00, 0x11, 0x00, 0x22,
+ 0x00, 0x64, 0x00, 0x98, 0x00, 0x50, 0x00, 0x20};
+#define pencilmask_width 16
+#define pencilmask_height 16
+static unsigned char pencilmask_bits[] = {
+ 0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x7c, 0x00, 0xf8, 0x00,
+ 0xf0, 0x01, 0xe0, 0x03, 0xc0, 0x07, 0x80, 0x0f, 0x00, 0x1f, 0x00, 0x3e,
+ 0x00, 0x7c, 0x00, 0x98, 0x00, 0x50, 0x00, 0x20};
+#define eyedropper_width 16
+#define eyedropper_height 16
+#define eyedropper_x_hot 0
+#define eyedropper_y_hot 0
+static unsigned char eyedropper_bits[] = {
+ 0x02, 0x00, 0x0d, 0x00, 0x12, 0x00, 0x22, 0x00, 0x44, 0x00, 0x88, 0x00,
+ 0x10, 0x09, 0x20, 0x0e, 0x40, 0x0e, 0x80, 0x1f, 0x80, 0x7f, 0xc0, 0xff,
+ 0x00, 0xfe, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x78};
+#define eyedroppermask_width 16
+#define eyedroppermask_height 16
+static unsigned char eyedroppermask_bits[] = {
+ 0x03, 0x00, 0x0f, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x7c, 0x00, 0xf8, 0x00,
+ 0xf0, 0x09, 0xe0, 0x0f, 0xc0, 0x0f, 0x80, 0x1f, 0x80, 0x7f, 0xc0, 0xff,
+ 0x00, 0xfe, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x78};
+#define shift_width 16
+#define shift_height 16
+#define shift_x_hot 7
+#define shift_y_hot 7
+static unsigned char shift_bits[] = {
+ 0x80, 0x00, 0xc0, 0x01, 0xa0, 0x02, 0x80, 0x00, 0x80, 0x00, 0x84, 0x10,
+ 0x82, 0x20, 0xff, 0x7f, 0x82, 0x20, 0x84, 0x10, 0x80, 0x00, 0x80, 0x00,
+ 0xa0, 0x02, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00};
+#define linecur_width 16
+#define linecur_height 16
+#define linecur_x_hot 0
+#define linecur_y_hot 0
+static unsigned char linecur_bits[] = {
+ 0xc1, 0xff, 0x62, 0xa0, 0xc4, 0xff, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00,
+ 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08,
+ 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80};
+#if _CursorsMustBe16x16
+#define hand_width 16
+#define hand_height 16
+#define hand_x_hot 8
+#define hand_y_hot 12
+static unsigned char hand_bits[] = {
+ 0x80, 0x01, 0x40, 0x02, 0x48, 0x0e, 0x54, 0x12, 0x54, 0x52, 0x64, 0xb2,
+ 0x68, 0xb2, 0x48, 0x92, 0x17, 0x80, 0x19, 0x40, 0x11, 0x40, 0x02, 0x40,
+ 0x04, 0x20, 0x08, 0x20, 0x08, 0x20, 0x10, 0x10};
+#define handmask_width 16
+#define handmask_height 16
+static unsigned char handmask_bits[] = {
+ 0x80, 0x01, 0xc0, 0x03, 0xc8, 0x0f, 0xdc, 0x1f, 0xdc, 0x5f, 0xfc, 0xff,
+ 0xf8, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x7f,
+ 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf0, 0x1f};
+#else
+#define hand_width 24
+#define hand_height 24
+#define hand_x_hot 11
+#define hand_y_hot 15
+static unsigned char hand_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
+ 0x00, 0x12, 0x00, 0x40, 0x72, 0x00, 0xa0, 0x92, 0x00, 0xa0, 0x92, 0x02,
+ 0x20, 0x93, 0x05, 0x40, 0x93, 0x05, 0x40, 0x92, 0x04, 0xb8, 0x00, 0x04,
+ 0xc8, 0x00, 0x02, 0x88, 0x00, 0x02, 0x10, 0x00, 0x02, 0x20, 0x00, 0x01,
+ 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x80, 0x80, 0x00, 0x00, 0x81, 0x00,
+ 0x00, 0x82, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#define handmask_width 24
+#define handmask_height 24
+static unsigned char handmask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
+ 0x00, 0x1e, 0x00, 0x40, 0x7e, 0x00, 0xe0, 0xfe, 0x00, 0xe0, 0xfe, 0x02,
+ 0xe0, 0xff, 0x07, 0xc0, 0xff, 0x07, 0xc0, 0xff, 0x07, 0xb8, 0xff, 0x07,
+ 0xf8, 0xff, 0x03, 0xf8, 0xff, 0x03, 0xf0, 0xff, 0x03, 0xe0, 0xff, 0x01,
+ 0xc0, 0xff, 0x01, 0xc0, 0xff, 0x01, 0x80, 0xff, 0x00, 0x00, 0xff, 0x00,
+ 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#endif
+#define filledrectcur_width 16
+#define filledrectcur_height 8
+#define filledrectcur_x_hot 0
+#define filledrectcur_y_hot 2
+static unsigned char filledrectcur_bits[] = {
+ 0x04, 0x00, 0x02, 0x00, 0xff, 0xff, 0xe2, 0xff, 0xe4, 0xff, 0xe0, 0xff,
+ 0xe0, 0xff, 0x00, 0x00};
+#define filledelipsecur_width 16
+#define filledelipsecur_height 8
+#define filledelipsecur_x_hot 0
+#define filledelipsecur_y_hot 2
+static unsigned char filledelipsecur_bits[] = {
+ 0x04, 0x00, 0x02, 0x00, 0x3f, 0x1f, 0xc2, 0x7f, 0xe4, 0xff, 0xc0, 0x7f,
+ 0x00, 0x1f, 0x00, 0x00};
+#define kerncur_width 16
+#define kerncur_height 15
+#define kerncur_x_hot 7
+#define kerncur_y_hot 7
+static unsigned char kerncur_bits[] = {
+ 0x80, 0x00, 0x80, 0x00, 0xf8, 0x0f, 0x08, 0x08, 0x28, 0x0a, 0x28, 0x09,
+ 0xaa, 0x28, 0x6f, 0x78, 0xaa, 0x28, 0x28, 0x09, 0x28, 0x0a, 0x08, 0x08,
+ 0xf8, 0x0f, 0x80, 0x00, 0x80, 0x00};
+#define rbearcur_width 16
+#define rbearcur_height 15
+#define rbearcur_x_hot 7
+#define rbearcur_y_hot 7
+static unsigned char rbearcur_bits[] = {
+ 0x80, 0x00, 0x80, 0x00, 0xf8, 0x0f, 0x08, 0x08, 0xe8, 0x09, 0x28, 0x0a,
+ 0x2a, 0x2a, 0xef, 0x79, 0x2a, 0x29, 0x28, 0x09, 0x28, 0x0a, 0x08, 0x08,
+ 0xf8, 0x0f, 0x80, 0x00, 0x80, 0x00};
+#define rbearmask_width 16
+#define rbearmask_height 15
+static unsigned char rbearmask_bits[] = {
+ 0x80, 0x00, 0xfc, 0x1f, 0xfc, 0x1f, 0xfc, 0x1f, 0xfc, 0x1f, 0xfe, 0x3f,
+ 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f, 0xfc, 0x1f, 0xfc, 0x1f,
+ 0xfc, 0x1f, 0xfc, 0x1f, 0x80, 0x00};
+#define lbearcur_width 16
+#define lbearcur_height 15
+#define lbearcur_x_hot 7
+#define lbearcur_y_hot 7
+static unsigned char lbearcur_bits[] = {
+ 0x80, 0x00, 0x80, 0x00, 0xf0, 0x07, 0x10, 0x04, 0x50, 0x04, 0x54, 0x14,
+ 0x52, 0x24, 0x5f, 0x7c, 0x52, 0x24, 0x54, 0x14, 0xd0, 0x05, 0x10, 0x04,
+ 0xf0, 0x07, 0x80, 0x00, 0x80, 0x00};
+#define lbearmask_width 16
+#define lbearmask_height 15
+static unsigned char lbearmask_bits[] = {
+ 0x80, 0x00, 0xf8, 0x0f, 0xf8, 0x0f, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f,
+ 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f, 0xfc, 0x1f, 0xf8, 0x0f,
+ 0xf8, 0x0f, 0xf8, 0x0f, 0x80, 0x00};
+
+#if 0
+#define logo_width 32
+#define logo_height 32
+static unsigned char logo_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
+ 0xf0, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00,
+ 0xe0, 0x0f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00,
+ 0xfc, 0x3f, 0x00, 0x00, 0x9f, 0x3f, 0x00, 0x00, 0x07, 0x0f, 0x38, 0x00,
+ 0x00, 0xc3, 0xff, 0x01, 0x00, 0x60, 0xf0, 0x1f, 0x00, 0xbc, 0xed, 0x7f,
+ 0x80, 0x07, 0xf8, 0x7f, 0xe0, 0x6f, 0xff, 0x7f, 0xf8, 0xb7, 0xff, 0x1f,
+ 0xfe, 0x01, 0xfe, 0x05, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0x23, 0x00,
+ 0x80, 0x71, 0x7c, 0x00, 0x00, 0x8e, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03,
+ 0xc0, 0xdf, 0xff, 0x03, 0xc0, 0xdf, 0xff, 0x03, 0x80, 0xef, 0xff, 0x00,
+ 0x00, 0xef, 0x3f, 0x00, 0x00, 0xec, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+#endif
+
+#define prohibition_width 16
+#define prohibition_height 16
+#define prohibition_x_hot 7
+#define prohibition_y_hot 7
+static unsigned char prohibition_bits[] = {
+ 0xc0, 0x01, 0x30, 0x06, 0x0c, 0x18, 0x0c, 0x10, 0x12, 0x20, 0x22, 0x20,
+ 0x41, 0x40, 0x81, 0x40, 0x01, 0x41, 0x02, 0x22, 0x02, 0x24, 0x04, 0x18,
+ 0x0c, 0x18, 0x30, 0x06, 0xc0, 0x01, 0x00, 0x00};
+static unsigned char prohibitionmask_bits[] = {
+ 0xc0, 0x01, 0xf0, 0x07, 0xfc, 0x1f, 0xfc, 0x1f, 0xfe, 0x3f, 0xfe, 0x3f,
+ 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f, 0xfe, 0x3f, 0xfc, 0x1f,
+ 0xfc, 0x1f, 0xf0, 0x07, 0xc0, 0x01, 0x00, 0x00};
+#define ddcursor_width 16
+#define ddcursor_height 16
+#define ddcursor_x_hot 0
+#define ddcursor_y_hot 0
+static unsigned char ddcursor_bits[] = {
+ 0x0f, 0x00, 0x03, 0x00, 0x05, 0x00, 0x09, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x02, 0x60, 0xc6, 0x50, 0x2a, 0x50, 0x2a, 0xa0, 0xc6,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+static unsigned char zeroes[32] = { 0 };
+
+
+void InitCursors(void) {
+ GdkPixmap *image, *mask;
+ static GdkColor white = { 0xffffffff, 0xffff, 0xffff, 0xffff },
+ black = { 0xffffffff, 0 , 0 , 0 },
+ red = { 0xffffffff, 0xffff, 0 , 0 };
+
+ image = gdk_pixmap_create_from_data(NULL,magplus_bits,magplus_width,magplus_height,
+ 1, &black, &white);
+ ct_magplus = gdk_cursor_new_from_pixmap( image,image,&black,&white,magplus_x_hot,
+ magplus_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,magminus_bits,magminus_width,magminus_height,
+ 1, &black, &white);
+ ct_magminus = gdk_cursor_new_from_pixmap( image,image,&black,&white,magminus_x_hot,
+ magminus_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,pointercur_bits,pointercur_width,pointercur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointercurmask_bits,pointercurmask_width,pointercurmask_height,
+ 1, &black, &white);
+ ct_mypointer = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointercur_x_hot,
+ pointercur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,pointercirc_bits,pointercirc_width,pointercirc_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointercircmask_bits,pointercircmask_width,pointercircmask_height,
+ 1, &black, &white);
+ ct_circle = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointercirc_x_hot,
+ pointercirc_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,pointertri_bits,pointertri_width,pointertri_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointertrimask_bits,pointertrimask_width,pointertrimask_height,
+ 1, &black, &white);
+ ct_triangle = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointertri_x_hot,
+ pointertri_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,pointersqr_bits,pointersqr_width,pointersqr_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointersqrmask_bits,pointersqrmask_width,pointersqrmask_height,
+ 1, &black, &white);
+ ct_square = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointersqr_x_hot,
+ pointersqr_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,pencur_bits,pencur_width,pencur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pencurmask_bits,pencurmask_width,pencurmask_height,
+ 1, &black, &white);
+ ct_pen = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pencur_x_hot,
+ pencur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,setwidthcur_bits,setwidthcur_width,setwidthcur_height,
+ 1, &black, &white);
+/* mask = gdk_pixmap_create_from_data(NULL,setwidthcurmask_bits,setwidthcurmask_width,setwidthcurmask_height,
+ 1, &black, &white);*/
+ ct_setwidth = gdk_cursor_new_from_pixmap( image,image,&black,&white,setwidthcur_x_hot,
+ setwidthcur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,pointerhvcirc_bits,pointerhvcirc_width,pointerhvcirc_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointerhvcircmask_bits,pointerhvcircmask_width,pointerhvcircmask_height,
+ 1, &black, &white);
+ ct_hvcircle = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointerhvcirc_x_hot,
+ pointerhvcirc_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,pointerg2circ_bits,pointerg2circ_width,pointerg2circ_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointerg2circmask_bits,pointerg2circmask_width,pointerg2circmask_height,
+ 1, &black, &white);
+ ct_g2circle = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointerg2circ_x_hot,
+ pointerg2circ_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,pointerright_bits,pointerright_width,pointerright_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointerrightmask_bits,pointerrightmask_width,pointerrightmask_height,
+ 1, &black, &white);
+ ct_spiroright = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointerright_x_hot,
+ pointerright_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,pointerleft_bits,pointerleft_width,pointerleft_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pointerleftmask_bits,pointerleftmask_width,pointerleftmask_height,
+ 1, &black, &white);
+ ct_spiroleft = gdk_cursor_new_from_pixmap( image,mask,&black,&white,pointerleft_x_hot,
+ pointerleft_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,rulercur_bits,rulercur_width,rulercur_height,
+ 1, &black, &white);
+ ct_ruler = gdk_cursor_new_from_pixmap( image,image,&black,&white,rulercur_x_hot,
+ rulercur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,knifecur_bits,knifecur_width,knifecur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,knifecurmask_bits,knifecurmask_width,knifecurmask_height,
+ 1, &black, &white);
+ ct_knife = gdk_cursor_new_from_pixmap( image,mask,&black,&white,knifecur_x_hot,
+ knifecur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,flipcur_bits,flipcur_width,flipcur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,flipcurmask_bits,flipcurmask_width,flipcurmask_height,
+ 1, &black, &white);
+ ct_flip = gdk_cursor_new_from_pixmap( image,mask,&red,&white,flipcur_x_hot,
+ flipcur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,rotatecur_bits,rotatecur_width,rotatecur_height,
+ 1, &black, &white);
+ ct_rotate = gdk_cursor_new_from_pixmap( image,image,&red,&white,rotatecur_x_hot,
+ rotatecur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,scalecur_bits,scalecur_width,scalecur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,scalecurmask_bits,scalecur_width,scalecur_height,
+ 1, &black, &white);
+ ct_scale = gdk_cursor_new_from_pixmap( image,mask,&red,&white,scalecur_x_hot,
+ scalecur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,skewcur_bits,skewcur_width,skewcur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,skewcurmask_bits,skewcur_width,skewcur_height,
+ 1, &black, &white);
+ ct_skew = gdk_cursor_new_from_pixmap( image,mask,&red,&white,skewcur_x_hot,
+ skewcur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,rotate3dcur_bits,rotate3dcur_width,rotate3dcur_height,
+ 1, &black, &white);
+ ct_3drotate = gdk_cursor_new_from_pixmap( image,image,&red,&white,rotate3dcur_x_hot,
+ rotate3dcur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,perspectivecur_bits,perspectivecur_width,perspectivecur_height,
+ 1, &black, &white);
+ ct_perspective = gdk_cursor_new_from_pixmap( image,image,&red,&white,perspectivecur_x_hot,
+ perspectivecur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,rectcur_bits,rectcur_width,rectcur_height,
+ 1, &black, &white);
+ ct_rect = gdk_cursor_new_from_pixmap( image,image,&red,&white,rectcur_x_hot,
+ rectcur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,elipsecur_bits,elipsecur_width,elipsecur_height,
+ 1, &black, &white);
+ ct_elipse = gdk_cursor_new_from_pixmap( image,image,&red,&white,elipsecur_x_hot,
+ elipsecur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,polycur_bits,polycur_width,polycur_height,
+ 1, &black, &white);
+ ct_poly = gdk_cursor_new_from_pixmap( image,image,&red,&white,polycur_x_hot,
+ polycur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,starcur_bits,starcur_width,starcur_height,
+ 1, &black, &white);
+ ct_star = gdk_cursor_new_from_pixmap( image,image,&red,&white,starcur_x_hot,
+ starcur_y_hot);
+
+
+ image = gdk_pixmap_create_from_data(NULL,nwse_bits,nwse_width,nwse_height,
+ 1, &black, &white);
+ ct_nwse = gdk_cursor_new_from_pixmap( image,image,&red,&white,nwse_x_hot,
+ nwse_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,nesw_bits,nesw_width,nesw_height,
+ 1, &black, &white);
+ ct_nesw = gdk_cursor_new_from_pixmap( image,image,&red,&white,nesw_x_hot,
+ nesw_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,leftright_bits,leftright_width,leftright_height,
+ 1, &black, &white);
+ ct_leftright = gdk_cursor_new_from_pixmap( image,image,&red,&white,leftright_x_hot,
+ leftright_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,updown_bits,updown_width,updown_height,
+ 1, &black, &white);
+ ct_updown = gdk_cursor_new_from_pixmap( image,image,&red,&white,updown_x_hot,
+ updown_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,pencil_bits,pencil_width,pencil_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,pencilmask_bits,pencil_width,pencil_height,
+ 1, &black, &white);
+ ct_pencil = gdk_cursor_new_from_pixmap( image,mask,&red,&white,pencil_x_hot,
+ pencil_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,eyedropper_bits,eyedropper_width,eyedropper_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,eyedroppermask_bits,eyedropper_width,eyedropper_height,
+ 1, &black, &white);
+ ct_eyedropper = gdk_cursor_new_from_pixmap( image,mask,&red,&white,eyedropper_x_hot,
+ eyedropper_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,shift_bits,shift_width,shift_height,
+ 1, &black, &white);
+ ct_shift = gdk_cursor_new_from_pixmap( image,image,&red,&white,shift_x_hot,
+ shift_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,linecur_bits,linecur_width,linecur_height,
+ 1, &black, &white);
+ ct_line = gdk_cursor_new_from_pixmap( image,image,&red,&white,linecur_x_hot,
+ linecur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,hand_bits,hand_width,hand_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,handmask_bits,hand_width,hand_height,
+ 1, &black, &white);
+ ct_myhand = gdk_cursor_new_from_pixmap( image,mask,&red,&white,hand_x_hot,
+ hand_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,filledrectcur_bits,filledrectcur_width,filledrectcur_height,
+ 1, &black, &white);
+ ct_filledrect = gdk_cursor_new_from_pixmap( image,image,&red,&white,filledrectcur_x_hot,
+ filledrectcur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,filledelipsecur_bits,filledelipsecur_width,filledelipsecur_height,
+ 1, &black, &white);
+ ct_filledelipse = gdk_cursor_new_from_pixmap( image,image,&red,&white,filledelipsecur_x_hot,
+ filledelipsecur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,kerncur_bits,kerncur_width,kerncur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,rbearmask_bits,kerncur_width,kerncur_height,
+ 1, &black, &white);
+ ct_kerning = gdk_cursor_new_from_pixmap( image,mask,&red,&white,kerncur_x_hot,
+ kerncur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,rbearcur_bits,rbearcur_width,rbearcur_height,
+ 1, &black, &white);
+ ct_rbearing = gdk_cursor_new_from_pixmap( image,mask,&red,&white,rbearcur_x_hot,
+ rbearcur_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,lbearcur_bits,lbearcur_width,lbearcur_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,lbearmask_bits,lbearcur_width,lbearcur_height,
+ 1, &black, &white);
+ ct_lbearing = gdk_cursor_new_from_pixmap( image,mask,&red,&white,lbearcur_x_hot,
+ lbearcur_y_hot);
+
+ image = gdk_pixmap_create_from_data(NULL,prohibition_bits,prohibition_width,prohibition_height,
+ 1, &black, &white);
+ mask = gdk_pixmap_create_from_data(NULL,prohibitionmask_bits,prohibition_width,prohibition_height,
+ 1, &black, &white);
+ ct_prohibition = gdk_cursor_new_from_pixmap( image,mask,&red,&white,prohibition_x_hot,
+ prohibition_y_hot);
+ image = gdk_pixmap_create_from_data(NULL,ddcursor_bits,ddcursor_width,ddcursor_height,
+ 1, &black, &white);
+ ct_ddcursor = gdk_cursor_new_from_pixmap( image,image,&red,&white,ddcursor_x_hot,
+ ddcursor_y_hot);
+
+ ct_pointer = gdk_cursor_new(GDK_LEFT_PTR);
+ ct_4way = gdk_cursor_new(GDK_FLEUR);
+ ct_watch = gdk_cursor_new(GDK_WATCH);
+ ct_draganddrop = gdk_cursor_new(GDK_RIGHT_PTR);
+ image = gdk_pixmap_create_from_data(NULL,zeroes,16,16, 1, &black, &white);
+ ct_invisible = gdk_cursor_new_from_pixmap( image,image,&red,&white,0,0);
+ /*ct_backpointer = gdk_cursor_new(GDK_RIGHT_PTR);*/
+ /*ct_hand = gdk_cursor_new(GDK_HAND2);*/
+ /*ct_question = gdk_cursor_new(GDK_QUESTION_ARROW);*/
+ /*ct_cross = gdk_cursor_new(GDK_TCROSS);*/
+ /*ct_text = gdk_cursor_new(GDK_XTERM);*/
+}
diff --git a/gtkui/ff_interface.c b/gtkui/ff_interface.c
new file mode 100644
index 00000000..d186ceb2
--- /dev/null
+++ b/gtkui/ff_interface.c
@@ -0,0 +1,4157 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+#include "gwwv.h"
+#include <libintl.h>
+#define _(str) gettext(str)
+
+#define GLADE_HOOKUP_OBJECT(component,widget,name) \
+ g_object_set_data_full (G_OBJECT (component), name, \
+ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+
+#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
+ g_object_set_data (G_OBJECT (component), name, widget)
+
+GtkWidget*
+create_FontView (void)
+{
+ GtkWidget *FontView;
+ GdkPixbuf *FontView_icon_pixbuf;
+ GtkWidget *vbox1;
+ GtkWidget *FontViewMenu;
+ AtkObject *atko;
+ GtkWidget *file1;
+ GtkWidget *file1_menu;
+ GtkWidget *new2;
+ GtkWidget *image5763;
+ GtkWidget *open2;
+ GtkWidget *image5764;
+ GtkWidget *recent1;
+ GtkWidget *recent1_menu;
+ GtkWidget *separator2;
+ GtkWidget *close2;
+ GtkWidget *image5765;
+ GtkWidget *separator1;
+ GtkWidget *save2;
+ GtkWidget *image5766;
+ GtkWidget *save_as2;
+ GtkWidget *image5767;
+ GtkWidget *save_all1;
+ GtkWidget *image5768;
+ GtkWidget *generate_fonts1;
+ GtkWidget *image5769;
+ GtkWidget *generate_mac_family1;
+ GtkWidget *image5770;
+ GtkWidget *separatormenuitem1;
+ GtkWidget *import1;
+ GtkWidget *image5771;
+ GtkWidget *merge_kern_info1;
+ GtkWidget *revert_file1;
+ GtkWidget *image5772;
+ GtkWidget *revert_to_backup1;
+ GtkWidget *image5773;
+ GtkWidget *revert_glyph1;
+ GtkWidget *image5774;
+ GtkWidget *separator4;
+ GtkWidget *print2;
+ GtkWidget *image5775;
+ GtkWidget *separator5;
+ GtkWidget *execute_script1;
+ GtkWidget *image5776;
+ GtkWidget *script_menu1;
+ GtkWidget *script_menu1_menu;
+ GtkWidget *separator8;
+ GtkWidget *separator6;
+ GtkWidget *preferences2;
+ GtkWidget *image5777;
+ GtkWidget *separator7;
+ GtkWidget *quit2;
+ GtkWidget *image5778;
+ GtkWidget *edit2;
+ GtkWidget *edit2_menu;
+ GtkWidget *undo2;
+ GtkWidget *image5779;
+ GtkWidget *redo2;
+ GtkWidget *image5780;
+ GtkWidget *separator9;
+ GtkWidget *cut2;
+ GtkWidget *image5781;
+ GtkWidget *copy2;
+ GtkWidget *image5782;
+ GtkWidget *copy_reference1;
+ GtkWidget *image5783;
+ GtkWidget *copy_lookup_data1;
+ GtkWidget *copy_width1;
+ GtkWidget *image5784;
+ GtkWidget *copy_vwidth1;
+ GtkWidget *image5785;
+ GtkWidget *copy_lbearing1;
+ GtkWidget *image5786;
+ GtkWidget *copy_rbearing1;
+ GtkWidget *image5787;
+ GtkWidget *paste2;
+ GtkWidget *image5788;
+ GtkWidget *paste_into1;
+ GtkWidget *image5789;
+ GtkWidget *paste_after1;
+ GtkWidget *image5790;
+ GtkWidget *same_glyph_as1;
+ GtkWidget *clear2;
+ GtkWidget *image5791;
+ GtkWidget *clear_background1;
+ GtkWidget *image5792;
+ GtkWidget *copy_fg_to_bg1;
+ GtkWidget *image5793;
+ GtkWidget *join1;
+ GtkWidget *separator10;
+ GtkWidget *select1;
+ GtkWidget *select1_menu;
+ GtkWidget *select_all1;
+ GtkWidget *invert_selection1;
+ GtkWidget *deselect_all1;
+ GtkWidget *select_by_color1;
+ GtkWidget *select_by_color1_menu;
+ GtkWidget *default1;
+ GtkWidget *image5794;
+ GtkWidget *white;
+ GtkWidget *image5795;
+ GtkWidget *red;
+ GtkWidget *image5796;
+ GtkWidget *green;
+ GtkWidget *image5797;
+ GtkWidget *blue;
+ GtkWidget *image5798;
+ GtkWidget *yellow;
+ GtkWidget *image5799;
+ GtkWidget *cyan;
+ GtkWidget *image5800;
+ GtkWidget *magenta;
+ GtkWidget *image5801;
+ GtkWidget *color_picker1;
+ GtkWidget *image5802;
+ GtkWidget *select_by_wildcard1;
+ GtkWidget *select_by_script1;
+ GtkWidget *separator11;
+ GtkWidget *glyphs_worth_outputting1;
+ GtkWidget *changed_glyphs1;
+ GtkWidget *unhinted_glyphs1;
+ GtkWidget *autohintable1;
+ GtkWidget *separator63;
+ GtkWidget *select_by_att1;
+ GtkWidget *find_and_replace1;
+ GtkWidget *image5803;
+ GtkWidget *replace_with_reference1;
+ GtkWidget *separator12;
+ GtkWidget *unlink_reference1;
+ GtkWidget *image5804;
+ GtkWidget *separator13;
+ GtkWidget *copy_from1;
+ GtkWidget *copy_from1_menu;
+ GSList *all_fonts1_group = NULL;
+ GtkWidget *all_fonts1;
+ GtkWidget *displayed_fonts1;
+ GtkWidget *separator15;
+ GtkWidget *glyph_metadata1;
+ GtkWidget *separator88;
+ GtkWidget *truetype_instructions1;
+ GtkWidget *separator14;
+ GtkWidget *remove_undoes1;
+ GtkWidget *image5805;
+ GtkWidget *element1;
+ GtkWidget *element1_menu;
+ GtkWidget *font_info1;
+ GtkWidget *image5806;
+ GtkWidget *char_info1;
+ GtkWidget *image5807;
+ GtkWidget *other_info1;
+ GtkWidget *other_info1_menu;
+ GtkWidget *math_info1;
+ GtkWidget *image5808;
+ GtkWidget *bdf_info3;
+ GtkWidget *show_dependent1;
+ GtkWidget *show_dependent1_menu;
+ GtkWidget *references2;
+ GtkWidget *substitutions3;
+ GtkWidget *mass_glyph_rename1;
+ GtkWidget *find_problems1;
+ GtkWidget *image5809;
+ GtkWidget *validate1;
+ GtkWidget *image5810;
+ GtkWidget *separator22;
+ GtkWidget *bitmaps_available1;
+ GtkWidget *image5811;
+ GtkWidget *regenerate_bitmaps1;
+ GtkWidget *image5812;
+ GtkWidget *remove_bitmap_glyphs1;
+ GtkWidget *separator23;
+ GtkWidget *style1;
+ GtkWidget *image5813;
+ GtkWidget *style1_menu;
+ GtkWidget *change_weight1;
+ GtkWidget *image5814;
+ GtkWidget *oblique1;
+ GtkWidget *image5815;
+ GtkWidget *condense_extend1;
+ GtkWidget *image5816;
+ GtkWidget *inline2;
+ GtkWidget *image5817;
+ GtkWidget *outline3;
+ GtkWidget *image5818;
+ GtkWidget *shadow2;
+ GtkWidget *image5819;
+ GtkWidget *wireframe2;
+ GtkWidget *image5820;
+ GtkWidget *transformations1;
+ GtkWidget *image5821;
+ GtkWidget *transformations1_menu;
+ GtkWidget *transform1;
+ GtkWidget *image5822;
+ GtkWidget *point_of_view_projection1;
+ GtkWidget *non_linear_transform1;
+ GtkWidget *expand_stroke1;
+ GtkWidget *image5823;
+ GtkWidget *tilepath1;
+ GtkWidget *overlap1;
+ GtkWidget *image5824;
+ GtkWidget *overlap1_menu;
+ GtkWidget *remove_overlap1;
+ GtkWidget *image5825;
+ GtkWidget *intersect1;
+ GtkWidget *image5826;
+ GtkWidget *find_intersection1;
+ GtkWidget *image5827;
+ GtkWidget *simplify3;
+ GtkWidget *image5828;
+ GtkWidget *simplify3_menu;
+ GtkWidget *simplify2;
+ GtkWidget *image5829;
+ GtkWidget *simplify_more1;
+ GtkWidget *cleanup1;
+ GtkWidget *canonical_start_point1;
+ GtkWidget *canonical_contours1;
+ GtkWidget *add_extrema1;
+ GtkWidget *image5830;
+ GtkWidget *round1;
+ GtkWidget *round1_menu;
+ GtkWidget *round_to_int1;
+ GtkWidget *to_hundredths1;
+ GtkWidget *cluster1;
+ GtkWidget *autotrace1;
+ GtkWidget *separator25;
+ GtkWidget *correct_direction1;
+ GtkWidget *image5831;
+ GtkWidget *separator26;
+ GtkWidget *build1;
+ GtkWidget *image5832;
+ GtkWidget *build1_menu;
+ GtkWidget *build_accented_glyph1;
+ GtkWidget *image5833;
+ GtkWidget *build_composite_glyph1;
+ GtkWidget *separator27;
+ GtkWidget *merge_fonts1;
+ GtkWidget *interpolate_fonts1;
+ GtkWidget *compare_fonts1;
+ GtkWidget *tools3;
+ GtkWidget *image5834;
+ GtkWidget *hints1;
+ GtkWidget *hints1_menu;
+ GtkWidget *autohint1;
+ GtkWidget *hint_subsitution_pts1;
+ GtkWidget *auto_counter_hint1;
+ GtkWidget *dont_autohint1;
+ GtkWidget *separator28;
+ GtkWidget *autoinstr1;
+ GtkWidget *edit_instructions1;
+ GtkWidget *edit_fpgm1;
+ GtkWidget *edit_prep1;
+ GtkWidget *edit_maxp1;
+ GtkWidget *edit_cvt_1;
+ GtkWidget *private_to_cvt_1;
+ GtkWidget *separator30;
+ GtkWidget *clear_hints1;
+ GtkWidget *clear_instructions1;
+ GtkWidget *separator31;
+ GtkWidget *histograms1;
+ GtkWidget *histograms1_menu;
+ GtkWidget *hstem1;
+ GtkWidget *vstem1;
+ GtkWidget *bluevalues1;
+ GtkWidget *encoding2;
+ GtkWidget *encoding2_menu;
+ GtkWidget *reencode1;
+ GtkWidget *reencode1_menu;
+ GtkWidget *separator65;
+ GtkWidget *compact1;
+ GtkWidget *force_encoding1;
+ GtkWidget *force_encoding1_menu;
+ GtkWidget *separator66;
+ GtkWidget *separator64;
+ GtkWidget *add_encoding_slots1;
+ GtkWidget *remove_unused_slots1;
+ GtkWidget *detach_glyphs1;
+ GtkWidget *detatch___remove_glyphs1;
+ GtkWidget *image5835;
+ GtkWidget *separator67;
+ GtkWidget *add_encoding_name1;
+ GtkWidget *load_encoding1;
+ GtkWidget *make_from_font1;
+ GtkWidget *remove_encoding1;
+ GtkWidget *separator68;
+ GtkWidget *display_by_groups1;
+ GtkWidget *define_groups1;
+ GtkWidget *separator87;
+ GtkWidget *save_namelist_of_font1;
+ GtkWidget *load_namelist1;
+ GtkWidget *rename_glyphs1;
+ GtkWidget *create_named_glyphs1;
+ GtkWidget *view3;
+ GtkWidget *view3_menu;
+ GtkWidget *next_glyph1;
+ GtkWidget *image5836;
+ GtkWidget *prev_glyph1;
+ GtkWidget *image5837;
+ GtkWidget *next_defined_glyph1;
+ GtkWidget *image5838;
+ GtkWidget *prev_defined_glyph1;
+ GtkWidget *image5839;
+ GtkWidget *goto1;
+ GtkWidget *image5840;
+ GtkWidget *separator32;
+ GtkWidget *show_att1;
+ GtkWidget *display_substitutions1;
+ GtkWidget *combinations1;
+ GtkWidget *combinations1_menu;
+ GtkWidget *kern_pairs1;
+ GtkWidget *anchor_pairs1;
+ GtkWidget *anchor_pairs1_menu;
+ GtkWidget *all2;
+ GtkWidget *ligatures2;
+ GtkWidget *separator33;
+ GtkWidget *label_glyph_by1;
+ GtkWidget *label_glyph_by1_menu;
+ GSList *glyph_image1_group = NULL;
+ GtkWidget *glyph_image1;
+ GtkWidget *glyph_name1;
+ GtkWidget *unicode1;
+ GtkWidget *encoding1;
+ GtkWidget *separator62;
+ GtkWidget *show_h_metrics1;
+ GtkWidget *show_v_metrics1;
+ GtkWidget *separator34;
+ GtkWidget *_32x8_cell_window1;
+ GtkWidget *_16x4_cell_window1;
+ GtkWidget *_8x2_cell_window1;
+ GtkWidget *separator85;
+ GtkWidget *_24_pixel_outline1;
+ GtkWidget *_36_pixel_outline1;
+ GtkWidget *_48_pixel_outline1;
+ GtkWidget *_72_pixel_outline1;
+ GtkWidget *_96_pixel_outline1;
+ GtkWidget *separator35;
+ GtkWidget *anti_alias1;
+ GtkWidget *fit_to_em1;
+ GtkWidget *separator89;
+ GtkWidget *bitmap_magnification1;
+ GtkWidget *metrics1;
+ GtkWidget *metrics1_menu;
+ GtkWidget *center_in_width1;
+ GtkWidget *thirds_in_width1;
+ GtkWidget *set_width1;
+ GtkWidget *set_lbearing1;
+ GtkWidget *set_rbearing1;
+ GtkWidget *set_vertical_advance1;
+ GtkWidget *separator36;
+ GtkWidget *auto_width1;
+ GtkWidget *auto_kern1;
+ GtkWidget *kern_by_classes1;
+ GtkWidget *remove_all_kern_pairs1;
+ GtkWidget *kern_pair_closeup1;
+ GtkWidget *separator37;
+ GtkWidget *vkern_by_classes1;
+ GtkWidget *vkern_from_hkern1;
+ GtkWidget *remove_all_vkern_pairs1;
+ GtkWidget *cid1;
+ GtkWidget *cid1_menu;
+ GtkWidget *convert_to_cid1;
+ GtkWidget *convert_by_cmap1;
+ GtkWidget *separator38;
+ GtkWidget *flatten1;
+ GtkWidget *flatten_by_cmap1;
+ GtkWidget *separator69;
+ GtkWidget *insert_font1;
+ GtkWidget *insert_empty_font1;
+ GtkWidget *remove_font1;
+ GtkWidget *separator70;
+ GtkWidget *change_supplement1;
+ GtkWidget *cid_font_info1;
+ GtkWidget *image5841;
+ GtkWidget *mm1;
+ GtkWidget *mm1_menu;
+ GtkWidget *create_mm1;
+ GtkWidget *image5842;
+ GtkWidget *separator39;
+ GtkWidget *mm_validity_check1;
+ GtkWidget *mm_info1;
+ GtkWidget *image5843;
+ GtkWidget *blend_to_new_font1;
+ GtkWidget *mm_change_def_weights1;
+ GtkWidget *window1;
+ GtkWidget *window1_menu;
+ GtkWidget *open_outline_window1;
+ GtkWidget *open_bitmap_window1;
+ GtkWidget *open_metrics_window1;
+ GtkWidget *separator71;
+ GtkWidget *warnings1;
+ GtkWidget *image5844;
+ GtkWidget *separator3;
+ GtkWidget *help4;
+ GtkWidget *help4_menu;
+ GtkWidget *help1;
+ GtkWidget *image5845;
+ GtkWidget *overview1;
+ GtkWidget *index1;
+ GtkWidget *image5846;
+ GtkWidget *about1;
+ GtkWidget *image5847;
+ GtkWidget *license1;
+ GtkWidget *status;
+ GtkWidget *hbox5;
+ GtkWidget *view;
+ GtkWidget *vscrollbar2;
+ GtkAccelGroup *accel_group;
+ GtkTooltips *tooltips;
+
+ tooltips = gtk_tooltips_new ();
+
+ accel_group = gtk_accel_group_new ();
+
+ FontView = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (FontView, "FontView");
+ gtk_widget_set_events (FontView, GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_PROPERTY_CHANGE_MASK);
+ gtk_window_set_title (GTK_WINDOW (FontView), _("FontView"));
+ FontView_icon_pixbuf = create_pixbuf ("fontview2.xbm");
+ if (FontView_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (FontView), FontView_icon_pixbuf);
+ gdk_pixbuf_unref (FontView_icon_pixbuf);
+ }
+
+ vbox1 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox1, "vbox1");
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (FontView), vbox1);
+
+ FontViewMenu = gww_vmenu_bar_new ();
+ gtk_widget_set_name (FontViewMenu, "FontViewMenu");
+ gtk_widget_show (FontViewMenu);
+ gtk_box_pack_start (GTK_BOX (vbox1), FontViewMenu, FALSE, FALSE, 0);
+
+ file1 = gtk_menu_item_new_with_mnemonic (_("_File"));
+ gtk_widget_set_name (file1, "file1");
+ gtk_widget_show (file1);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), file1);
+
+ file1_menu = gtk_menu_new ();
+ gtk_widget_set_name (file1_menu, "file1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (file1), file1_menu);
+
+ new2 = gtk_image_menu_item_new_with_mnemonic (_("Font|_New"));
+ gtk_widget_set_name (new2, "new2");
+ gtk_widget_show (new2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), new2);
+ gtk_widget_add_accelerator (new2, "activate", accel_group,
+ GDK_N, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5763 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5763, "image5763");
+ gtk_widget_show (image5763);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (new2), image5763);
+
+ open2 = gtk_image_menu_item_new_with_mnemonic (_("_Open..."));
+ gtk_widget_set_name (open2, "open2");
+ gtk_widget_show (open2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), open2);
+ gtk_widget_add_accelerator (open2, "activate", accel_group,
+ GDK_O, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5764 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5764, "image5764");
+ gtk_widget_show (image5764);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (open2), image5764);
+
+ recent1 = gtk_menu_item_new_with_mnemonic (_("Recen_t"));
+ gtk_widget_set_name (recent1, "recent1");
+ gtk_widget_show (recent1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), recent1);
+
+ recent1_menu = gtk_menu_new ();
+ gtk_widget_set_name (recent1_menu, "recent1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (recent1), recent1_menu);
+
+ separator2 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator2, "separator2");
+ gtk_widget_show (separator2);
+ gtk_container_add (GTK_CONTAINER (recent1_menu), separator2);
+ gtk_widget_set_sensitive (separator2, FALSE);
+
+ close2 = gtk_image_menu_item_new_with_mnemonic (_("_Close"));
+ gtk_widget_set_name (close2, "close2");
+ gtk_widget_show (close2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), close2);
+ gtk_widget_add_accelerator (close2, "activate", accel_group,
+ GDK_Q, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5765 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5765, "image5765");
+ gtk_widget_show (image5765);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close2), image5765);
+
+ separator1 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator1, "separator1");
+ gtk_widget_show (separator1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), separator1);
+ gtk_widget_set_sensitive (separator1, FALSE);
+
+ save2 = gtk_image_menu_item_new_with_mnemonic (_("_Save"));
+ gtk_widget_set_name (save2, "save2");
+ gtk_widget_show (save2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), save2);
+ gtk_widget_add_accelerator (save2, "activate", accel_group,
+ GDK_S, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5766 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5766, "image5766");
+ gtk_widget_show (image5766);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (save2), image5766);
+
+ save_as2 = gtk_image_menu_item_new_with_mnemonic (_("Save _As..."));
+ gtk_widget_set_name (save_as2, "save_as2");
+ gtk_widget_show (save_as2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), save_as2);
+ gtk_widget_add_accelerator (save_as2, "activate", accel_group,
+ GDK_S, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5767 = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5767, "image5767");
+ gtk_widget_show (image5767);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (save_as2), image5767);
+
+ save_all1 = gtk_image_menu_item_new_with_mnemonic (_("Save A_ll"));
+ gtk_widget_set_name (save_all1, "save_all1");
+ gtk_widget_show (save_all1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), save_all1);
+ gtk_widget_add_accelerator (save_all1, "activate", accel_group,
+ GDK_S, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5768 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5768, "image5768");
+ gtk_widget_show (image5768);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (save_all1), image5768);
+
+ generate_fonts1 = gtk_image_menu_item_new_with_mnemonic (_("_Generate Fonts..."));
+ gtk_widget_set_name (generate_fonts1, "generate_fonts1");
+ gtk_widget_show (generate_fonts1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), generate_fonts1);
+ gtk_widget_add_accelerator (generate_fonts1, "activate", accel_group,
+ GDK_G, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5769 = create_pixmap (FontView, "filegenerate.png");
+ gtk_widget_set_name (image5769, "image5769");
+ gtk_widget_show (image5769);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (generate_fonts1), image5769);
+
+ generate_mac_family1 = gtk_image_menu_item_new_with_mnemonic (_("Generate Mac _Family..."));
+ gtk_widget_set_name (generate_mac_family1, "generate_mac_family1");
+ gtk_widget_show (generate_mac_family1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), generate_mac_family1);
+ gtk_widget_add_accelerator (generate_mac_family1, "activate", accel_group,
+ GDK_G, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5770 = create_pixmap (FontView, "filegeneratefamily.png");
+ gtk_widget_set_name (image5770, "image5770");
+ gtk_widget_show (image5770);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (generate_mac_family1), image5770);
+
+ separatormenuitem1 = gtk_menu_item_new ();
+ gtk_widget_set_name (separatormenuitem1, "separatormenuitem1");
+ gtk_widget_show (separatormenuitem1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), separatormenuitem1);
+ gtk_widget_set_sensitive (separatormenuitem1, FALSE);
+
+ import1 = gtk_image_menu_item_new_with_mnemonic (_("_Import..."));
+ gtk_widget_set_name (import1, "import1");
+ gtk_widget_show (import1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), import1);
+ gtk_widget_add_accelerator (import1, "activate", accel_group,
+ GDK_I, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5771 = create_pixmap (FontView, "fileimport.png");
+ gtk_widget_set_name (image5771, "image5771");
+ gtk_widget_show (image5771);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (import1), image5771);
+
+ merge_kern_info1 = gtk_menu_item_new_with_mnemonic (_("_Merge Feature Info..."));
+ gtk_widget_set_name (merge_kern_info1, "merge_kern_info1");
+ gtk_widget_show (merge_kern_info1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), merge_kern_info1);
+ gtk_widget_add_accelerator (merge_kern_info1, "activate", accel_group,
+ GDK_K, GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ revert_file1 = gtk_image_menu_item_new_with_mnemonic (_("_Revert File"));
+ gtk_widget_set_name (revert_file1, "revert_file1");
+ gtk_widget_show (revert_file1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), revert_file1);
+ gtk_widget_add_accelerator (revert_file1, "activate", accel_group,
+ GDK_R, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5772 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5772, "image5772");
+ gtk_widget_show (image5772);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (revert_file1), image5772);
+
+ revert_to_backup1 = gtk_image_menu_item_new_with_mnemonic (_("Revert to Backup"));
+ gtk_widget_set_name (revert_to_backup1, "revert_to_backup1");
+ gtk_widget_show (revert_to_backup1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), revert_to_backup1);
+
+ image5773 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5773, "image5773");
+ gtk_widget_show (image5773);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (revert_to_backup1), image5773);
+
+ revert_glyph1 = gtk_image_menu_item_new_with_mnemonic (_("Revert Gl_yph"));
+ gtk_widget_set_name (revert_glyph1, "revert_glyph1");
+ gtk_widget_show (revert_glyph1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), revert_glyph1);
+ gtk_widget_add_accelerator (revert_glyph1, "activate", accel_group,
+ GDK_R, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5774 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5774, "image5774");
+ gtk_widget_show (image5774);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (revert_glyph1), image5774);
+
+ separator4 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator4, "separator4");
+ gtk_widget_show (separator4);
+ gtk_container_add (GTK_CONTAINER (file1_menu), separator4);
+ gtk_widget_set_sensitive (separator4, FALSE);
+
+ print2 = gtk_image_menu_item_new_with_mnemonic (_("_Print..."));
+ gtk_widget_set_name (print2, "print2");
+ gtk_widget_show (print2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), print2);
+ gtk_widget_add_accelerator (print2, "activate", accel_group,
+ GDK_P, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5775 = gtk_image_new_from_stock ("gtk-print", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5775, "image5775");
+ gtk_widget_show (image5775);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (print2), image5775);
+
+ separator5 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator5, "separator5");
+ gtk_widget_show (separator5);
+ gtk_container_add (GTK_CONTAINER (file1_menu), separator5);
+ gtk_widget_set_sensitive (separator5, FALSE);
+
+ execute_script1 = gtk_image_menu_item_new_with_mnemonic (_("E_xecute Script..."));
+ gtk_widget_set_name (execute_script1, "execute_script1");
+ gtk_widget_show (execute_script1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), execute_script1);
+
+ image5776 = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5776, "image5776");
+ gtk_widget_show (image5776);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (execute_script1), image5776);
+
+ script_menu1 = gtk_menu_item_new_with_mnemonic (_("Script Men_u"));
+ gtk_widget_set_name (script_menu1, "script_menu1");
+ gtk_widget_show (script_menu1);
+ gtk_container_add (GTK_CONTAINER (file1_menu), script_menu1);
+
+ script_menu1_menu = gtk_menu_new ();
+ gtk_widget_set_name (script_menu1_menu, "script_menu1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (script_menu1), script_menu1_menu);
+
+ separator8 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator8, "separator8");
+ gtk_widget_show (separator8);
+ gtk_container_add (GTK_CONTAINER (script_menu1_menu), separator8);
+ gtk_widget_set_sensitive (separator8, FALSE);
+
+ separator6 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator6, "separator6");
+ gtk_widget_show (separator6);
+ gtk_container_add (GTK_CONTAINER (file1_menu), separator6);
+ gtk_widget_set_sensitive (separator6, FALSE);
+
+ preferences2 = gtk_image_menu_item_new_with_mnemonic (_("Pr_eferences..."));
+ gtk_widget_set_name (preferences2, "preferences2");
+ gtk_widget_show (preferences2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), preferences2);
+
+ image5777 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5777, "image5777");
+ gtk_widget_show (image5777);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (preferences2), image5777);
+
+ separator7 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator7, "separator7");
+ gtk_widget_show (separator7);
+ gtk_container_add (GTK_CONTAINER (file1_menu), separator7);
+ gtk_widget_set_sensitive (separator7, FALSE);
+
+ quit2 = gtk_image_menu_item_new_with_mnemonic (_("_Quit"));
+ gtk_widget_set_name (quit2, "quit2");
+ gtk_widget_show (quit2);
+ gtk_container_add (GTK_CONTAINER (file1_menu), quit2);
+ gtk_widget_add_accelerator (quit2, "activate", accel_group,
+ GDK_Q, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5778 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5778, "image5778");
+ gtk_widget_show (image5778);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (quit2), image5778);
+
+ edit2 = gtk_menu_item_new_with_mnemonic (_("_Edit"));
+ gtk_widget_set_name (edit2, "edit2");
+ gtk_widget_show (edit2);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), edit2);
+
+ edit2_menu = gtk_menu_new ();
+ gtk_widget_set_name (edit2_menu, "edit2_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (edit2), edit2_menu);
+
+ undo2 = gtk_image_menu_item_new_with_mnemonic (_("_Undo"));
+ gtk_widget_set_name (undo2, "undo2");
+ gtk_widget_show (undo2);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), undo2);
+ gtk_widget_add_accelerator (undo2, "activate", accel_group,
+ GDK_Z, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5779 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5779, "image5779");
+ gtk_widget_show (image5779);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (undo2), image5779);
+
+ redo2 = gtk_image_menu_item_new_with_mnemonic (_("_Redo"));
+ gtk_widget_set_name (redo2, "redo2");
+ gtk_widget_show (redo2);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), redo2);
+ gtk_widget_add_accelerator (redo2, "activate", accel_group,
+ GDK_Y, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5780 = gtk_image_new_from_stock ("gtk-redo", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5780, "image5780");
+ gtk_widget_show (image5780);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (redo2), image5780);
+
+ separator9 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator9, "separator9");
+ gtk_widget_show (separator9);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), separator9);
+ gtk_widget_set_sensitive (separator9, FALSE);
+
+ cut2 = gtk_image_menu_item_new_with_mnemonic (_("Cu_t"));
+ gtk_widget_set_name (cut2, "cut2");
+ gtk_widget_show (cut2);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), cut2);
+ gtk_widget_add_accelerator (cut2, "activate", accel_group,
+ GDK_X, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5781 = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5781, "image5781");
+ gtk_widget_show (image5781);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (cut2), image5781);
+
+ copy2 = gtk_image_menu_item_new_with_mnemonic (_("_Copy"));
+ gtk_widget_set_name (copy2, "copy2");
+ gtk_widget_show (copy2);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy2);
+ gtk_widget_add_accelerator (copy2, "activate", accel_group,
+ GDK_C, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5782 = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5782, "image5782");
+ gtk_widget_show (image5782);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy2), image5782);
+
+ copy_reference1 = gtk_image_menu_item_new_with_mnemonic (_("C_opy Reference"));
+ gtk_widget_set_name (copy_reference1, "copy_reference1");
+ gtk_widget_show (copy_reference1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_reference1);
+ gtk_widget_add_accelerator (copy_reference1, "activate", accel_group,
+ GDK_G, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5783 = create_pixmap (FontView, "editcopyref.png");
+ gtk_widget_set_name (image5783, "image5783");
+ gtk_widget_show (image5783);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_reference1), image5783);
+
+ copy_lookup_data1 = gtk_menu_item_new_with_mnemonic (_("Copy _Lookup Data"));
+ gtk_widget_set_name (copy_lookup_data1, "copy_lookup_data1");
+ gtk_widget_show (copy_lookup_data1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_lookup_data1);
+
+ copy_width1 = gtk_image_menu_item_new_with_mnemonic (_("Copy _Width"));
+ gtk_widget_set_name (copy_width1, "copy_width1");
+ gtk_widget_show (copy_width1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_width1);
+ gtk_widget_add_accelerator (copy_width1, "activate", accel_group,
+ GDK_W, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5784 = create_pixmap (FontView, "editcopywidth.png");
+ gtk_widget_set_name (image5784, "image5784");
+ gtk_widget_show (image5784);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_width1), image5784);
+
+ copy_vwidth1 = gtk_image_menu_item_new_with_mnemonic (_("Copy _VWidth"));
+ gtk_widget_set_name (copy_vwidth1, "copy_vwidth1");
+ gtk_widget_show (copy_vwidth1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_vwidth1);
+
+ image5785 = create_pixmap (FontView, "editcopyvwidth.png");
+ gtk_widget_set_name (image5785, "image5785");
+ gtk_widget_show (image5785);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_vwidth1), image5785);
+
+ copy_lbearing1 = gtk_image_menu_item_new_with_mnemonic (_("Co_py LBearing"));
+ gtk_widget_set_name (copy_lbearing1, "copy_lbearing1");
+ gtk_widget_show (copy_lbearing1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_lbearing1);
+
+ image5786 = create_pixmap (FontView, "editcopylbearing.png");
+ gtk_widget_set_name (image5786, "image5786");
+ gtk_widget_show (image5786);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_lbearing1), image5786);
+
+ copy_rbearing1 = gtk_image_menu_item_new_with_mnemonic (_("Copy RB_earing"));
+ gtk_widget_set_name (copy_rbearing1, "copy_rbearing1");
+ gtk_widget_show (copy_rbearing1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_rbearing1);
+
+ image5787 = create_pixmap (FontView, "editcopyrbearing.png");
+ gtk_widget_set_name (image5787, "image5787");
+ gtk_widget_show (image5787);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_rbearing1), image5787);
+
+ paste2 = gtk_image_menu_item_new_with_mnemonic (_("_Paste"));
+ gtk_widget_set_name (paste2, "paste2");
+ gtk_widget_show (paste2);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), paste2);
+ gtk_widget_add_accelerator (paste2, "activate", accel_group,
+ GDK_V, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5788 = gtk_image_new_from_stock ("gtk-paste", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5788, "image5788");
+ gtk_widget_show (image5788);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (paste2), image5788);
+
+ paste_into1 = gtk_image_menu_item_new_with_mnemonic (_("P_aste Into"));
+ gtk_widget_set_name (paste_into1, "paste_into1");
+ gtk_widget_show (paste_into1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), paste_into1);
+ gtk_widget_add_accelerator (paste_into1, "activate", accel_group,
+ GDK_V, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5789 = gtk_image_new_from_stock ("gtk-paste", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5789, "image5789");
+ gtk_widget_show (image5789);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (paste_into1), image5789);
+
+ paste_after1 = gtk_image_menu_item_new_with_mnemonic (_("Paste After"));
+ gtk_widget_set_name (paste_after1, "paste_after1");
+ gtk_widget_show (paste_after1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), paste_after1);
+ gtk_widget_add_accelerator (paste_after1, "activate", accel_group,
+ GDK_V, GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5790 = gtk_image_new_from_stock ("gtk-paste", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5790, "image5790");
+ gtk_widget_show (image5790);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (paste_after1), image5790);
+
+ same_glyph_as1 = gtk_menu_item_new_with_mnemonic (_("Sa_me Glyph As"));
+ gtk_widget_set_name (same_glyph_as1, "same_glyph_as1");
+ gtk_widget_show (same_glyph_as1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), same_glyph_as1);
+
+ clear2 = gtk_image_menu_item_new_with_mnemonic (_("C_lear"));
+ gtk_widget_set_name (clear2, "clear2");
+ gtk_widget_show (clear2);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), clear2);
+ gtk_widget_add_accelerator (clear2, "activate", accel_group,
+ GDK_Delete, 0,
+ GTK_ACCEL_VISIBLE);
+
+ image5791 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5791, "image5791");
+ gtk_widget_show (image5791);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (clear2), image5791);
+
+ clear_background1 = gtk_image_menu_item_new_with_mnemonic (_("Clear _Background"));
+ gtk_widget_set_name (clear_background1, "clear_background1");
+ gtk_widget_show (clear_background1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), clear_background1);
+
+ image5792 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5792, "image5792");
+ gtk_widget_show (image5792);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (clear_background1), image5792);
+
+ copy_fg_to_bg1 = gtk_image_menu_item_new_with_mnemonic (_("Copy _Fg to Bg"));
+ gtk_widget_set_name (copy_fg_to_bg1, "copy_fg_to_bg1");
+ gtk_widget_show (copy_fg_to_bg1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_fg_to_bg1);
+
+ image5793 = create_pixmap (FontView, "editcopyfg2bg.png");
+ gtk_widget_set_name (image5793, "image5793");
+ gtk_widget_show (image5793);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_fg_to_bg1), image5793);
+
+ join1 = gtk_menu_item_new_with_mnemonic (_("_Join"));
+ gtk_widget_set_name (join1, "join1");
+ gtk_widget_show (join1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), join1);
+ gtk_widget_add_accelerator (join1, "activate", accel_group,
+ GDK_J, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ separator10 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator10, "separator10");
+ gtk_widget_show (separator10);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), separator10);
+ gtk_widget_set_sensitive (separator10, FALSE);
+
+ select1 = gtk_menu_item_new_with_mnemonic (_("_Select"));
+ gtk_widget_set_name (select1, "select1");
+ gtk_widget_show (select1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), select1);
+
+ select1_menu = gtk_menu_new ();
+ gtk_widget_set_name (select1_menu, "select1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (select1), select1_menu);
+
+ select_all1 = gtk_menu_item_new_with_mnemonic (_("Select _All"));
+ gtk_widget_set_name (select_all1, "select_all1");
+ gtk_widget_show (select_all1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), select_all1);
+ gtk_widget_add_accelerator (select_all1, "activate", accel_group,
+ GDK_A, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ invert_selection1 = gtk_menu_item_new_with_mnemonic (_("_Invert Selection"));
+ gtk_widget_set_name (invert_selection1, "invert_selection1");
+ gtk_widget_show (invert_selection1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), invert_selection1);
+ gtk_widget_add_accelerator (invert_selection1, "activate", accel_group,
+ GDK_Escape, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ deselect_all1 = gtk_menu_item_new_with_mnemonic (_("_Deselect All"));
+ gtk_widget_set_name (deselect_all1, "deselect_all1");
+ gtk_widget_show (deselect_all1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), deselect_all1);
+ gtk_widget_add_accelerator (deselect_all1, "activate", accel_group,
+ GDK_Escape, 0,
+ GTK_ACCEL_VISIBLE);
+
+ select_by_color1 = gtk_menu_item_new_with_mnemonic (_("Select by _Color"));
+ gtk_widget_set_name (select_by_color1, "select_by_color1");
+ gtk_widget_show (select_by_color1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), select_by_color1);
+
+ select_by_color1_menu = gtk_menu_new ();
+ gtk_widget_set_name (select_by_color1_menu, "select_by_color1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (select_by_color1), select_by_color1_menu);
+
+ default1 = gtk_image_menu_item_new_with_mnemonic (_("Default"));
+ gtk_widget_set_name (default1, "default1");
+ gtk_widget_show (default1);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), default1);
+
+ image5794 = create_pixmap (FontView, "selectdefault.png");
+ gtk_widget_set_name (image5794, "image5794");
+ gtk_widget_show (image5794);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (default1), image5794);
+
+ white = gtk_image_menu_item_new_with_mnemonic (_(" "));
+ gtk_widget_set_name (white, "white");
+ gtk_widget_show (white);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), white);
+
+ image5795 = create_pixmap (FontView, "selectwhite.png");
+ gtk_widget_set_name (image5795, "image5795");
+ gtk_widget_show (image5795);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (white), image5795);
+
+ red = gtk_image_menu_item_new_with_mnemonic (_(" "));
+ gtk_widget_set_name (red, "red");
+ gtk_widget_show (red);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), red);
+
+ image5796 = create_pixmap (FontView, "selectred.png");
+ gtk_widget_set_name (image5796, "image5796");
+ gtk_widget_show (image5796);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (red), image5796);
+
+ green = gtk_image_menu_item_new_with_mnemonic (_(" "));
+ gtk_widget_set_name (green, "green");
+ gtk_widget_show (green);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), green);
+
+ image5797 = create_pixmap (FontView, "selectgreen.png");
+ gtk_widget_set_name (image5797, "image5797");
+ gtk_widget_show (image5797);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (green), image5797);
+
+ blue = gtk_image_menu_item_new_with_mnemonic (_(" "));
+ gtk_widget_set_name (blue, "blue");
+ gtk_widget_show (blue);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), blue);
+
+ image5798 = create_pixmap (FontView, "selectblue.png");
+ gtk_widget_set_name (image5798, "image5798");
+ gtk_widget_show (image5798);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (blue), image5798);
+
+ yellow = gtk_image_menu_item_new_with_mnemonic (_(" "));
+ gtk_widget_set_name (yellow, "yellow");
+ gtk_widget_show (yellow);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), yellow);
+
+ image5799 = create_pixmap (FontView, "selectyellow.png");
+ gtk_widget_set_name (image5799, "image5799");
+ gtk_widget_show (image5799);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (yellow), image5799);
+
+ cyan = gtk_image_menu_item_new_with_mnemonic (_(" "));
+ gtk_widget_set_name (cyan, "cyan");
+ gtk_widget_show (cyan);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), cyan);
+
+ image5800 = create_pixmap (FontView, "selectcyan.png");
+ gtk_widget_set_name (image5800, "image5800");
+ gtk_widget_show (image5800);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (cyan), image5800);
+
+ magenta = gtk_image_menu_item_new_with_mnemonic (_(" "));
+ gtk_widget_set_name (magenta, "magenta");
+ gtk_widget_show (magenta);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), magenta);
+
+ image5801 = create_pixmap (FontView, "selectmagenta.png");
+ gtk_widget_set_name (image5801, "image5801");
+ gtk_widget_show (image5801);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (magenta), image5801);
+
+ color_picker1 = gtk_image_menu_item_new_with_mnemonic (_("Color Picker"));
+ gtk_widget_set_name (color_picker1, "color_picker1");
+ gtk_widget_show (color_picker1);
+ gtk_container_add (GTK_CONTAINER (select_by_color1_menu), color_picker1);
+
+ image5802 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5802, "image5802");
+ gtk_widget_show (image5802);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (color_picker1), image5802);
+
+ select_by_wildcard1 = gtk_menu_item_new_with_mnemonic (_("Select by _Wildcard"));
+ gtk_widget_set_name (select_by_wildcard1, "select_by_wildcard1");
+ gtk_widget_show (select_by_wildcard1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), select_by_wildcard1);
+
+ select_by_script1 = gtk_menu_item_new_with_mnemonic (_("Select by _Script"));
+ gtk_widget_set_name (select_by_script1, "select_by_script1");
+ gtk_widget_show (select_by_script1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), select_by_script1);
+
+ separator11 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator11, "separator11");
+ gtk_widget_show (separator11);
+ gtk_container_add (GTK_CONTAINER (select1_menu), separator11);
+ gtk_widget_set_sensitive (separator11, FALSE);
+
+ glyphs_worth_outputting1 = gtk_menu_item_new_with_mnemonic (_("_Glyphs Worth Outputting"));
+ gtk_widget_set_name (glyphs_worth_outputting1, "glyphs_worth_outputting1");
+ gtk_widget_show (glyphs_worth_outputting1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), glyphs_worth_outputting1);
+
+ changed_glyphs1 = gtk_menu_item_new_with_mnemonic (_("_Changed Glyphs"));
+ gtk_widget_set_name (changed_glyphs1, "changed_glyphs1");
+ gtk_widget_show (changed_glyphs1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), changed_glyphs1);
+
+ unhinted_glyphs1 = gtk_menu_item_new_with_mnemonic (_("_Hinting Needed"));
+ gtk_widget_set_name (unhinted_glyphs1, "unhinted_glyphs1");
+ gtk_widget_show (unhinted_glyphs1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), unhinted_glyphs1);
+
+ autohintable1 = gtk_menu_item_new_with_mnemonic (_("Autohinta_ble"));
+ gtk_widget_set_name (autohintable1, "autohintable1");
+ gtk_widget_show (autohintable1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), autohintable1);
+
+ separator63 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator63, "separator63");
+ gtk_widget_show (separator63);
+ gtk_container_add (GTK_CONTAINER (select1_menu), separator63);
+ gtk_widget_set_sensitive (separator63, FALSE);
+
+ select_by_att1 = gtk_menu_item_new_with_mnemonic (_("Select by Lookup Subtable.."));
+ gtk_widget_set_name (select_by_att1, "select_by_att1");
+ gtk_widget_show (select_by_att1);
+ gtk_container_add (GTK_CONTAINER (select1_menu), select_by_att1);
+
+ find_and_replace1 = gtk_image_menu_item_new_with_mnemonic (_("F_ind / Replace..."));
+ gtk_widget_set_name (find_and_replace1, "find_and_replace1");
+ gtk_widget_show (find_and_replace1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), find_and_replace1);
+ gtk_widget_add_accelerator (find_and_replace1, "activate", accel_group,
+ GDK_F, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5803 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5803, "image5803");
+ gtk_widget_show (image5803);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_and_replace1), image5803);
+
+ replace_with_reference1 = gtk_menu_item_new_with_mnemonic (_("Replace wit_h Reference"));
+ gtk_widget_set_name (replace_with_reference1, "replace_with_reference1");
+ gtk_widget_show (replace_with_reference1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), replace_with_reference1);
+ gtk_widget_add_accelerator (replace_with_reference1, "activate", accel_group,
+ GDK_F, GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ separator12 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator12, "separator12");
+ gtk_widget_show (separator12);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), separator12);
+ gtk_widget_set_sensitive (separator12, FALSE);
+
+ unlink_reference1 = gtk_image_menu_item_new_with_mnemonic (_("Unlin_k Reference"));
+ gtk_widget_set_name (unlink_reference1, "unlink_reference1");
+ gtk_widget_show (unlink_reference1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), unlink_reference1);
+ gtk_widget_add_accelerator (unlink_reference1, "activate", accel_group,
+ GDK_U, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5804 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5804, "image5804");
+ gtk_widget_show (image5804);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (unlink_reference1), image5804);
+
+ separator13 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator13, "separator13");
+ gtk_widget_show (separator13);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), separator13);
+ gtk_widget_set_sensitive (separator13, FALSE);
+
+ copy_from1 = gtk_menu_item_new_with_mnemonic (_("Cop_y From"));
+ gtk_widget_set_name (copy_from1, "copy_from1");
+ gtk_widget_show (copy_from1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), copy_from1);
+
+ copy_from1_menu = gtk_menu_new ();
+ gtk_widget_set_name (copy_from1_menu, "copy_from1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (copy_from1), copy_from1_menu);
+
+ all_fonts1 = gtk_radio_menu_item_new_with_mnemonic (all_fonts1_group, _("_Outline & Bitmap Strikes"));
+ all_fonts1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (all_fonts1));
+ gtk_widget_set_name (all_fonts1, "all_fonts1");
+ gtk_widget_show (all_fonts1);
+ gtk_container_add (GTK_CONTAINER (copy_from1_menu), all_fonts1);
+
+ displayed_fonts1 = gtk_radio_menu_item_new_with_mnemonic (all_fonts1_group, _("_Displayed Strike"));
+ all_fonts1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (displayed_fonts1));
+ gtk_widget_set_name (displayed_fonts1, "displayed_fonts1");
+ gtk_widget_show (displayed_fonts1);
+ gtk_container_add (GTK_CONTAINER (copy_from1_menu), displayed_fonts1);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (displayed_fonts1), TRUE);
+
+ separator15 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator15, "separator15");
+ gtk_widget_show (separator15);
+ gtk_container_add (GTK_CONTAINER (copy_from1_menu), separator15);
+ gtk_widget_set_sensitive (separator15, FALSE);
+
+ glyph_metadata1 = gtk_check_menu_item_new_with_mnemonic (_("_Glyph Metadata"));
+ gtk_widget_set_name (glyph_metadata1, "glyph_metadata1");
+ gtk_widget_show (glyph_metadata1);
+ gtk_container_add (GTK_CONTAINER (copy_from1_menu), glyph_metadata1);
+
+ separator88 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator88, "separator88");
+ gtk_widget_show (separator88);
+ gtk_container_add (GTK_CONTAINER (copy_from1_menu), separator88);
+ gtk_widget_set_sensitive (separator88, FALSE);
+
+ truetype_instructions1 = gtk_menu_item_new_with_mnemonic (_("_TrueType Instructions"));
+ gtk_widget_set_name (truetype_instructions1, "truetype_instructions1");
+ gtk_widget_show (truetype_instructions1);
+ gtk_container_add (GTK_CONTAINER (copy_from1_menu), truetype_instructions1);
+
+ separator14 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator14, "separator14");
+ gtk_widget_show (separator14);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), separator14);
+ gtk_widget_set_sensitive (separator14, FALSE);
+
+ remove_undoes1 = gtk_image_menu_item_new_with_mnemonic (_("Remove Un_does"));
+ gtk_widget_set_name (remove_undoes1, "remove_undoes1");
+ gtk_widget_show (remove_undoes1);
+ gtk_container_add (GTK_CONTAINER (edit2_menu), remove_undoes1);
+
+ image5805 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5805, "image5805");
+ gtk_widget_show (image5805);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove_undoes1), image5805);
+
+ element1 = gtk_menu_item_new_with_mnemonic (_("E_lement"));
+ gtk_widget_set_name (element1, "element1");
+ gtk_widget_show (element1);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), element1);
+
+ element1_menu = gtk_menu_new ();
+ gtk_widget_set_name (element1_menu, "element1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (element1), element1_menu);
+
+ font_info1 = gtk_image_menu_item_new_with_mnemonic (_("_Font Info..."));
+ gtk_widget_set_name (font_info1, "font_info1");
+ gtk_widget_show (font_info1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), font_info1);
+ gtk_widget_add_accelerator (font_info1, "activate", accel_group,
+ GDK_F, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5806 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5806, "image5806");
+ gtk_widget_show (image5806);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (font_info1), image5806);
+
+ char_info1 = gtk_image_menu_item_new_with_mnemonic (_("Glyph _Info..."));
+ gtk_widget_set_name (char_info1, "char_info1");
+ gtk_widget_show (char_info1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), char_info1);
+ gtk_widget_add_accelerator (char_info1, "activate", accel_group,
+ GDK_I, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5807 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5807, "image5807");
+ gtk_widget_show (image5807);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (char_info1), image5807);
+
+ other_info1 = gtk_menu_item_new_with_mnemonic (_("Other Info"));
+ gtk_widget_set_name (other_info1, "other_info1");
+ gtk_widget_show (other_info1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), other_info1);
+
+ other_info1_menu = gtk_menu_new ();
+ gtk_widget_set_name (other_info1_menu, "other_info1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (other_info1), other_info1_menu);
+
+ math_info1 = gtk_image_menu_item_new_with_mnemonic (_("_Math Info..."));
+ gtk_widget_set_name (math_info1, "math_info1");
+ gtk_widget_show (math_info1);
+ gtk_container_add (GTK_CONTAINER (other_info1_menu), math_info1);
+
+ image5808 = create_pixmap (FontView, "elementmathinfo.png");
+ gtk_widget_set_name (image5808, "image5808");
+ gtk_widget_show (image5808);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (math_info1), image5808);
+
+ bdf_info3 = gtk_menu_item_new_with_mnemonic (_("_BDF Info..."));
+ gtk_widget_set_name (bdf_info3, "bdf_info3");
+ gtk_widget_show (bdf_info3);
+ gtk_container_add (GTK_CONTAINER (other_info1_menu), bdf_info3);
+
+ show_dependent1 = gtk_menu_item_new_with_mnemonic (_("Show _Dependent"));
+ gtk_widget_set_name (show_dependent1, "show_dependent1");
+ gtk_widget_show (show_dependent1);
+ gtk_container_add (GTK_CONTAINER (other_info1_menu), show_dependent1);
+
+ show_dependent1_menu = gtk_menu_new ();
+ gtk_widget_set_name (show_dependent1_menu, "show_dependent1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (show_dependent1), show_dependent1_menu);
+
+ references2 = gtk_menu_item_new_with_mnemonic (_("_References..."));
+ gtk_widget_set_name (references2, "references2");
+ gtk_widget_show (references2);
+ gtk_container_add (GTK_CONTAINER (show_dependent1_menu), references2);
+
+ substitutions3 = gtk_menu_item_new_with_mnemonic (_("_Substitutions"));
+ gtk_widget_set_name (substitutions3, "substitutions3");
+ gtk_widget_show (substitutions3);
+ gtk_container_add (GTK_CONTAINER (show_dependent1_menu), substitutions3);
+
+ mass_glyph_rename1 = gtk_menu_item_new_with_mnemonic (_("Mass Glyph _Rename..."));
+ gtk_widget_set_name (mass_glyph_rename1, "mass_glyph_rename1");
+ gtk_widget_show (mass_glyph_rename1);
+ gtk_container_add (GTK_CONTAINER (other_info1_menu), mass_glyph_rename1);
+
+ find_problems1 = gtk_image_menu_item_new_with_mnemonic (_("Find Pr_oblems..."));
+ gtk_widget_set_name (find_problems1, "find_problems1");
+ gtk_widget_show (find_problems1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), find_problems1);
+ gtk_widget_add_accelerator (find_problems1, "activate", accel_group,
+ GDK_E, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5809 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5809, "image5809");
+ gtk_widget_show (image5809);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_problems1), image5809);
+
+ validate1 = gtk_image_menu_item_new_with_mnemonic (_("_Validate"));
+ gtk_widget_set_name (validate1, "validate1");
+ gtk_widget_show (validate1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), validate1);
+
+ image5810 = create_pixmap (FontView, "elementvalidate.png");
+ gtk_widget_set_name (image5810, "image5810");
+ gtk_widget_show (image5810);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (validate1), image5810);
+
+ separator22 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator22, "separator22");
+ gtk_widget_show (separator22);
+ gtk_container_add (GTK_CONTAINER (element1_menu), separator22);
+ gtk_widget_set_sensitive (separator22, FALSE);
+
+ bitmaps_available1 = gtk_image_menu_item_new_with_mnemonic (_("Bitma_p Strikes Available..."));
+ gtk_widget_set_name (bitmaps_available1, "bitmaps_available1");
+ gtk_widget_show (bitmaps_available1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), bitmaps_available1);
+ gtk_widget_add_accelerator (bitmaps_available1, "activate", accel_group,
+ GDK_B, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5811 = create_pixmap (FontView, "elementbitmapsavail.png");
+ gtk_widget_set_name (image5811, "image5811");
+ gtk_widget_show (image5811);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (bitmaps_available1), image5811);
+
+ regenerate_bitmaps1 = gtk_image_menu_item_new_with_mnemonic (_("Re_generate Bitmap Glyphs..."));
+ gtk_widget_set_name (regenerate_bitmaps1, "regenerate_bitmaps1");
+ gtk_widget_show (regenerate_bitmaps1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), regenerate_bitmaps1);
+ gtk_widget_add_accelerator (regenerate_bitmaps1, "activate", accel_group,
+ GDK_B, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5812 = create_pixmap (FontView, "elementregenbitmaps.png");
+ gtk_widget_set_name (image5812, "image5812");
+ gtk_widget_show (image5812);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (regenerate_bitmaps1), image5812);
+
+ remove_bitmap_glyphs1 = gtk_menu_item_new_with_mnemonic (_("Remove Bitmap Glyphs..."));
+ gtk_widget_set_name (remove_bitmap_glyphs1, "remove_bitmap_glyphs1");
+ gtk_widget_show (remove_bitmap_glyphs1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), remove_bitmap_glyphs1);
+
+ separator23 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator23, "separator23");
+ gtk_widget_show (separator23);
+ gtk_container_add (GTK_CONTAINER (element1_menu), separator23);
+ gtk_widget_set_sensitive (separator23, FALSE);
+
+ style1 = gtk_image_menu_item_new_with_mnemonic (_("Style"));
+ gtk_widget_set_name (style1, "style1");
+ gtk_widget_show (style1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), style1);
+
+ image5813 = create_pixmap (FontView, "changeweight.png");
+ gtk_widget_set_name (image5813, "image5813");
+ gtk_widget_show (image5813);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (style1), image5813);
+
+ style1_menu = gtk_menu_new ();
+ gtk_widget_set_name (style1_menu, "style1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (style1), style1_menu);
+
+ change_weight1 = gtk_image_menu_item_new_with_mnemonic (_("Change _Weight..."));
+ gtk_widget_set_name (change_weight1, "change_weight1");
+ gtk_widget_show (change_weight1);
+ gtk_container_add (GTK_CONTAINER (style1_menu), change_weight1);
+
+ image5814 = create_pixmap (FontView, "changeweight.png");
+ gtk_widget_set_name (image5814, "image5814");
+ gtk_widget_show (image5814);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (change_weight1), image5814);
+
+ oblique1 = gtk_image_menu_item_new_with_mnemonic (_("Obl_ique"));
+ gtk_widget_set_name (oblique1, "oblique1");
+ gtk_widget_show (oblique1);
+ gtk_container_add (GTK_CONTAINER (style1_menu), oblique1);
+
+ image5815 = create_pixmap (FontView, "oblique.png");
+ gtk_widget_set_name (image5815, "image5815");
+ gtk_widget_show (image5815);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (oblique1), image5815);
+
+ condense_extend1 = gtk_image_menu_item_new_with_mnemonic (_("_Condense/Extend..."));
+ gtk_widget_set_name (condense_extend1, "condense_extend1");
+ gtk_widget_show (condense_extend1);
+ gtk_container_add (GTK_CONTAINER (style1_menu), condense_extend1);
+
+ image5816 = create_pixmap (FontView, "extendcondense.png");
+ gtk_widget_set_name (image5816, "image5816");
+ gtk_widget_show (image5816);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (condense_extend1), image5816);
+
+ inline2 = gtk_image_menu_item_new_with_mnemonic (_("_Inline"));
+ gtk_widget_set_name (inline2, "inline2");
+ gtk_widget_show (inline2);
+ gtk_container_add (GTK_CONTAINER (style1_menu), inline2);
+
+ image5817 = create_pixmap (FontView, "inline.png");
+ gtk_widget_set_name (image5817, "image5817");
+ gtk_widget_show (image5817);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (inline2), image5817);
+
+ outline3 = gtk_image_menu_item_new_with_mnemonic (_("_Outline"));
+ gtk_widget_set_name (outline3, "outline3");
+ gtk_widget_show (outline3);
+ gtk_container_add (GTK_CONTAINER (style1_menu), outline3);
+
+ image5818 = create_pixmap (FontView, "outline.png");
+ gtk_widget_set_name (image5818, "image5818");
+ gtk_widget_show (image5818);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (outline3), image5818);
+
+ shadow2 = gtk_image_menu_item_new_with_mnemonic (_("_Shadow"));
+ gtk_widget_set_name (shadow2, "shadow2");
+ gtk_widget_show (shadow2);
+ gtk_container_add (GTK_CONTAINER (style1_menu), shadow2);
+
+ image5819 = create_pixmap (FontView, "shadow.png");
+ gtk_widget_set_name (image5819, "image5819");
+ gtk_widget_show (image5819);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (shadow2), image5819);
+
+ wireframe2 = gtk_image_menu_item_new_with_mnemonic (_("_Wireframe"));
+ gtk_widget_set_name (wireframe2, "wireframe2");
+ gtk_widget_show (wireframe2);
+ gtk_container_add (GTK_CONTAINER (style1_menu), wireframe2);
+
+ image5820 = create_pixmap (FontView, "wireframe.png");
+ gtk_widget_set_name (image5820, "image5820");
+ gtk_widget_show (image5820);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (wireframe2), image5820);
+
+ transformations1 = gtk_image_menu_item_new_with_mnemonic (_("_Transformations"));
+ gtk_widget_set_name (transformations1, "transformations1");
+ gtk_widget_show (transformations1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), transformations1);
+
+ image5821 = create_pixmap (FontView, "elementtransform.png");
+ gtk_widget_set_name (image5821, "image5821");
+ gtk_widget_show (image5821);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (transformations1), image5821);
+
+ transformations1_menu = gtk_menu_new ();
+ gtk_widget_set_name (transformations1_menu, "transformations1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (transformations1), transformations1_menu);
+
+ transform1 = gtk_image_menu_item_new_with_mnemonic (_("_Transform..."));
+ gtk_widget_set_name (transform1, "transform1");
+ gtk_widget_show (transform1);
+ gtk_container_add (GTK_CONTAINER (transformations1_menu), transform1);
+
+ image5822 = create_pixmap (FontView, "elementtransform.png");
+ gtk_widget_set_name (image5822, "image5822");
+ gtk_widget_show (image5822);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (transform1), image5822);
+
+ point_of_view_projection1 = gtk_menu_item_new_with_mnemonic (_("_Point of View Projection..."));
+ gtk_widget_set_name (point_of_view_projection1, "point_of_view_projection1");
+ gtk_widget_show (point_of_view_projection1);
+ gtk_container_add (GTK_CONTAINER (transformations1_menu), point_of_view_projection1);
+
+ non_linear_transform1 = gtk_menu_item_new_with_mnemonic (_("_Non Linear Transform..."));
+ gtk_widget_set_name (non_linear_transform1, "non_linear_transform1");
+ gtk_widget_show (non_linear_transform1);
+ gtk_container_add (GTK_CONTAINER (transformations1_menu), non_linear_transform1);
+
+ expand_stroke1 = gtk_image_menu_item_new_with_mnemonic (_("_Expand Stroke..."));
+ gtk_widget_set_name (expand_stroke1, "expand_stroke1");
+ gtk_widget_show (expand_stroke1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), expand_stroke1);
+ gtk_widget_add_accelerator (expand_stroke1, "activate", accel_group,
+ GDK_E, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5823 = create_pixmap (FontView, "elementexpandstroke.png");
+ gtk_widget_set_name (image5823, "image5823");
+ gtk_widget_show (image5823);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (expand_stroke1), image5823);
+
+ tilepath1 = gtk_menu_item_new_with_mnemonic (_("TilePath..."));
+ gtk_widget_set_name (tilepath1, "tilepath1");
+ gtk_widget_show (tilepath1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), tilepath1);
+
+ overlap1 = gtk_image_menu_item_new_with_mnemonic (_("O_verlap"));
+ gtk_widget_set_name (overlap1, "overlap1");
+ gtk_widget_show (overlap1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), overlap1);
+
+ image5824 = create_pixmap (FontView, "rmoverlap.png");
+ gtk_widget_set_name (image5824, "image5824");
+ gtk_widget_show (image5824);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (overlap1), image5824);
+
+ overlap1_menu = gtk_menu_new ();
+ gtk_widget_set_name (overlap1_menu, "overlap1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (overlap1), overlap1_menu);
+
+ remove_overlap1 = gtk_image_menu_item_new_with_mnemonic (_("_Remove Overlap"));
+ gtk_widget_set_name (remove_overlap1, "remove_overlap1");
+ gtk_widget_show (remove_overlap1);
+ gtk_container_add (GTK_CONTAINER (overlap1_menu), remove_overlap1);
+ gtk_widget_add_accelerator (remove_overlap1, "activate", accel_group,
+ GDK_O, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5825 = create_pixmap (FontView, "rmoverlap.png");
+ gtk_widget_set_name (image5825, "image5825");
+ gtk_widget_show (image5825);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove_overlap1), image5825);
+
+ intersect1 = gtk_image_menu_item_new_with_mnemonic (_("_Intersect"));
+ gtk_widget_set_name (intersect1, "intersect1");
+ gtk_widget_show (intersect1);
+ gtk_container_add (GTK_CONTAINER (overlap1_menu), intersect1);
+
+ image5826 = create_pixmap (FontView, "intersection.png");
+ gtk_widget_set_name (image5826, "image5826");
+ gtk_widget_show (image5826);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (intersect1), image5826);
+
+ find_intersection1 = gtk_image_menu_item_new_with_mnemonic (_("_Find Intersection"));
+ gtk_widget_set_name (find_intersection1, "find_intersection1");
+ gtk_widget_show (find_intersection1);
+ gtk_container_add (GTK_CONTAINER (overlap1_menu), find_intersection1);
+
+ image5827 = create_pixmap (FontView, "findinter.png");
+ gtk_widget_set_name (image5827, "image5827");
+ gtk_widget_show (image5827);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_intersection1), image5827);
+
+ simplify3 = gtk_image_menu_item_new_with_mnemonic (_("_Simplify"));
+ gtk_widget_set_name (simplify3, "simplify3");
+ gtk_widget_show (simplify3);
+ gtk_container_add (GTK_CONTAINER (element1_menu), simplify3);
+
+ image5828 = create_pixmap (FontView, "elementsimplify.png");
+ gtk_widget_set_name (image5828, "image5828");
+ gtk_widget_show (image5828);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (simplify3), image5828);
+
+ simplify3_menu = gtk_menu_new ();
+ gtk_widget_set_name (simplify3_menu, "simplify3_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (simplify3), simplify3_menu);
+
+ simplify2 = gtk_image_menu_item_new_with_mnemonic (_("_Simplify"));
+ gtk_widget_set_name (simplify2, "simplify2");
+ gtk_widget_show (simplify2);
+ gtk_container_add (GTK_CONTAINER (simplify3_menu), simplify2);
+ gtk_widget_add_accelerator (simplify2, "activate", accel_group,
+ GDK_M, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5829 = create_pixmap (FontView, "elementsimplify.png");
+ gtk_widget_set_name (image5829, "image5829");
+ gtk_widget_show (image5829);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (simplify2), image5829);
+
+ simplify_more1 = gtk_menu_item_new_with_mnemonic (_("Simplify _More..."));
+ gtk_widget_set_name (simplify_more1, "simplify_more1");
+ gtk_widget_show (simplify_more1);
+ gtk_container_add (GTK_CONTAINER (simplify3_menu), simplify_more1);
+ gtk_widget_add_accelerator (simplify_more1, "activate", accel_group,
+ GDK_M, GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ cleanup1 = gtk_menu_item_new_with_mnemonic (_("_Cleanup"));
+ gtk_widget_set_name (cleanup1, "cleanup1");
+ gtk_widget_show (cleanup1);
+ gtk_container_add (GTK_CONTAINER (simplify3_menu), cleanup1);
+
+ canonical_start_point1 = gtk_menu_item_new_with_mnemonic (_("Canonical Start _Point"));
+ gtk_widget_set_name (canonical_start_point1, "canonical_start_point1");
+ gtk_widget_show (canonical_start_point1);
+ gtk_container_add (GTK_CONTAINER (simplify3_menu), canonical_start_point1);
+
+ canonical_contours1 = gtk_menu_item_new_with_mnemonic (_("Canonical Conto_urs"));
+ gtk_widget_set_name (canonical_contours1, "canonical_contours1");
+ gtk_widget_show (canonical_contours1);
+ gtk_container_add (GTK_CONTAINER (simplify3_menu), canonical_contours1);
+
+ add_extrema1 = gtk_image_menu_item_new_with_mnemonic (_("Add E_xtrema"));
+ gtk_widget_set_name (add_extrema1, "add_extrema1");
+ gtk_widget_show (add_extrema1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), add_extrema1);
+ gtk_widget_add_accelerator (add_extrema1, "activate", accel_group,
+ GDK_X, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5830 = create_pixmap (FontView, "elementaddextrema.png");
+ gtk_widget_set_name (image5830, "image5830");
+ gtk_widget_show (image5830);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_extrema1), image5830);
+
+ round1 = gtk_menu_item_new_with_mnemonic (_("Roun_d"));
+ gtk_widget_set_name (round1, "round1");
+ gtk_widget_show (round1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), round1);
+
+ round1_menu = gtk_menu_new ();
+ gtk_widget_set_name (round1_menu, "round1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (round1), round1_menu);
+
+ round_to_int1 = gtk_menu_item_new_with_mnemonic (_("To _Int"));
+ gtk_widget_set_name (round_to_int1, "round_to_int1");
+ gtk_widget_show (round_to_int1);
+ gtk_container_add (GTK_CONTAINER (round1_menu), round_to_int1);
+
+ to_hundredths1 = gtk_menu_item_new_with_mnemonic (_("To _Hundredths"));
+ gtk_widget_set_name (to_hundredths1, "to_hundredths1");
+ gtk_widget_show (to_hundredths1);
+ gtk_container_add (GTK_CONTAINER (round1_menu), to_hundredths1);
+
+ cluster1 = gtk_menu_item_new_with_mnemonic (_("_Cluster"));
+ gtk_widget_set_name (cluster1, "cluster1");
+ gtk_widget_show (cluster1);
+ gtk_container_add (GTK_CONTAINER (round1_menu), cluster1);
+
+ autotrace1 = gtk_menu_item_new_with_mnemonic (_("Autot_race"));
+ gtk_widget_set_name (autotrace1, "autotrace1");
+ gtk_widget_show (autotrace1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), autotrace1);
+
+ separator25 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator25, "separator25");
+ gtk_widget_show (separator25);
+ gtk_container_add (GTK_CONTAINER (element1_menu), separator25);
+ gtk_widget_set_sensitive (separator25, FALSE);
+
+ correct_direction1 = gtk_image_menu_item_new_with_mnemonic (_("_Correct Direction"));
+ gtk_widget_set_name (correct_direction1, "correct_direction1");
+ gtk_widget_show (correct_direction1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), correct_direction1);
+
+ image5831 = create_pixmap (FontView, "elementcorrectdir.png");
+ gtk_widget_set_name (image5831, "image5831");
+ gtk_widget_show (image5831);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (correct_direction1), image5831);
+
+ separator26 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator26, "separator26");
+ gtk_widget_show (separator26);
+ gtk_container_add (GTK_CONTAINER (element1_menu), separator26);
+ gtk_widget_set_sensitive (separator26, FALSE);
+
+ build1 = gtk_image_menu_item_new_with_mnemonic (_("_Build"));
+ gtk_widget_set_name (build1, "build1");
+ gtk_widget_show (build1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), build1);
+
+ image5832 = create_pixmap (FontView, "elementbuildaccent.png");
+ gtk_widget_set_name (image5832, "image5832");
+ gtk_widget_show (image5832);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (build1), image5832);
+
+ build1_menu = gtk_menu_new ();
+ gtk_widget_set_name (build1_menu, "build1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (build1), build1_menu);
+
+ build_accented_glyph1 = gtk_image_menu_item_new_with_mnemonic (_("Build _Accented Glyph"));
+ gtk_widget_set_name (build_accented_glyph1, "build_accented_glyph1");
+ gtk_widget_show (build_accented_glyph1);
+ gtk_container_add (GTK_CONTAINER (build1_menu), build_accented_glyph1);
+ gtk_widget_add_accelerator (build_accented_glyph1, "activate", accel_group,
+ GDK_A, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5833 = create_pixmap (FontView, "elementbuildaccent.png");
+ gtk_widget_set_name (image5833, "image5833");
+ gtk_widget_show (image5833);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (build_accented_glyph1), image5833);
+
+ build_composite_glyph1 = gtk_menu_item_new_with_mnemonic (_("Build _Composite Glyph"));
+ gtk_widget_set_name (build_composite_glyph1, "build_composite_glyph1");
+ gtk_widget_show (build_composite_glyph1);
+ gtk_container_add (GTK_CONTAINER (build1_menu), build_composite_glyph1);
+
+ separator27 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator27, "separator27");
+ gtk_widget_show (separator27);
+ gtk_container_add (GTK_CONTAINER (element1_menu), separator27);
+ gtk_widget_set_sensitive (separator27, FALSE);
+
+ merge_fonts1 = gtk_menu_item_new_with_mnemonic (_("_Merge Fonts..."));
+ gtk_widget_set_name (merge_fonts1, "merge_fonts1");
+ gtk_widget_show (merge_fonts1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), merge_fonts1);
+
+ interpolate_fonts1 = gtk_menu_item_new_with_mnemonic (_("Interpo_late Fonts..."));
+ gtk_widget_set_name (interpolate_fonts1, "interpolate_fonts1");
+ gtk_widget_show (interpolate_fonts1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), interpolate_fonts1);
+
+ compare_fonts1 = gtk_menu_item_new_with_mnemonic (_("C_ompare Fonts..."));
+ gtk_widget_set_name (compare_fonts1, "compare_fonts1");
+ gtk_widget_show (compare_fonts1);
+ gtk_container_add (GTK_CONTAINER (element1_menu), compare_fonts1);
+
+ tools3 = gtk_image_menu_item_new_with_mnemonic (_("Tools"));
+ gtk_widget_set_name (tools3, "tools3");
+ gtk_widget_show (tools3);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), tools3);
+
+ image5834 = create_pixmap (FontView, "python.png");
+ gtk_widget_set_name (image5834, "image5834");
+ gtk_widget_show (image5834);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (tools3), image5834);
+
+ hints1 = gtk_menu_item_new_with_mnemonic (_("H_ints"));
+ gtk_widget_set_name (hints1, "hints1");
+ gtk_widget_show (hints1);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), hints1);
+
+ hints1_menu = gtk_menu_new ();
+ gtk_widget_set_name (hints1_menu, "hints1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (hints1), hints1_menu);
+
+ autohint1 = gtk_menu_item_new_with_mnemonic (_("Auto_Hint"));
+ gtk_widget_set_name (autohint1, "autohint1");
+ gtk_widget_show (autohint1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), autohint1);
+ gtk_widget_add_accelerator (autohint1, "activate", accel_group,
+ GDK_H, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ hint_subsitution_pts1 = gtk_menu_item_new_with_mnemonic (_("Hint _Subsitution Pts"));
+ gtk_widget_set_name (hint_subsitution_pts1, "hint_subsitution_pts1");
+ gtk_widget_show (hint_subsitution_pts1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), hint_subsitution_pts1);
+
+ auto_counter_hint1 = gtk_menu_item_new_with_mnemonic (_("Auto _Counter Hint"));
+ gtk_widget_set_name (auto_counter_hint1, "auto_counter_hint1");
+ gtk_widget_show (auto_counter_hint1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), auto_counter_hint1);
+
+ dont_autohint1 = gtk_menu_item_new_with_mnemonic (_("_Don't Autohint"));
+ gtk_widget_set_name (dont_autohint1, "dont_autohint1");
+ gtk_widget_show (dont_autohint1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), dont_autohint1);
+
+ separator28 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator28, "separator28");
+ gtk_widget_show (separator28);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), separator28);
+ gtk_widget_set_sensitive (separator28, FALSE);
+
+ autoinstr1 = gtk_menu_item_new_with_mnemonic (_("Auto_Instr"));
+ gtk_widget_set_name (autoinstr1, "autoinstr1");
+ gtk_widget_show (autoinstr1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), autoinstr1);
+ gtk_widget_add_accelerator (autoinstr1, "activate", accel_group,
+ GDK_T, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ edit_instructions1 = gtk_menu_item_new_with_mnemonic (_("_Edit Instructions..."));
+ gtk_widget_set_name (edit_instructions1, "edit_instructions1");
+ gtk_widget_show (edit_instructions1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), edit_instructions1);
+
+ edit_fpgm1 = gtk_menu_item_new_with_mnemonic (_("Edit '_fpgm'..."));
+ gtk_widget_set_name (edit_fpgm1, "edit_fpgm1");
+ gtk_widget_show (edit_fpgm1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), edit_fpgm1);
+
+ edit_prep1 = gtk_menu_item_new_with_mnemonic (_("Edit '_prep'..."));
+ gtk_widget_set_name (edit_prep1, "edit_prep1");
+ gtk_widget_show (edit_prep1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), edit_prep1);
+
+ edit_maxp1 = gtk_menu_item_new_with_mnemonic (_("Edit 'maxp'..."));
+ gtk_widget_set_name (edit_maxp1, "edit_maxp1");
+ gtk_widget_show (edit_maxp1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), edit_maxp1);
+
+ edit_cvt_1 = gtk_menu_item_new_with_mnemonic (_("Edit 'c_vt '..."));
+ gtk_widget_set_name (edit_cvt_1, "edit_cvt_1");
+ gtk_widget_show (edit_cvt_1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), edit_cvt_1);
+
+ private_to_cvt_1 = gtk_menu_item_new_with_mnemonic (_("Private to 'cvt '"));
+ gtk_widget_set_name (private_to_cvt_1, "private_to_cvt_1");
+ gtk_widget_show (private_to_cvt_1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), private_to_cvt_1);
+
+ separator30 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator30, "separator30");
+ gtk_widget_show (separator30);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), separator30);
+ gtk_widget_set_sensitive (separator30, FALSE);
+
+ clear_hints1 = gtk_menu_item_new_with_mnemonic (_("_Clear Hints"));
+ gtk_widget_set_name (clear_hints1, "clear_hints1");
+ gtk_widget_show (clear_hints1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), clear_hints1);
+
+ clear_instructions1 = gtk_menu_item_new_with_mnemonic (_("Clear _Instructions"));
+ gtk_widget_set_name (clear_instructions1, "clear_instructions1");
+ gtk_widget_show (clear_instructions1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), clear_instructions1);
+
+ separator31 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator31, "separator31");
+ gtk_widget_show (separator31);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), separator31);
+ gtk_widget_set_sensitive (separator31, FALSE);
+
+ histograms1 = gtk_menu_item_new_with_mnemonic (_("Histograms"));
+ gtk_widget_set_name (histograms1, "histograms1");
+ gtk_widget_show (histograms1);
+ gtk_container_add (GTK_CONTAINER (hints1_menu), histograms1);
+ gtk_tooltips_set_tip (tooltips, histograms1, _("To help compute font-wide hints"), NULL);
+
+ histograms1_menu = gtk_menu_new ();
+ gtk_widget_set_name (histograms1_menu, "histograms1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (histograms1), histograms1_menu);
+
+ hstem1 = gtk_menu_item_new_with_mnemonic (_("_HStem..."));
+ gtk_widget_set_name (hstem1, "hstem1");
+ gtk_widget_show (hstem1);
+ gtk_container_add (GTK_CONTAINER (histograms1_menu), hstem1);
+
+ vstem1 = gtk_menu_item_new_with_mnemonic (_("_VStem..."));
+ gtk_widget_set_name (vstem1, "vstem1");
+ gtk_widget_show (vstem1);
+ gtk_container_add (GTK_CONTAINER (histograms1_menu), vstem1);
+
+ bluevalues1 = gtk_menu_item_new_with_mnemonic (_("_BlueValues..."));
+ gtk_widget_set_name (bluevalues1, "bluevalues1");
+ gtk_widget_show (bluevalues1);
+ gtk_container_add (GTK_CONTAINER (histograms1_menu), bluevalues1);
+
+ encoding2 = gtk_menu_item_new_with_mnemonic (_("E_ncoding"));
+ gtk_widget_set_name (encoding2, "encoding2");
+ gtk_widget_show (encoding2);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), encoding2);
+
+ encoding2_menu = gtk_menu_new ();
+ gtk_widget_set_name (encoding2_menu, "encoding2_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (encoding2), encoding2_menu);
+
+ reencode1 = gtk_menu_item_new_with_mnemonic (_("_Reencode"));
+ gtk_widget_set_name (reencode1, "reencode1");
+ gtk_widget_show (reencode1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), reencode1);
+
+ reencode1_menu = gtk_menu_new ();
+ gtk_widget_set_name (reencode1_menu, "reencode1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (reencode1), reencode1_menu);
+
+ separator65 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator65, "separator65");
+ gtk_widget_show (separator65);
+ gtk_container_add (GTK_CONTAINER (reencode1_menu), separator65);
+ gtk_widget_set_sensitive (separator65, FALSE);
+
+ compact1 = gtk_check_menu_item_new_with_mnemonic (_("_Compact"));
+ gtk_widget_set_name (compact1, "compact1");
+ gtk_widget_show (compact1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), compact1);
+
+ force_encoding1 = gtk_menu_item_new_with_mnemonic (_("_Force Encoding"));
+ gtk_widget_set_name (force_encoding1, "force_encoding1");
+ gtk_widget_show (force_encoding1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), force_encoding1);
+
+ force_encoding1_menu = gtk_menu_new ();
+ gtk_widget_set_name (force_encoding1_menu, "force_encoding1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (force_encoding1), force_encoding1_menu);
+
+ separator66 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator66, "separator66");
+ gtk_widget_show (separator66);
+ gtk_container_add (GTK_CONTAINER (force_encoding1_menu), separator66);
+ gtk_widget_set_sensitive (separator66, FALSE);
+
+ separator64 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator64, "separator64");
+ gtk_widget_show (separator64);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), separator64);
+ gtk_widget_set_sensitive (separator64, FALSE);
+
+ add_encoding_slots1 = gtk_menu_item_new_with_mnemonic (_("_Add Encoding Slots..."));
+ gtk_widget_set_name (add_encoding_slots1, "add_encoding_slots1");
+ gtk_widget_show (add_encoding_slots1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), add_encoding_slots1);
+
+ remove_unused_slots1 = gtk_menu_item_new_with_mnemonic (_("Remove _Unused Slots"));
+ gtk_widget_set_name (remove_unused_slots1, "remove_unused_slots1");
+ gtk_widget_show (remove_unused_slots1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), remove_unused_slots1);
+
+ detach_glyphs1 = gtk_menu_item_new_with_mnemonic (_("_Detach Glyphs"));
+ gtk_widget_set_name (detach_glyphs1, "detach_glyphs1");
+ gtk_widget_show (detach_glyphs1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), detach_glyphs1);
+
+ detatch___remove_glyphs1 = gtk_image_menu_item_new_with_mnemonic (_("Detatch & Remo_ve Glyphs"));
+ gtk_widget_set_name (detatch___remove_glyphs1, "detatch___remove_glyphs1");
+ gtk_widget_show (detatch___remove_glyphs1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), detatch___remove_glyphs1);
+
+ image5835 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5835, "image5835");
+ gtk_widget_show (image5835);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (detatch___remove_glyphs1), image5835);
+
+ separator67 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator67, "separator67");
+ gtk_widget_show (separator67);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), separator67);
+ gtk_widget_set_sensitive (separator67, FALSE);
+
+ add_encoding_name1 = gtk_menu_item_new_with_mnemonic (_("Add Encoding _Name..."));
+ gtk_widget_set_name (add_encoding_name1, "add_encoding_name1");
+ gtk_widget_show (add_encoding_name1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), add_encoding_name1);
+
+ load_encoding1 = gtk_menu_item_new_with_mnemonic (_("_Load Encoding..."));
+ gtk_widget_set_name (load_encoding1, "load_encoding1");
+ gtk_widget_show (load_encoding1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), load_encoding1);
+
+ make_from_font1 = gtk_menu_item_new_with_mnemonic (_("Ma_ke From Font..."));
+ gtk_widget_set_name (make_from_font1, "make_from_font1");
+ gtk_widget_show (make_from_font1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), make_from_font1);
+
+ remove_encoding1 = gtk_menu_item_new_with_mnemonic (_("Remove En_coding"));
+ gtk_widget_set_name (remove_encoding1, "remove_encoding1");
+ gtk_widget_show (remove_encoding1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), remove_encoding1);
+
+ separator68 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator68, "separator68");
+ gtk_widget_show (separator68);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), separator68);
+ gtk_widget_set_sensitive (separator68, FALSE);
+
+ display_by_groups1 = gtk_menu_item_new_with_mnemonic (_("Display By _Groups..."));
+ gtk_widget_set_name (display_by_groups1, "display_by_groups1");
+ gtk_widget_show (display_by_groups1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), display_by_groups1);
+
+ define_groups1 = gtk_menu_item_new_with_mnemonic (_("De_fine Groups..."));
+ gtk_widget_set_name (define_groups1, "define_groups1");
+ gtk_widget_show (define_groups1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), define_groups1);
+
+ separator87 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator87, "separator87");
+ gtk_widget_show (separator87);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), separator87);
+ gtk_widget_set_sensitive (separator87, FALSE);
+
+ save_namelist_of_font1 = gtk_menu_item_new_with_mnemonic (_("_Save Namelist of Font..."));
+ gtk_widget_set_name (save_namelist_of_font1, "save_namelist_of_font1");
+ gtk_widget_show (save_namelist_of_font1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), save_namelist_of_font1);
+
+ load_namelist1 = gtk_menu_item_new_with_mnemonic (_("L_oad Namelist..."));
+ gtk_widget_set_name (load_namelist1, "load_namelist1");
+ gtk_widget_show (load_namelist1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), load_namelist1);
+
+ rename_glyphs1 = gtk_menu_item_new_with_mnemonic (_("Rename Gl_yphs..."));
+ gtk_widget_set_name (rename_glyphs1, "rename_glyphs1");
+ gtk_widget_show (rename_glyphs1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), rename_glyphs1);
+
+ create_named_glyphs1 = gtk_menu_item_new_with_mnemonic (_("Cre_ate Named Glyphs..."));
+ gtk_widget_set_name (create_named_glyphs1, "create_named_glyphs1");
+ gtk_widget_show (create_named_glyphs1);
+ gtk_container_add (GTK_CONTAINER (encoding2_menu), create_named_glyphs1);
+
+ view3 = gtk_menu_item_new_with_mnemonic (_("_View"));
+ gtk_widget_set_name (view3, "view3");
+ gtk_widget_show (view3);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), view3);
+
+ view3_menu = gtk_menu_new ();
+ gtk_widget_set_name (view3_menu, "view3_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (view3), view3_menu);
+
+ next_glyph1 = gtk_image_menu_item_new_with_mnemonic (_("_Next Glyph"));
+ gtk_widget_set_name (next_glyph1, "next_glyph1");
+ gtk_widget_show (next_glyph1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), next_glyph1);
+
+ image5836 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5836, "image5836");
+ gtk_widget_show (image5836);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (next_glyph1), image5836);
+
+ prev_glyph1 = gtk_image_menu_item_new_with_mnemonic (_("_Prev Glyph"));
+ gtk_widget_set_name (prev_glyph1, "prev_glyph1");
+ gtk_widget_show (prev_glyph1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), prev_glyph1);
+
+ image5837 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5837, "image5837");
+ gtk_widget_show (image5837);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (prev_glyph1), image5837);
+
+ next_defined_glyph1 = gtk_image_menu_item_new_with_mnemonic (_("Next _Defined Glyph"));
+ gtk_widget_set_name (next_defined_glyph1, "next_defined_glyph1");
+ gtk_widget_show (next_defined_glyph1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), next_defined_glyph1);
+
+ image5838 = create_pixmap (FontView, "viewnextdef.png");
+ gtk_widget_set_name (image5838, "image5838");
+ gtk_widget_show (image5838);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (next_defined_glyph1), image5838);
+
+ prev_defined_glyph1 = gtk_image_menu_item_new_with_mnemonic (_("Prev Defined Gl_yph"));
+ gtk_widget_set_name (prev_defined_glyph1, "prev_defined_glyph1");
+ gtk_widget_show (prev_defined_glyph1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), prev_defined_glyph1);
+
+ image5839 = create_pixmap (FontView, "viewprevdef.png");
+ gtk_widget_set_name (image5839, "image5839");
+ gtk_widget_show (image5839);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (prev_defined_glyph1), image5839);
+
+ goto1 = gtk_image_menu_item_new_with_mnemonic (_("_Goto..."));
+ gtk_widget_set_name (goto1, "goto1");
+ gtk_widget_show (goto1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), goto1);
+
+ image5840 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5840, "image5840");
+ gtk_widget_show (image5840);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (goto1), image5840);
+
+ separator32 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator32, "separator32");
+ gtk_widget_show (separator32);
+ gtk_container_add (GTK_CONTAINER (view3_menu), separator32);
+ gtk_widget_set_sensitive (separator32, FALSE);
+
+ show_att1 = gtk_menu_item_new_with_mnemonic (_("_Show ATT..."));
+ gtk_widget_set_name (show_att1, "show_att1");
+ gtk_widget_show (show_att1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), show_att1);
+ gtk_tooltips_set_tip (tooltips, show_att1, _("Show Advanced Typography Tables (Both OpenType and GX)"), NULL);
+
+ display_substitutions1 = gtk_check_menu_item_new_with_mnemonic (_("Display S_ubstitutions..."));
+ gtk_widget_set_name (display_substitutions1, "display_substitutions1");
+ gtk_widget_show (display_substitutions1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), display_substitutions1);
+
+ combinations1 = gtk_menu_item_new_with_mnemonic (_("Com_binations"));
+ gtk_widget_set_name (combinations1, "combinations1");
+ gtk_widget_show (combinations1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), combinations1);
+
+ combinations1_menu = gtk_menu_new ();
+ gtk_widget_set_name (combinations1_menu, "combinations1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (combinations1), combinations1_menu);
+
+ kern_pairs1 = gtk_menu_item_new_with_mnemonic (_("_Kern Pairs..."));
+ gtk_widget_set_name (kern_pairs1, "kern_pairs1");
+ gtk_widget_show (kern_pairs1);
+ gtk_container_add (GTK_CONTAINER (combinations1_menu), kern_pairs1);
+
+ anchor_pairs1 = gtk_menu_item_new_with_mnemonic (_("_Anchor Pairs"));
+ gtk_widget_set_name (anchor_pairs1, "anchor_pairs1");
+ gtk_widget_show (anchor_pairs1);
+ gtk_container_add (GTK_CONTAINER (combinations1_menu), anchor_pairs1);
+
+ anchor_pairs1_menu = gtk_menu_new ();
+ gtk_widget_set_name (anchor_pairs1_menu, "anchor_pairs1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (anchor_pairs1), anchor_pairs1_menu);
+
+ all2 = gtk_menu_item_new_with_mnemonic (_("_All"));
+ gtk_widget_set_name (all2, "all2");
+ gtk_widget_show (all2);
+ gtk_container_add (GTK_CONTAINER (anchor_pairs1_menu), all2);
+
+ ligatures2 = gtk_menu_item_new_with_mnemonic (_("_Ligatures..."));
+ gtk_widget_set_name (ligatures2, "ligatures2");
+ gtk_widget_show (ligatures2);
+ gtk_container_add (GTK_CONTAINER (combinations1_menu), ligatures2);
+
+ separator33 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator33, "separator33");
+ gtk_widget_show (separator33);
+ gtk_container_add (GTK_CONTAINER (view3_menu), separator33);
+ gtk_widget_set_sensitive (separator33, FALSE);
+
+ label_glyph_by1 = gtk_menu_item_new_with_mnemonic (_("_Label Glyph By"));
+ gtk_widget_set_name (label_glyph_by1, "label_glyph_by1");
+ gtk_widget_show (label_glyph_by1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), label_glyph_by1);
+
+ label_glyph_by1_menu = gtk_menu_new ();
+ gtk_widget_set_name (label_glyph_by1_menu, "label_glyph_by1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (label_glyph_by1), label_glyph_by1_menu);
+
+ glyph_image1 = gtk_radio_menu_item_new_with_mnemonic (glyph_image1_group, _("_Glyph Image"));
+ glyph_image1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (glyph_image1));
+ gtk_widget_set_name (glyph_image1, "glyph_image1");
+ gtk_widget_show (glyph_image1);
+ gtk_container_add (GTK_CONTAINER (label_glyph_by1_menu), glyph_image1);
+
+ glyph_name1 = gtk_radio_menu_item_new_with_mnemonic (glyph_image1_group, _("_Name"));
+ glyph_image1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (glyph_name1));
+ gtk_widget_set_name (glyph_name1, "glyph_name1");
+ gtk_widget_show (glyph_name1);
+ gtk_container_add (GTK_CONTAINER (label_glyph_by1_menu), glyph_name1);
+
+ unicode1 = gtk_radio_menu_item_new_with_mnemonic (glyph_image1_group, _("_Unicode"));
+ glyph_image1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (unicode1));
+ gtk_widget_set_name (unicode1, "unicode1");
+ gtk_widget_show (unicode1);
+ gtk_container_add (GTK_CONTAINER (label_glyph_by1_menu), unicode1);
+
+ encoding1 = gtk_radio_menu_item_new_with_mnemonic (glyph_image1_group, _("_Encoding Hex"));
+ glyph_image1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (encoding1));
+ gtk_widget_set_name (encoding1, "encoding1");
+ gtk_widget_show (encoding1);
+ gtk_container_add (GTK_CONTAINER (label_glyph_by1_menu), encoding1);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (encoding1), TRUE);
+
+ separator62 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator62, "separator62");
+ gtk_widget_show (separator62);
+ gtk_container_add (GTK_CONTAINER (view3_menu), separator62);
+ gtk_widget_set_sensitive (separator62, FALSE);
+
+ show_h_metrics1 = gtk_menu_item_new_with_mnemonic (_("Show H. Metrics..."));
+ gtk_widget_set_name (show_h_metrics1, "show_h_metrics1");
+ gtk_widget_show (show_h_metrics1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), show_h_metrics1);
+ gtk_tooltips_set_tip (tooltips, show_h_metrics1, _("Show Horizontal Metrics lines"), NULL);
+
+ show_v_metrics1 = gtk_menu_item_new_with_mnemonic (_("Show V. Metrics..."));
+ gtk_widget_set_name (show_v_metrics1, "show_v_metrics1");
+ gtk_widget_show (show_v_metrics1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), show_v_metrics1);
+ gtk_tooltips_set_tip (tooltips, show_v_metrics1, _("Show Vertical Metrics lines"), NULL);
+
+ separator34 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator34, "separator34");
+ gtk_widget_show (separator34);
+ gtk_container_add (GTK_CONTAINER (view3_menu), separator34);
+ gtk_widget_set_sensitive (separator34, FALSE);
+
+ _32x8_cell_window1 = gtk_check_menu_item_new_with_mnemonic (_("32x8 cell window"));
+ gtk_widget_set_name (_32x8_cell_window1, "_32x8_cell_window1");
+ gtk_widget_show (_32x8_cell_window1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _32x8_cell_window1);
+
+ _16x4_cell_window1 = gtk_check_menu_item_new_with_mnemonic (_("1_6x4 cell window"));
+ gtk_widget_set_name (_16x4_cell_window1, "_16x4_cell_window1");
+ gtk_widget_show (_16x4_cell_window1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _16x4_cell_window1);
+
+ _8x2_cell_window1 = gtk_check_menu_item_new_with_mnemonic (_("8x2 cell window"));
+ gtk_widget_set_name (_8x2_cell_window1, "_8x2_cell_window1");
+ gtk_widget_show (_8x2_cell_window1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _8x2_cell_window1);
+
+ separator85 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator85, "separator85");
+ gtk_widget_show (separator85);
+ gtk_container_add (GTK_CONTAINER (view3_menu), separator85);
+ gtk_widget_set_sensitive (separator85, FALSE);
+
+ _24_pixel_outline1 = gtk_check_menu_item_new_with_mnemonic (_("_24 pixel outline"));
+ gtk_widget_set_name (_24_pixel_outline1, "_24_pixel_outline1");
+ gtk_widget_show (_24_pixel_outline1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _24_pixel_outline1);
+ gtk_widget_add_accelerator (_24_pixel_outline1, "activate", accel_group,
+ GDK_2, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ _36_pixel_outline1 = gtk_check_menu_item_new_with_mnemonic (_("_36 pixel outline"));
+ gtk_widget_set_name (_36_pixel_outline1, "_36_pixel_outline1");
+ gtk_widget_show (_36_pixel_outline1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _36_pixel_outline1);
+ gtk_widget_add_accelerator (_36_pixel_outline1, "activate", accel_group,
+ GDK_3, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ _48_pixel_outline1 = gtk_check_menu_item_new_with_mnemonic (_("_48 pixel outline"));
+ gtk_widget_set_name (_48_pixel_outline1, "_48_pixel_outline1");
+ gtk_widget_show (_48_pixel_outline1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _48_pixel_outline1);
+ gtk_widget_add_accelerator (_48_pixel_outline1, "activate", accel_group,
+ GDK_4, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ _72_pixel_outline1 = gtk_check_menu_item_new_with_mnemonic (_("_72 pixel outline"));
+ gtk_widget_set_name (_72_pixel_outline1, "_72_pixel_outline1");
+ gtk_widget_show (_72_pixel_outline1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _72_pixel_outline1);
+ gtk_widget_add_accelerator (_72_pixel_outline1, "activate", accel_group,
+ GDK_7, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ _96_pixel_outline1 = gtk_check_menu_item_new_with_mnemonic (_("_96 pixel outline"));
+ gtk_widget_set_name (_96_pixel_outline1, "_96_pixel_outline1");
+ gtk_widget_show (_96_pixel_outline1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), _96_pixel_outline1);
+ gtk_widget_add_accelerator (_96_pixel_outline1, "activate", accel_group,
+ GDK_9, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ separator35 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator35, "separator35");
+ gtk_widget_show (separator35);
+ gtk_container_add (GTK_CONTAINER (view3_menu), separator35);
+ gtk_widget_set_sensitive (separator35, FALSE);
+
+ anti_alias1 = gtk_check_menu_item_new_with_mnemonic (_("_Anti Alias"));
+ gtk_widget_set_name (anti_alias1, "anti_alias1");
+ gtk_widget_show (anti_alias1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), anti_alias1);
+ gtk_widget_add_accelerator (anti_alias1, "activate", accel_group,
+ GDK_5, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (anti_alias1), TRUE);
+
+ fit_to_em1 = gtk_check_menu_item_new_with_mnemonic (_("_Fit to em"));
+ gtk_widget_set_name (fit_to_em1, "fit_to_em1");
+ gtk_widget_show (fit_to_em1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), fit_to_em1);
+ gtk_widget_add_accelerator (fit_to_em1, "activate", accel_group,
+ GDK_6, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ separator89 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator89, "separator89");
+ gtk_widget_show (separator89);
+ gtk_container_add (GTK_CONTAINER (view3_menu), separator89);
+ gtk_widget_set_sensitive (separator89, FALSE);
+
+ bitmap_magnification1 = gtk_menu_item_new_with_mnemonic (_("Bitmap _Magnification..."));
+ gtk_widget_set_name (bitmap_magnification1, "bitmap_magnification1");
+ gtk_widget_show (bitmap_magnification1);
+ gtk_container_add (GTK_CONTAINER (view3_menu), bitmap_magnification1);
+
+ metrics1 = gtk_menu_item_new_with_mnemonic (_("_Metrics"));
+ gtk_widget_set_name (metrics1, "metrics1");
+ gtk_widget_show (metrics1);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), metrics1);
+
+ metrics1_menu = gtk_menu_new ();
+ gtk_widget_set_name (metrics1_menu, "metrics1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (metrics1), metrics1_menu);
+
+ center_in_width1 = gtk_menu_item_new_with_mnemonic (_("_Center in Width"));
+ gtk_widget_set_name (center_in_width1, "center_in_width1");
+ gtk_widget_show (center_in_width1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), center_in_width1);
+
+ thirds_in_width1 = gtk_menu_item_new_with_mnemonic (_("_Thirds in Width"));
+ gtk_widget_set_name (thirds_in_width1, "thirds_in_width1");
+ gtk_widget_show (thirds_in_width1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), thirds_in_width1);
+
+ set_width1 = gtk_menu_item_new_with_mnemonic (_("Set _Width..."));
+ gtk_widget_set_name (set_width1, "set_width1");
+ gtk_widget_show (set_width1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), set_width1);
+ gtk_widget_add_accelerator (set_width1, "activate", accel_group,
+ GDK_L, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ set_lbearing1 = gtk_menu_item_new_with_mnemonic (_("Set _LBearing..."));
+ gtk_widget_set_name (set_lbearing1, "set_lbearing1");
+ gtk_widget_show (set_lbearing1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), set_lbearing1);
+ gtk_widget_add_accelerator (set_lbearing1, "activate", accel_group,
+ GDK_L, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ set_rbearing1 = gtk_menu_item_new_with_mnemonic (_("Set _RBearing..."));
+ gtk_widget_set_name (set_rbearing1, "set_rbearing1");
+ gtk_widget_show (set_rbearing1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), set_rbearing1);
+
+ set_vertical_advance1 = gtk_menu_item_new_with_mnemonic (_("Set _Vertical Advance..."));
+ gtk_widget_set_name (set_vertical_advance1, "set_vertical_advance1");
+ gtk_widget_show (set_vertical_advance1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), set_vertical_advance1);
+
+ separator36 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator36, "separator36");
+ gtk_widget_show (separator36);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), separator36);
+ gtk_widget_set_sensitive (separator36, FALSE);
+
+ auto_width1 = gtk_menu_item_new_with_mnemonic (_("_Auto Width"));
+ gtk_widget_set_name (auto_width1, "auto_width1");
+ gtk_widget_show (auto_width1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), auto_width1);
+ gtk_widget_add_accelerator (auto_width1, "activate", accel_group,
+ GDK_W, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ auto_kern1 = gtk_menu_item_new_with_mnemonic (_("Auto _Kern..."));
+ gtk_widget_set_name (auto_kern1, "auto_kern1");
+ gtk_widget_show (auto_kern1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), auto_kern1);
+ gtk_widget_add_accelerator (auto_kern1, "activate", accel_group,
+ GDK_K, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ kern_by_classes1 = gtk_menu_item_new_with_mnemonic (_("Ker_n by Classes..."));
+ gtk_widget_set_name (kern_by_classes1, "kern_by_classes1");
+ gtk_widget_show (kern_by_classes1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), kern_by_classes1);
+
+ remove_all_kern_pairs1 = gtk_menu_item_new_with_mnemonic (_("Remove All Kern _Pairs"));
+ gtk_widget_set_name (remove_all_kern_pairs1, "remove_all_kern_pairs1");
+ gtk_widget_show (remove_all_kern_pairs1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), remove_all_kern_pairs1);
+
+ kern_pair_closeup1 = gtk_menu_item_new_with_mnemonic (_("Kern Pair Closeup..."));
+ gtk_widget_set_name (kern_pair_closeup1, "kern_pair_closeup1");
+ gtk_widget_show (kern_pair_closeup1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), kern_pair_closeup1);
+
+ separator37 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator37, "separator37");
+ gtk_widget_show (separator37);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), separator37);
+ gtk_widget_set_sensitive (separator37, FALSE);
+
+ vkern_by_classes1 = gtk_menu_item_new_with_mnemonic (_("_VKern By Classes..."));
+ gtk_widget_set_name (vkern_by_classes1, "vkern_by_classes1");
+ gtk_widget_show (vkern_by_classes1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), vkern_by_classes1);
+
+ vkern_from_hkern1 = gtk_menu_item_new_with_mnemonic (_("VKern From _HKern"));
+ gtk_widget_set_name (vkern_from_hkern1, "vkern_from_hkern1");
+ gtk_widget_show (vkern_from_hkern1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), vkern_from_hkern1);
+ gtk_tooltips_set_tip (tooltips, vkern_from_hkern1, _("Make the kerning info for vertically rotated glyphs match the horizontal kerning info."), NULL);
+
+ remove_all_vkern_pairs1 = gtk_menu_item_new_with_mnemonic (_("R_emove All VKern Pairs"));
+ gtk_widget_set_name (remove_all_vkern_pairs1, "remove_all_vkern_pairs1");
+ gtk_widget_show (remove_all_vkern_pairs1);
+ gtk_container_add (GTK_CONTAINER (metrics1_menu), remove_all_vkern_pairs1);
+
+ cid1 = gtk_menu_item_new_with_mnemonic (_("_CID"));
+ gtk_widget_set_name (cid1, "cid1");
+ gtk_widget_show (cid1);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), cid1);
+ gtk_tooltips_set_tip (tooltips, cid1, _("Commands for PostScript CID-keyed fonts (generally CJK fonts)"), NULL);
+
+ cid1_menu = gtk_menu_new ();
+ gtk_widget_set_name (cid1_menu, "cid1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (cid1), cid1_menu);
+
+ convert_to_cid1 = gtk_menu_item_new_with_mnemonic (_("_Convert to CID"));
+ gtk_widget_set_name (convert_to_cid1, "convert_to_cid1");
+ gtk_widget_show (convert_to_cid1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), convert_to_cid1);
+
+ convert_by_cmap1 = gtk_menu_item_new_with_mnemonic (_("Convert by C_Map"));
+ gtk_widget_set_name (convert_by_cmap1, "convert_by_cmap1");
+ gtk_widget_show (convert_by_cmap1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), convert_by_cmap1);
+
+ separator38 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator38, "separator38");
+ gtk_widget_show (separator38);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), separator38);
+ gtk_widget_set_sensitive (separator38, FALSE);
+
+ flatten1 = gtk_menu_item_new_with_mnemonic (_("_Flatten"));
+ gtk_widget_set_name (flatten1, "flatten1");
+ gtk_widget_show (flatten1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), flatten1);
+
+ flatten_by_cmap1 = gtk_menu_item_new_with_mnemonic (_("F_latten By CMap"));
+ gtk_widget_set_name (flatten_by_cmap1, "flatten_by_cmap1");
+ gtk_widget_show (flatten_by_cmap1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), flatten_by_cmap1);
+
+ separator69 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator69, "separator69");
+ gtk_widget_show (separator69);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), separator69);
+ gtk_widget_set_sensitive (separator69, FALSE);
+
+ insert_font1 = gtk_menu_item_new_with_mnemonic (_("Insert _Font..."));
+ gtk_widget_set_name (insert_font1, "insert_font1");
+ gtk_widget_show (insert_font1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), insert_font1);
+
+ insert_empty_font1 = gtk_menu_item_new_with_mnemonic (_("Insert _Empty Font"));
+ gtk_widget_set_name (insert_empty_font1, "insert_empty_font1");
+ gtk_widget_show (insert_empty_font1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), insert_empty_font1);
+
+ remove_font1 = gtk_menu_item_new_with_mnemonic (_("_Remove Font"));
+ gtk_widget_set_name (remove_font1, "remove_font1");
+ gtk_widget_show (remove_font1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), remove_font1);
+
+ separator70 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator70, "separator70");
+ gtk_widget_show (separator70);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), separator70);
+ gtk_widget_set_sensitive (separator70, FALSE);
+
+ change_supplement1 = gtk_menu_item_new_with_mnemonic (_("_Change Supplement..."));
+ gtk_widget_set_name (change_supplement1, "change_supplement1");
+ gtk_widget_show (change_supplement1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), change_supplement1);
+
+ cid_font_info1 = gtk_image_menu_item_new_with_mnemonic (_("C_ID Font Info..."));
+ gtk_widget_set_name (cid_font_info1, "cid_font_info1");
+ gtk_widget_show (cid_font_info1);
+ gtk_container_add (GTK_CONTAINER (cid1_menu), cid_font_info1);
+
+ image5841 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5841, "image5841");
+ gtk_widget_show (image5841);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (cid_font_info1), image5841);
+
+ mm1 = gtk_menu_item_new_with_mnemonic (_("MM"));
+ gtk_widget_set_name (mm1, "mm1");
+ gtk_widget_show (mm1);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), mm1);
+ gtk_tooltips_set_tip (tooltips, mm1, _("PostScript Multiple Master & Apple's *var fonts"), NULL);
+
+ mm1_menu = gtk_menu_new ();
+ gtk_widget_set_name (mm1_menu, "mm1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (mm1), mm1_menu);
+
+ create_mm1 = gtk_image_menu_item_new_with_mnemonic (_("_Create MM..."));
+ gtk_widget_set_name (create_mm1, "create_mm1");
+ gtk_widget_show (create_mm1);
+ gtk_container_add (GTK_CONTAINER (mm1_menu), create_mm1);
+
+ image5842 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5842, "image5842");
+ gtk_widget_show (image5842);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (create_mm1), image5842);
+
+ separator39 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator39, "separator39");
+ gtk_widget_show (separator39);
+ gtk_container_add (GTK_CONTAINER (mm1_menu), separator39);
+ gtk_widget_set_sensitive (separator39, FALSE);
+
+ mm_validity_check1 = gtk_menu_item_new_with_mnemonic (_("MM _Validity Check"));
+ gtk_widget_set_name (mm_validity_check1, "mm_validity_check1");
+ gtk_widget_show (mm_validity_check1);
+ gtk_container_add (GTK_CONTAINER (mm1_menu), mm_validity_check1);
+
+ mm_info1 = gtk_image_menu_item_new_with_mnemonic (_("MM _Info..."));
+ gtk_widget_set_name (mm_info1, "mm_info1");
+ gtk_widget_show (mm_info1);
+ gtk_container_add (GTK_CONTAINER (mm1_menu), mm_info1);
+
+ image5843 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5843, "image5843");
+ gtk_widget_show (image5843);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mm_info1), image5843);
+
+ blend_to_new_font1 = gtk_menu_item_new_with_mnemonic (_("_Blend to New Font..."));
+ gtk_widget_set_name (blend_to_new_font1, "blend_to_new_font1");
+ gtk_widget_show (blend_to_new_font1);
+ gtk_container_add (GTK_CONTAINER (mm1_menu), blend_to_new_font1);
+
+ mm_change_def_weights1 = gtk_menu_item_new_with_mnemonic (_("MM Change Def _Weights"));
+ gtk_widget_set_name (mm_change_def_weights1, "mm_change_def_weights1");
+ gtk_widget_show (mm_change_def_weights1);
+ gtk_container_add (GTK_CONTAINER (mm1_menu), mm_change_def_weights1);
+
+ window1 = gtk_menu_item_new_with_mnemonic (_("_Window"));
+ gtk_widget_set_name (window1, "window1");
+ gtk_widget_show (window1);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), window1);
+
+ window1_menu = gtk_menu_new ();
+ gtk_widget_set_name (window1_menu, "window1_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (window1), window1_menu);
+
+ open_outline_window1 = gtk_menu_item_new_with_mnemonic (_("Open O_utline Window"));
+ gtk_widget_set_name (open_outline_window1, "open_outline_window1");
+ gtk_widget_show (open_outline_window1);
+ gtk_container_add (GTK_CONTAINER (window1_menu), open_outline_window1);
+ gtk_widget_add_accelerator (open_outline_window1, "activate", accel_group,
+ GDK_H, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ open_bitmap_window1 = gtk_menu_item_new_with_mnemonic (_("Open _Bitmap Window"));
+ gtk_widget_set_name (open_bitmap_window1, "open_bitmap_window1");
+ gtk_widget_show (open_bitmap_window1);
+ gtk_container_add (GTK_CONTAINER (window1_menu), open_bitmap_window1);
+ gtk_widget_add_accelerator (open_bitmap_window1, "activate", accel_group,
+ GDK_J, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ open_metrics_window1 = gtk_menu_item_new_with_mnemonic (_("Open _Metrics Window"));
+ gtk_widget_set_name (open_metrics_window1, "open_metrics_window1");
+ gtk_widget_show (open_metrics_window1);
+ gtk_container_add (GTK_CONTAINER (window1_menu), open_metrics_window1);
+ gtk_widget_add_accelerator (open_metrics_window1, "activate", accel_group,
+ GDK_K, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ separator71 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator71, "separator71");
+ gtk_widget_show (separator71);
+ gtk_container_add (GTK_CONTAINER (window1_menu), separator71);
+ gtk_widget_set_sensitive (separator71, FALSE);
+
+ warnings1 = gtk_image_menu_item_new_with_mnemonic (_("Warnings..."));
+ gtk_widget_set_name (warnings1, "warnings1");
+ gtk_widget_show (warnings1);
+ gtk_container_add (GTK_CONTAINER (window1_menu), warnings1);
+
+ image5844 = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5844, "image5844");
+ gtk_widget_show (image5844);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (warnings1), image5844);
+
+ separator3 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator3, "separator3");
+ gtk_widget_show (separator3);
+ gtk_container_add (GTK_CONTAINER (window1_menu), separator3);
+ gtk_widget_set_sensitive (separator3, FALSE);
+
+ help4 = gtk_menu_item_new_with_mnemonic (_("_Help"));
+ gtk_widget_set_name (help4, "help4");
+ gtk_widget_show (help4);
+ gtk_container_add (GTK_CONTAINER (FontViewMenu), help4);
+
+ help4_menu = gtk_menu_new ();
+ gtk_widget_set_name (help4_menu, "help4_menu");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (help4), help4_menu);
+
+ help1 = gtk_image_menu_item_new_with_mnemonic (_("_Help"));
+ gtk_widget_set_name (help1, "help1");
+ gtk_widget_show (help1);
+ gtk_container_add (GTK_CONTAINER (help4_menu), help1);
+ gtk_widget_add_accelerator (help1, "activate", accel_group,
+ GDK_F1, 0,
+ GTK_ACCEL_VISIBLE);
+
+ image5845 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5845, "image5845");
+ gtk_widget_show (image5845);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image5845);
+
+ overview1 = gtk_menu_item_new_with_mnemonic (_("Overview"));
+ gtk_widget_set_name (overview1, "overview1");
+ gtk_widget_show (overview1);
+ gtk_container_add (GTK_CONTAINER (help4_menu), overview1);
+ gtk_widget_add_accelerator (overview1, "activate", accel_group,
+ GDK_F1, GDK_SHIFT_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ index1 = gtk_image_menu_item_new_with_mnemonic (_("_Index"));
+ gtk_widget_set_name (index1, "index1");
+ gtk_widget_show (index1);
+ gtk_container_add (GTK_CONTAINER (help4_menu), index1);
+ gtk_widget_add_accelerator (index1, "activate", accel_group,
+ GDK_F1, GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+
+ image5846 = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5846, "image5846");
+ gtk_widget_show (image5846);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (index1), image5846);
+
+ about1 = gtk_image_menu_item_new_with_mnemonic (_("_About"));
+ gtk_widget_set_name (about1, "about1");
+ gtk_widget_show (about1);
+ gtk_container_add (GTK_CONTAINER (help4_menu), about1);
+
+ image5847 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5847, "image5847");
+ gtk_widget_show (image5847);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about1), image5847);
+
+ license1 = gtk_menu_item_new_with_mnemonic (_("_License"));
+ gtk_widget_set_name (license1, "license1");
+ gtk_widget_show (license1);
+ gtk_container_add (GTK_CONTAINER (help4_menu), license1);
+
+ status = gtk_drawing_area_new ();
+ gtk_widget_set_name (status, "status");
+ gtk_widget_show (status);
+ gtk_box_pack_start (GTK_BOX (vbox1), status, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (status, -1, 20);
+ gtk_widget_set_events (status, GDK_EXPOSURE_MASK);
+
+ hbox5 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox5, "hbox5");
+ gtk_widget_show (hbox5);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbox5, TRUE, TRUE, 0);
+
+ view = gtk_drawing_area_new ();
+ gtk_widget_set_name (view, "view");
+ gtk_widget_show (view);
+ gtk_box_pack_start (GTK_BOX (hbox5), view, TRUE, TRUE, 0);
+ gtk_widget_set_events (view, GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK);
+
+ vscrollbar2 = gtk_vscrollbar_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0)));
+ gtk_widget_set_name (vscrollbar2, "vscrollbar2");
+ gtk_widget_show (vscrollbar2);
+ gtk_box_pack_start (GTK_BOX (hbox5), vscrollbar2, FALSE, TRUE, 0);
+
+ g_signal_connect ((gpointer) FontView, "key_press_event",
+ G_CALLBACK (FontView_Char),
+ NULL);
+ g_signal_connect ((gpointer) FontView, "delete_event",
+ G_CALLBACK (FontView_RequestClose),
+ NULL);
+ g_signal_connect ((gpointer) FontView, "destroy_event",
+ G_CALLBACK (FontView_DestroyWindow),
+ NULL);
+ g_signal_connect ((gpointer) FontView, "configure_event",
+ G_CALLBACK (FontView_Resize),
+ NULL);
+ g_signal_connect ((gpointer) FontView, "selection_clear_event",
+ G_CALLBACK (FontView_ClearSelection),
+ NULL);
+ g_signal_connect ((gpointer) FontView, "realize",
+ G_CALLBACK (FontView_Realize),
+ NULL);
+ g_signal_connect ((gpointer) file1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateFile),
+ NULL);
+ g_signal_connect ((gpointer) new2, "activate",
+ G_CALLBACK (Menu_New),
+ NULL);
+ g_signal_connect ((gpointer) open2, "activate",
+ G_CALLBACK (Menu_Open),
+ NULL);
+ g_signal_connect ((gpointer) recent1, "activate",
+ G_CALLBACK (RecentMenuBuild),
+ NULL);
+ g_signal_connect ((gpointer) close2, "activate",
+ G_CALLBACK (FontViewMenu_Close),
+ NULL);
+ g_signal_connect ((gpointer) save2, "activate",
+ G_CALLBACK (FontViewMenu_Save),
+ NULL);
+ g_signal_connect ((gpointer) save_as2, "activate",
+ G_CALLBACK (FontViewMenu_SaveAs),
+ NULL);
+ g_signal_connect ((gpointer) save_all1, "activate",
+ G_CALLBACK (Menu_SaveAll),
+ NULL);
+ g_signal_connect ((gpointer) generate_fonts1, "activate",
+ G_CALLBACK (FontViewMenu_Generate),
+ NULL);
+ g_signal_connect ((gpointer) generate_mac_family1, "activate",
+ G_CALLBACK (FontViewMenu_GenerateFamily),
+ NULL);
+ g_signal_connect ((gpointer) import1, "activate",
+ G_CALLBACK (FontViewMenu_Import),
+ NULL);
+ g_signal_connect ((gpointer) merge_kern_info1, "activate",
+ G_CALLBACK (FontViewMenu_MergeKern),
+ NULL);
+ g_signal_connect ((gpointer) revert_file1, "activate",
+ G_CALLBACK (FontViewMenu_RevertFile),
+ NULL);
+ g_signal_connect ((gpointer) revert_to_backup1, "activate",
+ G_CALLBACK (FontViewMenu_RevertToBackup),
+ NULL);
+ g_signal_connect ((gpointer) revert_glyph1, "activate",
+ G_CALLBACK (FontViewMenu_RevertGlyph),
+ NULL);
+ g_signal_connect ((gpointer) print2, "activate",
+ G_CALLBACK (FontViewMenu_Print),
+ NULL);
+ g_signal_connect ((gpointer) execute_script1, "activate",
+ G_CALLBACK (FontViewMenu_ExecScript),
+ NULL);
+ g_signal_connect ((gpointer) script_menu1, "activate",
+ G_CALLBACK (ScriptMenuBuild),
+ NULL);
+ g_signal_connect ((gpointer) preferences2, "activate",
+ G_CALLBACK (Menu_Preferences),
+ NULL);
+ g_signal_connect ((gpointer) quit2, "activate",
+ G_CALLBACK (Menu_Quit),
+ NULL);
+ g_signal_connect ((gpointer) edit2, "activate",
+ G_CALLBACK (FontViewMenu_ActivateEdit),
+ NULL);
+ g_signal_connect ((gpointer) undo2, "activate",
+ G_CALLBACK (FontViewMenu_Undo),
+ NULL);
+ g_signal_connect ((gpointer) redo2, "activate",
+ G_CALLBACK (FontViewMenu_Redo),
+ NULL);
+ g_signal_connect ((gpointer) cut2, "activate",
+ G_CALLBACK (FontViewMenu_Cut),
+ NULL);
+ g_signal_connect ((gpointer) copy2, "activate",
+ G_CALLBACK (FontViewMenu_Copy),
+ NULL);
+ g_signal_connect ((gpointer) copy_reference1, "activate",
+ G_CALLBACK (FontViewMenu_CopyRef),
+ NULL);
+ g_signal_connect ((gpointer) copy_lookup_data1, "activate",
+ G_CALLBACK (FontViewMenu_CopyLookupData),
+ NULL);
+ g_signal_connect ((gpointer) copy_width1, "activate",
+ G_CALLBACK (FontViewMenu_CopyWidth),
+ NULL);
+ g_signal_connect ((gpointer) copy_vwidth1, "activate",
+ G_CALLBACK (FontViewMenu_CopyVWidth),
+ NULL);
+ g_signal_connect ((gpointer) copy_lbearing1, "activate",
+ G_CALLBACK (FontViewMenu_CopyLBearing),
+ NULL);
+ g_signal_connect ((gpointer) copy_rbearing1, "activate",
+ G_CALLBACK (FontViewMenu_CopyRBearing),
+ NULL);
+ g_signal_connect ((gpointer) paste2, "activate",
+ G_CALLBACK (FontViewMenu_Paste),
+ NULL);
+ g_signal_connect ((gpointer) paste_into1, "activate",
+ G_CALLBACK (FontViewMenu_PasteInto),
+ NULL);
+ g_signal_connect ((gpointer) paste_after1, "activate",
+ G_CALLBACK (FontViewMenu_PasteAfter),
+ NULL);
+ g_signal_connect ((gpointer) same_glyph_as1, "activate",
+ G_CALLBACK (FontViewMenu_SameGlyphAs),
+ NULL);
+ g_signal_connect ((gpointer) clear2, "activate",
+ G_CALLBACK (FontViewMenu_Clear),
+ NULL);
+ g_signal_connect ((gpointer) clear_background1, "activate",
+ G_CALLBACK (FontViewMenu_ClearBackground),
+ NULL);
+ g_signal_connect ((gpointer) copy_fg_to_bg1, "activate",
+ G_CALLBACK (FontViewMenu_CopyFg2Bg),
+ NULL);
+ g_signal_connect ((gpointer) join1, "activate",
+ G_CALLBACK (FontViewMenu_Join),
+ NULL);
+ g_signal_connect ((gpointer) select_all1, "activate",
+ G_CALLBACK (FontViewMenu_SelectAll),
+ NULL);
+ g_signal_connect ((gpointer) invert_selection1, "activate",
+ G_CALLBACK (FontViewMenu_InvertSelection),
+ NULL);
+ g_signal_connect ((gpointer) deselect_all1, "activate",
+ G_CALLBACK (FontViewMenu_DeselectAll),
+ NULL);
+ g_signal_connect ((gpointer) default1, "activate",
+ G_CALLBACK (FontViewMenu_SelectDefault),
+ NULL);
+ g_signal_connect ((gpointer) white, "activate",
+ G_CALLBACK (FontViewMenu_SelectWhite),
+ NULL);
+ g_signal_connect ((gpointer) red, "activate",
+ G_CALLBACK (FontViewMenu_SelectRed),
+ NULL);
+ g_signal_connect ((gpointer) green, "activate",
+ G_CALLBACK (FontViewMenu_SelectGreen),
+ NULL);
+ g_signal_connect ((gpointer) blue, "activate",
+ G_CALLBACK (FontViewMenu_SelectBlue),
+ NULL);
+ g_signal_connect ((gpointer) yellow, "activate",
+ G_CALLBACK (FontViewMenu_SelectYellow),
+ NULL);
+ g_signal_connect ((gpointer) cyan, "activate",
+ G_CALLBACK (FontViewMenu_SelectCyan),
+ NULL);
+ g_signal_connect ((gpointer) magenta, "activate",
+ G_CALLBACK (FontViewMenu_SelectMagenta),
+ NULL);
+ g_signal_connect ((gpointer) color_picker1, "activate",
+ G_CALLBACK (FontViewMenu_SelectColorPicker),
+ NULL);
+ g_signal_connect ((gpointer) select_by_wildcard1, "activate",
+ G_CALLBACK (FontViewMenu_SelectByName),
+ NULL);
+ g_signal_connect ((gpointer) select_by_script1, "activate",
+ G_CALLBACK (FontViewMenu_SelectByScript),
+ NULL);
+ g_signal_connect ((gpointer) glyphs_worth_outputting1, "activate",
+ G_CALLBACK (FontViewMenu_SelectWorthOutputting),
+ NULL);
+ g_signal_connect ((gpointer) changed_glyphs1, "activate",
+ G_CALLBACK (FontViewMenu_SelectChangedGlyphs),
+ NULL);
+ g_signal_connect ((gpointer) unhinted_glyphs1, "activate",
+ G_CALLBACK (FontViewMenu_SelectUnhintedGlyphs),
+ NULL);
+ g_signal_connect ((gpointer) autohintable1, "activate",
+ G_CALLBACK (FontViewMenu_SelectAutohintable),
+ NULL);
+ g_signal_connect ((gpointer) select_by_att1, "activate",
+ G_CALLBACK (FontViewMenu_SelectByLookupSubtable),
+ NULL);
+ g_signal_connect ((gpointer) find_and_replace1, "activate",
+ G_CALLBACK (FontViewMenu_FindRpl),
+ NULL);
+ g_signal_connect ((gpointer) replace_with_reference1, "activate",
+ G_CALLBACK (FontViewMenu_RplRef),
+ NULL);
+ g_signal_connect ((gpointer) unlink_reference1, "activate",
+ G_CALLBACK (FontViewMenu_UnlinkRef),
+ NULL);
+ g_signal_connect ((gpointer) copy_from1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateCopyFrom),
+ NULL);
+ g_signal_connect ((gpointer) all_fonts1, "activate",
+ G_CALLBACK (FontViewMenu_CopyFromAll),
+ NULL);
+ g_signal_connect ((gpointer) displayed_fonts1, "activate",
+ G_CALLBACK (FontViewMenu_CopyFromDisplayed),
+ NULL);
+ g_signal_connect ((gpointer) glyph_metadata1, "activate",
+ G_CALLBACK (FontViewMenu_CopyFromMetadata),
+ NULL);
+ g_signal_connect ((gpointer) truetype_instructions1, "activate",
+ G_CALLBACK (FontViewMenu_CopyFromTTInstrs),
+ NULL);
+ g_signal_connect ((gpointer) remove_undoes1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveUndoes),
+ NULL);
+ g_signal_connect ((gpointer) element1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateElement),
+ NULL);
+ g_signal_connect ((gpointer) font_info1, "activate",
+ G_CALLBACK (FontViewMenu_FontInfo),
+ NULL);
+ g_signal_connect ((gpointer) char_info1, "activate",
+ G_CALLBACK (FontViewMenu_CharInfo),
+ NULL);
+ g_signal_connect ((gpointer) math_info1, "activate",
+ G_CALLBACK (FontViewMenu_MathInfo),
+ NULL);
+ g_signal_connect ((gpointer) bdf_info3, "activate",
+ G_CALLBACK (FontViewMenu_BDFInfo),
+ NULL);
+ g_signal_connect ((gpointer) show_dependent1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateDependents),
+ NULL);
+ g_signal_connect ((gpointer) references2, "activate",
+ G_CALLBACK (FontViewMenu_ShowDependentRefs),
+ NULL);
+ g_signal_connect ((gpointer) substitutions3, "activate",
+ G_CALLBACK (FontViewMenu_ShowDependentSubs),
+ NULL);
+ g_signal_connect ((gpointer) mass_glyph_rename1, "activate",
+ G_CALLBACK (FontViewMenu_GlyphRename),
+ NULL);
+ g_signal_connect ((gpointer) find_problems1, "activate",
+ G_CALLBACK (FontViewMenu_FindProbs),
+ NULL);
+ g_signal_connect ((gpointer) validate1, "activate",
+ G_CALLBACK (FontViewMenu_Validate),
+ NULL);
+ g_signal_connect ((gpointer) bitmaps_available1, "activate",
+ G_CALLBACK (FontViewMenu_BitmapsAvail),
+ NULL);
+ g_signal_connect ((gpointer) regenerate_bitmaps1, "activate",
+ G_CALLBACK (FontViewMenu_RegenBitmaps),
+ NULL);
+ g_signal_connect ((gpointer) remove_bitmap_glyphs1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveBitmapGlyphs),
+ NULL);
+ g_signal_connect ((gpointer) change_weight1, "activate",
+ G_CALLBACK (FontViewMenu_ChangeWeight),
+ NULL);
+ g_signal_connect ((gpointer) oblique1, "activate",
+ G_CALLBACK (FontViewMenu_Oblique),
+ NULL);
+ g_signal_connect ((gpointer) condense_extend1, "activate",
+ G_CALLBACK (FontViewMenu_Condense),
+ NULL);
+ g_signal_connect ((gpointer) inline2, "activate",
+ G_CALLBACK (FontViewMenu_Inline),
+ NULL);
+ g_signal_connect ((gpointer) outline3, "activate",
+ G_CALLBACK (FontViewMenu_Outline),
+ NULL);
+ g_signal_connect ((gpointer) shadow2, "activate",
+ G_CALLBACK (FontViewMenu_Shadow),
+ NULL);
+ g_signal_connect ((gpointer) wireframe2, "activate",
+ G_CALLBACK (FontViewMenu_WireFrame),
+ NULL);
+ g_signal_connect ((gpointer) transformations1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateTransformations),
+ NULL);
+ g_signal_connect ((gpointer) transform1, "activate",
+ G_CALLBACK (FontViewMenu_Transform),
+ NULL);
+ g_signal_connect ((gpointer) point_of_view_projection1, "activate",
+ G_CALLBACK (FontViewMenu_PointOfView),
+ NULL);
+ g_signal_connect ((gpointer) non_linear_transform1, "activate",
+ G_CALLBACK (FontViewMenu_NonLinearTransform),
+ NULL);
+ g_signal_connect ((gpointer) expand_stroke1, "activate",
+ G_CALLBACK (FontViewMenu_ExpandStroke),
+ NULL);
+ g_signal_connect ((gpointer) tilepath1, "activate",
+ G_CALLBACK (FontViewMenu_TilePath),
+ NULL);
+ g_signal_connect ((gpointer) remove_overlap1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveOverlap),
+ NULL);
+ g_signal_connect ((gpointer) intersect1, "activate",
+ G_CALLBACK (FontViewMenu_Intersect),
+ NULL);
+ g_signal_connect ((gpointer) find_intersection1, "activate",
+ G_CALLBACK (FontViewMenu_FindInter),
+ NULL);
+ g_signal_connect ((gpointer) simplify2, "activate",
+ G_CALLBACK (FontViewMenu_Simplify),
+ NULL);
+ g_signal_connect ((gpointer) simplify_more1, "activate",
+ G_CALLBACK (FontViewMenu_SimplifyMore),
+ NULL);
+ g_signal_connect ((gpointer) cleanup1, "activate",
+ G_CALLBACK (FontViewMenu_Cleanup),
+ NULL);
+ g_signal_connect ((gpointer) canonical_start_point1, "activate",
+ G_CALLBACK (FontViewMenu_CanonicalStart),
+ NULL);
+ g_signal_connect ((gpointer) canonical_contours1, "activate",
+ G_CALLBACK (FontViewMenu_CanonicalContours),
+ NULL);
+ g_signal_connect ((gpointer) add_extrema1, "activate",
+ G_CALLBACK (FontViewMenu_AddExtrema),
+ NULL);
+ g_signal_connect ((gpointer) round_to_int1, "activate",
+ G_CALLBACK (FontViewMenu_RoundToInt),
+ NULL);
+ g_signal_connect ((gpointer) to_hundredths1, "activate",
+ G_CALLBACK (FontViewMenu_RoundToHundredths),
+ NULL);
+ g_signal_connect ((gpointer) cluster1, "activate",
+ G_CALLBACK (FontViewMenu_Cluster),
+ NULL);
+ g_signal_connect ((gpointer) autotrace1, "activate",
+ G_CALLBACK (FontViewMenu_Autotrace),
+ NULL);
+ g_signal_connect ((gpointer) correct_direction1, "activate",
+ G_CALLBACK (FontViewMenu_CorrectDir),
+ NULL);
+ g_signal_connect ((gpointer) build1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateBuild),
+ NULL);
+ g_signal_connect ((gpointer) build_accented_glyph1, "activate",
+ G_CALLBACK (FontViewMenu_BuildAccented),
+ NULL);
+ g_signal_connect ((gpointer) build_composite_glyph1, "activate",
+ G_CALLBACK (FontViewMenu_BuildComposite),
+ NULL);
+ g_signal_connect ((gpointer) merge_fonts1, "activate",
+ G_CALLBACK (FontViewMenu_MergeFonts),
+ NULL);
+ g_signal_connect ((gpointer) interpolate_fonts1, "activate",
+ G_CALLBACK (FontViewMenu_Interpolate),
+ NULL);
+ g_signal_connect ((gpointer) compare_fonts1, "activate",
+ G_CALLBACK (FontViewMenu_CompareFonts),
+ NULL);
+ g_signal_connect ((gpointer) tools3, "activate",
+ G_CALLBACK (FontViewMenu_ToolsActivate),
+ NULL);
+ g_signal_connect ((gpointer) hints1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateHints),
+ NULL);
+ g_signal_connect ((gpointer) autohint1, "activate",
+ G_CALLBACK (FontViewMenu_AutoHint),
+ NULL);
+ g_signal_connect ((gpointer) hint_subsitution_pts1, "activate",
+ G_CALLBACK (FontViewMenu_AutoHintSubsPts),
+ NULL);
+ g_signal_connect ((gpointer) auto_counter_hint1, "activate",
+ G_CALLBACK (FontViewMenu_AutoCounter),
+ NULL);
+ g_signal_connect ((gpointer) dont_autohint1, "activate",
+ G_CALLBACK (FontViewMenu_DontAutoHint),
+ NULL);
+ g_signal_connect ((gpointer) autoinstr1, "activate",
+ G_CALLBACK (FontViewMenu_AutoInstr),
+ NULL);
+ g_signal_connect ((gpointer) edit_instructions1, "activate",
+ G_CALLBACK (FontViewMenu_EditInstrs),
+ NULL);
+ g_signal_connect ((gpointer) edit_fpgm1, "activate",
+ G_CALLBACK (FontViewMenu_EditTable),
+ NULL);
+ g_signal_connect ((gpointer) edit_prep1, "activate",
+ G_CALLBACK (FontViewMenu_EditTable),
+ NULL);
+ g_signal_connect ((gpointer) edit_maxp1, "activate",
+ G_CALLBACK (FontViewMenu_EditTable),
+ NULL);
+ g_signal_connect ((gpointer) edit_cvt_1, "activate",
+ G_CALLBACK (FontViewMenu_EditTable),
+ NULL);
+ g_signal_connect ((gpointer) private_to_cvt_1, "activate",
+ G_CALLBACK (FontViewMenu_PrivateToCvt),
+ NULL);
+ g_signal_connect ((gpointer) clear_hints1, "activate",
+ G_CALLBACK (FontViewMenu_ClearHints),
+ NULL);
+ g_signal_connect ((gpointer) clear_instructions1, "activate",
+ G_CALLBACK (FontViewMenu_ClearInstrs),
+ NULL);
+ g_signal_connect ((gpointer) hstem1, "activate",
+ G_CALLBACK (FontViewMenu_Histograms),
+ NULL);
+ g_signal_connect ((gpointer) vstem1, "activate",
+ G_CALLBACK (FontViewMenu_Histograms),
+ NULL);
+ g_signal_connect ((gpointer) bluevalues1, "activate",
+ G_CALLBACK (FontViewMenu_Histograms),
+ NULL);
+ g_signal_connect ((gpointer) reencode1, "activate",
+ G_CALLBACK (FontViewMenu_BuildReencode),
+ NULL);
+ g_signal_connect ((gpointer) compact1, "activate",
+ G_CALLBACK (FontViewMenu_Compact),
+ NULL);
+ g_signal_connect ((gpointer) force_encoding1, "activate",
+ G_CALLBACK (FontViewMenu_BuildForceEncoding),
+ NULL);
+ g_signal_connect ((gpointer) add_encoding_slots1, "activate",
+ G_CALLBACK (FontViewMenu_AddEncodingSlots),
+ NULL);
+ g_signal_connect ((gpointer) remove_unused_slots1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveUnusedSlots),
+ NULL);
+ g_signal_connect ((gpointer) detach_glyphs1, "activate",
+ G_CALLBACK (FontViewMenu_DetachGlyphs),
+ NULL);
+ g_signal_connect ((gpointer) detatch___remove_glyphs1, "activate",
+ G_CALLBACK (FontViewMenu_DetachAndRemoveGlyphs),
+ NULL);
+ g_signal_connect ((gpointer) add_encoding_name1, "activate",
+ G_CALLBACK (FontViewMenu_AddEncodingName),
+ NULL);
+ g_signal_connect ((gpointer) load_encoding1, "activate",
+ G_CALLBACK (FontViewMenu_LoadEncoding),
+ NULL);
+ g_signal_connect ((gpointer) make_from_font1, "activate",
+ G_CALLBACK (FontViewMenu_MakeFromFont),
+ NULL);
+ g_signal_connect ((gpointer) remove_encoding1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveEncoding),
+ NULL);
+ g_signal_connect ((gpointer) display_by_groups1, "activate",
+ G_CALLBACK (FontViewMenu_DisplayByGroups),
+ NULL);
+ g_signal_connect ((gpointer) define_groups1, "activate",
+ G_CALLBACK (FontViewMenu_DefineGroups),
+ NULL);
+ g_signal_connect ((gpointer) save_namelist_of_font1, "activate",
+ G_CALLBACK (FontViewMenu_SaveNamelist),
+ NULL);
+ g_signal_connect ((gpointer) load_namelist1, "activate",
+ G_CALLBACK (FontViewMenu_LoadNamelist),
+ NULL);
+ g_signal_connect ((gpointer) rename_glyphs1, "activate",
+ G_CALLBACK (FontViewMenu_RenameByNamelist),
+ NULL);
+ g_signal_connect ((gpointer) create_named_glyphs1, "activate",
+ G_CALLBACK (FontViewMenu_CreateNamedGlyphs),
+ NULL);
+ g_signal_connect ((gpointer) view3, "activate",
+ G_CALLBACK (FontViewMenu_ActivateView),
+ NULL);
+ g_signal_connect ((gpointer) next_glyph1, "activate",
+ G_CALLBACK (FontViewMenu_ChangeChar),
+ NULL);
+ g_signal_connect ((gpointer) prev_glyph1, "activate",
+ G_CALLBACK (FontViewMenu_ChangeChar),
+ NULL);
+ g_signal_connect ((gpointer) next_defined_glyph1, "activate",
+ G_CALLBACK (FontViewMenu_ChangeChar),
+ NULL);
+ g_signal_connect ((gpointer) prev_defined_glyph1, "activate",
+ G_CALLBACK (FontViewMenu_ChangeChar),
+ NULL);
+ g_signal_connect ((gpointer) goto1, "activate",
+ G_CALLBACK (FontViewMenu_Goto),
+ NULL);
+ g_signal_connect ((gpointer) show_att1, "activate",
+ G_CALLBACK (FontViewMenu_ShowAtt),
+ NULL);
+ g_signal_connect ((gpointer) display_substitutions1, "activate",
+ G_CALLBACK (FontViewMenu_DisplaySubstitutions),
+ NULL);
+ g_signal_connect ((gpointer) combinations1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateCombinations),
+ NULL);
+ g_signal_connect ((gpointer) kern_pairs1, "activate",
+ G_CALLBACK (FontViewMenu_KernPairs),
+ NULL);
+ g_signal_connect ((gpointer) anchor_pairs1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateAnchoredPairs),
+ NULL);
+ g_signal_connect ((gpointer) ligatures2, "activate",
+ G_CALLBACK (FontViewMenu_Ligatures),
+ NULL);
+ g_signal_connect ((gpointer) glyph_image1, "activate",
+ G_CALLBACK (FontViewMenu_GlyphLabel),
+ NULL);
+ g_signal_connect ((gpointer) glyph_name1, "activate",
+ G_CALLBACK (FontViewMenu_GlyphLabel),
+ NULL);
+ g_signal_connect ((gpointer) unicode1, "activate",
+ G_CALLBACK (FontViewMenu_GlyphLabel),
+ NULL);
+ g_signal_connect ((gpointer) encoding1, "activate",
+ G_CALLBACK (FontViewMenu_GlyphLabel),
+ NULL);
+ g_signal_connect ((gpointer) show_h_metrics1, "activate",
+ G_CALLBACK (FontViewMenu_ShowMetrics),
+ NULL);
+ g_signal_connect ((gpointer) show_v_metrics1, "activate",
+ G_CALLBACK (FontViewMenu_ShowMetrics),
+ NULL);
+ g_signal_connect ((gpointer) _32x8_cell_window1, "activate",
+ G_CALLBACK (FontViewMenu_WindowSize),
+ NULL);
+ g_signal_connect ((gpointer) _16x4_cell_window1, "activate",
+ G_CALLBACK (FontViewMenu_WindowSize),
+ NULL);
+ g_signal_connect ((gpointer) _8x2_cell_window1, "activate",
+ G_CALLBACK (FontViewMenu_WindowSize),
+ NULL);
+ g_signal_connect ((gpointer) _24_pixel_outline1, "activate",
+ G_CALLBACK (FontViewMenu_PixelSize),
+ NULL);
+ g_signal_connect ((gpointer) _36_pixel_outline1, "activate",
+ G_CALLBACK (FontViewMenu_PixelSize),
+ NULL);
+ g_signal_connect ((gpointer) _48_pixel_outline1, "activate",
+ G_CALLBACK (FontViewMenu_PixelSize),
+ NULL);
+ g_signal_connect ((gpointer) _72_pixel_outline1, "activate",
+ G_CALLBACK (FontViewMenu_PixelSize),
+ NULL);
+ g_signal_connect ((gpointer) _96_pixel_outline1, "activate",
+ G_CALLBACK (FontViewMenu_PixelSize),
+ NULL);
+ g_signal_connect ((gpointer) anti_alias1, "activate",
+ G_CALLBACK (FontViewMenu_PixelSize),
+ NULL);
+ g_signal_connect ((gpointer) fit_to_em1, "activate",
+ G_CALLBACK (FontViewMenu_PixelSize),
+ NULL);
+ g_signal_connect ((gpointer) bitmap_magnification1, "activate",
+ G_CALLBACK (FontViewMenu_BitmapMagnification),
+ NULL);
+ g_signal_connect ((gpointer) metrics1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateMetrics),
+ NULL);
+ g_signal_connect ((gpointer) center_in_width1, "activate",
+ G_CALLBACK (FontViewMenu_CenterWidth),
+ NULL);
+ g_signal_connect ((gpointer) thirds_in_width1, "activate",
+ G_CALLBACK (FontViewMenu_ThirdsWidth),
+ NULL);
+ g_signal_connect ((gpointer) set_width1, "activate",
+ G_CALLBACK (FontViewMenu_SetWidth),
+ NULL);
+ g_signal_connect ((gpointer) set_lbearing1, "activate",
+ G_CALLBACK (FontViewMenu_SetWidth),
+ NULL);
+ g_signal_connect ((gpointer) set_rbearing1, "activate",
+ G_CALLBACK (FontViewMenu_SetWidth),
+ NULL);
+ g_signal_connect ((gpointer) set_vertical_advance1, "activate",
+ G_CALLBACK (FontViewMenu_SetWidth),
+ NULL);
+ g_signal_connect ((gpointer) auto_width1, "activate",
+ G_CALLBACK (FontViewMenu_AutoWidth),
+ NULL);
+ g_signal_connect ((gpointer) auto_kern1, "activate",
+ G_CALLBACK (FontViewMenu_AutoKern),
+ NULL);
+ g_signal_connect ((gpointer) kern_by_classes1, "activate",
+ G_CALLBACK (FontViewMenu_KernClasses),
+ NULL);
+ g_signal_connect ((gpointer) remove_all_kern_pairs1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveKP),
+ NULL);
+ g_signal_connect ((gpointer) kern_pair_closeup1, "activate",
+ G_CALLBACK (FontViewMenu_KernPairCloseup),
+ NULL);
+ g_signal_connect ((gpointer) vkern_by_classes1, "activate",
+ G_CALLBACK (FontViewMenu_VKernClasses),
+ NULL);
+ g_signal_connect ((gpointer) vkern_from_hkern1, "activate",
+ G_CALLBACK (FontViewMenu_VKernFromH),
+ NULL);
+ g_signal_connect ((gpointer) remove_all_vkern_pairs1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveVKP),
+ NULL);
+ g_signal_connect ((gpointer) cid1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateCID),
+ NULL);
+ g_signal_connect ((gpointer) convert_to_cid1, "activate",
+ G_CALLBACK (FontViewMenu_Convert2CID),
+ NULL);
+ g_signal_connect ((gpointer) convert_by_cmap1, "activate",
+ G_CALLBACK (FontViewMenu_ConvertByCMap),
+ NULL);
+ g_signal_connect ((gpointer) flatten1, "activate",
+ G_CALLBACK (FontViewMenu_Flatten),
+ NULL);
+ g_signal_connect ((gpointer) flatten_by_cmap1, "activate",
+ G_CALLBACK (FontViewMenu_FlattenByCMap),
+ NULL);
+ g_signal_connect ((gpointer) insert_font1, "activate",
+ G_CALLBACK (FontViewMenu_CIDInsertFont),
+ NULL);
+ g_signal_connect ((gpointer) insert_empty_font1, "activate",
+ G_CALLBACK (FontViewMenu_CIDInsertEmptyFont),
+ NULL);
+ g_signal_connect ((gpointer) remove_font1, "activate",
+ G_CALLBACK (FontViewMenu_RemoveFontFromCID),
+ NULL);
+ g_signal_connect ((gpointer) change_supplement1, "activate",
+ G_CALLBACK (FontViewMenu_ChangeSupplement),
+ NULL);
+ g_signal_connect ((gpointer) cid_font_info1, "activate",
+ G_CALLBACK (FontViewMenu_CIDFontInfo),
+ NULL);
+ g_signal_connect ((gpointer) mm1, "activate",
+ G_CALLBACK (FontViewMenu_ActivateMM),
+ NULL);
+ g_signal_connect ((gpointer) create_mm1, "activate",
+ G_CALLBACK (FontViewMenu_CreateMM),
+ NULL);
+ g_signal_connect ((gpointer) mm_validity_check1, "activate",
+ G_CALLBACK (FontViewMenu_MMValid),
+ NULL);
+ g_signal_connect ((gpointer) mm_info1, "activate",
+ G_CALLBACK (FontViewMenu_MMInfo),
+ NULL);
+ g_signal_connect ((gpointer) blend_to_new_font1, "activate",
+ G_CALLBACK (FontViewMenu_Blend),
+ NULL);
+ g_signal_connect ((gpointer) mm_change_def_weights1, "activate",
+ G_CALLBACK (FontViewMenu_ChangeDefWeights),
+ NULL);
+ g_signal_connect ((gpointer) window1, "activate",
+ G_CALLBACK (Menu_ActivateWindows),
+ NULL);
+ g_signal_connect ((gpointer) open_outline_window1, "activate",
+ G_CALLBACK (FontViewMenu_OpenOutline),
+ NULL);
+ g_signal_connect ((gpointer) open_bitmap_window1, "activate",
+ G_CALLBACK (FontViewMenu_OpenBitmap),
+ NULL);
+ g_signal_connect ((gpointer) open_metrics_window1, "activate",
+ G_CALLBACK (FontViewMenu_OpenMetrics),
+ NULL);
+ g_signal_connect ((gpointer) warnings1, "activate",
+ G_CALLBACK (WindowMenu_Warnings),
+ NULL);
+ g_signal_connect ((gpointer) help1, "activate",
+ G_CALLBACK (FontViewMenu_ContextualHelp),
+ NULL);
+ g_signal_connect ((gpointer) overview1, "activate",
+ G_CALLBACK (MenuHelp_Help),
+ NULL);
+ g_signal_connect ((gpointer) index1, "activate",
+ G_CALLBACK (MenuHelp_Index),
+ NULL);
+ g_signal_connect ((gpointer) about1, "activate",
+ G_CALLBACK (MenuHelp_About),
+ NULL);
+ g_signal_connect ((gpointer) license1, "activate",
+ G_CALLBACK (MenuHelp_License),
+ NULL);
+ g_signal_connect ((gpointer) status, "expose_event",
+ G_CALLBACK (FontView_StatusExpose),
+ NULL);
+ g_signal_connect ((gpointer) view, "button_press_event",
+ G_CALLBACK (FontViewView_Mouse),
+ NULL);
+ g_signal_connect ((gpointer) view, "button_release_event",
+ G_CALLBACK (FontViewView_Mouse),
+ NULL);
+ g_signal_connect ((gpointer) view, "motion_notify_event",
+ G_CALLBACK (FontViewView_Mouse),
+ NULL);
+ g_signal_connect ((gpointer) view, "configure_event",
+ G_CALLBACK (FontViewView_Resize),
+ NULL);
+ g_signal_connect ((gpointer) view, "expose_event",
+ G_CALLBACK (FontViewView_Expose),
+ NULL);
+ g_signal_connect ((gpointer) vscrollbar2, "value_changed",
+ G_CALLBACK (FontView_VScroll),
+ NULL);
+
+ atko = gtk_widget_get_accessible (FontViewMenu);
+ atk_object_set_name (atko, _("FontViewMenu"));
+
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (FontView, FontView, "FontView");
+ GLADE_HOOKUP_OBJECT (FontView, vbox1, "vbox1");
+ GLADE_HOOKUP_OBJECT (FontView, FontViewMenu, "FontViewMenu");
+ GLADE_HOOKUP_OBJECT (FontView, file1, "file1");
+ GLADE_HOOKUP_OBJECT (FontView, file1_menu, "file1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, new2, "new2");
+ GLADE_HOOKUP_OBJECT (FontView, image5763, "image5763");
+ GLADE_HOOKUP_OBJECT (FontView, open2, "open2");
+ GLADE_HOOKUP_OBJECT (FontView, image5764, "image5764");
+ GLADE_HOOKUP_OBJECT (FontView, recent1, "recent1");
+ GLADE_HOOKUP_OBJECT (FontView, recent1_menu, "recent1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, separator2, "separator2");
+ GLADE_HOOKUP_OBJECT (FontView, close2, "close2");
+ GLADE_HOOKUP_OBJECT (FontView, image5765, "image5765");
+ GLADE_HOOKUP_OBJECT (FontView, separator1, "separator1");
+ GLADE_HOOKUP_OBJECT (FontView, save2, "save2");
+ GLADE_HOOKUP_OBJECT (FontView, image5766, "image5766");
+ GLADE_HOOKUP_OBJECT (FontView, save_as2, "save_as2");
+ GLADE_HOOKUP_OBJECT (FontView, image5767, "image5767");
+ GLADE_HOOKUP_OBJECT (FontView, save_all1, "save_all1");
+ GLADE_HOOKUP_OBJECT (FontView, image5768, "image5768");
+ GLADE_HOOKUP_OBJECT (FontView, generate_fonts1, "generate_fonts1");
+ GLADE_HOOKUP_OBJECT (FontView, image5769, "image5769");
+ GLADE_HOOKUP_OBJECT (FontView, generate_mac_family1, "generate_mac_family1");
+ GLADE_HOOKUP_OBJECT (FontView, image5770, "image5770");
+ GLADE_HOOKUP_OBJECT (FontView, separatormenuitem1, "separatormenuitem1");
+ GLADE_HOOKUP_OBJECT (FontView, import1, "import1");
+ GLADE_HOOKUP_OBJECT (FontView, image5771, "image5771");
+ GLADE_HOOKUP_OBJECT (FontView, merge_kern_info1, "merge_kern_info1");
+ GLADE_HOOKUP_OBJECT (FontView, revert_file1, "revert_file1");
+ GLADE_HOOKUP_OBJECT (FontView, image5772, "image5772");
+ GLADE_HOOKUP_OBJECT (FontView, revert_to_backup1, "revert_to_backup1");
+ GLADE_HOOKUP_OBJECT (FontView, image5773, "image5773");
+ GLADE_HOOKUP_OBJECT (FontView, revert_glyph1, "revert_glyph1");
+ GLADE_HOOKUP_OBJECT (FontView, image5774, "image5774");
+ GLADE_HOOKUP_OBJECT (FontView, separator4, "separator4");
+ GLADE_HOOKUP_OBJECT (FontView, print2, "print2");
+ GLADE_HOOKUP_OBJECT (FontView, image5775, "image5775");
+ GLADE_HOOKUP_OBJECT (FontView, separator5, "separator5");
+ GLADE_HOOKUP_OBJECT (FontView, execute_script1, "execute_script1");
+ GLADE_HOOKUP_OBJECT (FontView, image5776, "image5776");
+ GLADE_HOOKUP_OBJECT (FontView, script_menu1, "script_menu1");
+ GLADE_HOOKUP_OBJECT (FontView, script_menu1_menu, "script_menu1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, separator8, "separator8");
+ GLADE_HOOKUP_OBJECT (FontView, separator6, "separator6");
+ GLADE_HOOKUP_OBJECT (FontView, preferences2, "preferences2");
+ GLADE_HOOKUP_OBJECT (FontView, image5777, "image5777");
+ GLADE_HOOKUP_OBJECT (FontView, separator7, "separator7");
+ GLADE_HOOKUP_OBJECT (FontView, quit2, "quit2");
+ GLADE_HOOKUP_OBJECT (FontView, image5778, "image5778");
+ GLADE_HOOKUP_OBJECT (FontView, edit2, "edit2");
+ GLADE_HOOKUP_OBJECT (FontView, edit2_menu, "edit2_menu");
+ GLADE_HOOKUP_OBJECT (FontView, undo2, "undo2");
+ GLADE_HOOKUP_OBJECT (FontView, image5779, "image5779");
+ GLADE_HOOKUP_OBJECT (FontView, redo2, "redo2");
+ GLADE_HOOKUP_OBJECT (FontView, image5780, "image5780");
+ GLADE_HOOKUP_OBJECT (FontView, separator9, "separator9");
+ GLADE_HOOKUP_OBJECT (FontView, cut2, "cut2");
+ GLADE_HOOKUP_OBJECT (FontView, image5781, "image5781");
+ GLADE_HOOKUP_OBJECT (FontView, copy2, "copy2");
+ GLADE_HOOKUP_OBJECT (FontView, image5782, "image5782");
+ GLADE_HOOKUP_OBJECT (FontView, copy_reference1, "copy_reference1");
+ GLADE_HOOKUP_OBJECT (FontView, image5783, "image5783");
+ GLADE_HOOKUP_OBJECT (FontView, copy_lookup_data1, "copy_lookup_data1");
+ GLADE_HOOKUP_OBJECT (FontView, copy_width1, "copy_width1");
+ GLADE_HOOKUP_OBJECT (FontView, image5784, "image5784");
+ GLADE_HOOKUP_OBJECT (FontView, copy_vwidth1, "copy_vwidth1");
+ GLADE_HOOKUP_OBJECT (FontView, image5785, "image5785");
+ GLADE_HOOKUP_OBJECT (FontView, copy_lbearing1, "copy_lbearing1");
+ GLADE_HOOKUP_OBJECT (FontView, image5786, "image5786");
+ GLADE_HOOKUP_OBJECT (FontView, copy_rbearing1, "copy_rbearing1");
+ GLADE_HOOKUP_OBJECT (FontView, image5787, "image5787");
+ GLADE_HOOKUP_OBJECT (FontView, paste2, "paste2");
+ GLADE_HOOKUP_OBJECT (FontView, image5788, "image5788");
+ GLADE_HOOKUP_OBJECT (FontView, paste_into1, "paste_into1");
+ GLADE_HOOKUP_OBJECT (FontView, image5789, "image5789");
+ GLADE_HOOKUP_OBJECT (FontView, paste_after1, "paste_after1");
+ GLADE_HOOKUP_OBJECT (FontView, image5790, "image5790");
+ GLADE_HOOKUP_OBJECT (FontView, same_glyph_as1, "same_glyph_as1");
+ GLADE_HOOKUP_OBJECT (FontView, clear2, "clear2");
+ GLADE_HOOKUP_OBJECT (FontView, image5791, "image5791");
+ GLADE_HOOKUP_OBJECT (FontView, clear_background1, "clear_background1");
+ GLADE_HOOKUP_OBJECT (FontView, image5792, "image5792");
+ GLADE_HOOKUP_OBJECT (FontView, copy_fg_to_bg1, "copy_fg_to_bg1");
+ GLADE_HOOKUP_OBJECT (FontView, image5793, "image5793");
+ GLADE_HOOKUP_OBJECT (FontView, join1, "join1");
+ GLADE_HOOKUP_OBJECT (FontView, separator10, "separator10");
+ GLADE_HOOKUP_OBJECT (FontView, select1, "select1");
+ GLADE_HOOKUP_OBJECT (FontView, select1_menu, "select1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, select_all1, "select_all1");
+ GLADE_HOOKUP_OBJECT (FontView, invert_selection1, "invert_selection1");
+ GLADE_HOOKUP_OBJECT (FontView, deselect_all1, "deselect_all1");
+ GLADE_HOOKUP_OBJECT (FontView, select_by_color1, "select_by_color1");
+ GLADE_HOOKUP_OBJECT (FontView, select_by_color1_menu, "select_by_color1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, default1, "default1");
+ GLADE_HOOKUP_OBJECT (FontView, image5794, "image5794");
+ GLADE_HOOKUP_OBJECT (FontView, white, "white");
+ GLADE_HOOKUP_OBJECT (FontView, image5795, "image5795");
+ GLADE_HOOKUP_OBJECT (FontView, red, "red");
+ GLADE_HOOKUP_OBJECT (FontView, image5796, "image5796");
+ GLADE_HOOKUP_OBJECT (FontView, green, "green");
+ GLADE_HOOKUP_OBJECT (FontView, image5797, "image5797");
+ GLADE_HOOKUP_OBJECT (FontView, blue, "blue");
+ GLADE_HOOKUP_OBJECT (FontView, image5798, "image5798");
+ GLADE_HOOKUP_OBJECT (FontView, yellow, "yellow");
+ GLADE_HOOKUP_OBJECT (FontView, image5799, "image5799");
+ GLADE_HOOKUP_OBJECT (FontView, cyan, "cyan");
+ GLADE_HOOKUP_OBJECT (FontView, image5800, "image5800");
+ GLADE_HOOKUP_OBJECT (FontView, magenta, "magenta");
+ GLADE_HOOKUP_OBJECT (FontView, image5801, "image5801");
+ GLADE_HOOKUP_OBJECT (FontView, color_picker1, "color_picker1");
+ GLADE_HOOKUP_OBJECT (FontView, image5802, "image5802");
+ GLADE_HOOKUP_OBJECT (FontView, select_by_wildcard1, "select_by_wildcard1");
+ GLADE_HOOKUP_OBJECT (FontView, select_by_script1, "select_by_script1");
+ GLADE_HOOKUP_OBJECT (FontView, separator11, "separator11");
+ GLADE_HOOKUP_OBJECT (FontView, glyphs_worth_outputting1, "glyphs_worth_outputting1");
+ GLADE_HOOKUP_OBJECT (FontView, changed_glyphs1, "changed_glyphs1");
+ GLADE_HOOKUP_OBJECT (FontView, unhinted_glyphs1, "unhinted_glyphs1");
+ GLADE_HOOKUP_OBJECT (FontView, autohintable1, "autohintable1");
+ GLADE_HOOKUP_OBJECT (FontView, separator63, "separator63");
+ GLADE_HOOKUP_OBJECT (FontView, select_by_att1, "select_by_att1");
+ GLADE_HOOKUP_OBJECT (FontView, find_and_replace1, "find_and_replace1");
+ GLADE_HOOKUP_OBJECT (FontView, image5803, "image5803");
+ GLADE_HOOKUP_OBJECT (FontView, replace_with_reference1, "replace_with_reference1");
+ GLADE_HOOKUP_OBJECT (FontView, separator12, "separator12");
+ GLADE_HOOKUP_OBJECT (FontView, unlink_reference1, "unlink_reference1");
+ GLADE_HOOKUP_OBJECT (FontView, image5804, "image5804");
+ GLADE_HOOKUP_OBJECT (FontView, separator13, "separator13");
+ GLADE_HOOKUP_OBJECT (FontView, copy_from1, "copy_from1");
+ GLADE_HOOKUP_OBJECT (FontView, copy_from1_menu, "copy_from1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, all_fonts1, "all_fonts1");
+ GLADE_HOOKUP_OBJECT (FontView, displayed_fonts1, "displayed_fonts1");
+ GLADE_HOOKUP_OBJECT (FontView, separator15, "separator15");
+ GLADE_HOOKUP_OBJECT (FontView, glyph_metadata1, "glyph_metadata1");
+ GLADE_HOOKUP_OBJECT (FontView, separator88, "separator88");
+ GLADE_HOOKUP_OBJECT (FontView, truetype_instructions1, "truetype_instructions1");
+ GLADE_HOOKUP_OBJECT (FontView, separator14, "separator14");
+ GLADE_HOOKUP_OBJECT (FontView, remove_undoes1, "remove_undoes1");
+ GLADE_HOOKUP_OBJECT (FontView, image5805, "image5805");
+ GLADE_HOOKUP_OBJECT (FontView, element1, "element1");
+ GLADE_HOOKUP_OBJECT (FontView, element1_menu, "element1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, font_info1, "font_info1");
+ GLADE_HOOKUP_OBJECT (FontView, image5806, "image5806");
+ GLADE_HOOKUP_OBJECT (FontView, char_info1, "char_info1");
+ GLADE_HOOKUP_OBJECT (FontView, image5807, "image5807");
+ GLADE_HOOKUP_OBJECT (FontView, other_info1, "other_info1");
+ GLADE_HOOKUP_OBJECT (FontView, other_info1_menu, "other_info1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, math_info1, "math_info1");
+ GLADE_HOOKUP_OBJECT (FontView, image5808, "image5808");
+ GLADE_HOOKUP_OBJECT (FontView, bdf_info3, "bdf_info3");
+ GLADE_HOOKUP_OBJECT (FontView, show_dependent1, "show_dependent1");
+ GLADE_HOOKUP_OBJECT (FontView, show_dependent1_menu, "show_dependent1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, references2, "references2");
+ GLADE_HOOKUP_OBJECT (FontView, substitutions3, "substitutions3");
+ GLADE_HOOKUP_OBJECT (FontView, mass_glyph_rename1, "mass_glyph_rename1");
+ GLADE_HOOKUP_OBJECT (FontView, find_problems1, "find_problems1");
+ GLADE_HOOKUP_OBJECT (FontView, image5809, "image5809");
+ GLADE_HOOKUP_OBJECT (FontView, validate1, "validate1");
+ GLADE_HOOKUP_OBJECT (FontView, image5810, "image5810");
+ GLADE_HOOKUP_OBJECT (FontView, separator22, "separator22");
+ GLADE_HOOKUP_OBJECT (FontView, bitmaps_available1, "bitmaps_available1");
+ GLADE_HOOKUP_OBJECT (FontView, image5811, "image5811");
+ GLADE_HOOKUP_OBJECT (FontView, regenerate_bitmaps1, "regenerate_bitmaps1");
+ GLADE_HOOKUP_OBJECT (FontView, image5812, "image5812");
+ GLADE_HOOKUP_OBJECT (FontView, remove_bitmap_glyphs1, "remove_bitmap_glyphs1");
+ GLADE_HOOKUP_OBJECT (FontView, separator23, "separator23");
+ GLADE_HOOKUP_OBJECT (FontView, style1, "style1");
+ GLADE_HOOKUP_OBJECT (FontView, image5813, "image5813");
+ GLADE_HOOKUP_OBJECT (FontView, style1_menu, "style1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, change_weight1, "change_weight1");
+ GLADE_HOOKUP_OBJECT (FontView, image5814, "image5814");
+ GLADE_HOOKUP_OBJECT (FontView, oblique1, "oblique1");
+ GLADE_HOOKUP_OBJECT (FontView, image5815, "image5815");
+ GLADE_HOOKUP_OBJECT (FontView, condense_extend1, "condense_extend1");
+ GLADE_HOOKUP_OBJECT (FontView, image5816, "image5816");
+ GLADE_HOOKUP_OBJECT (FontView, inline2, "inline2");
+ GLADE_HOOKUP_OBJECT (FontView, image5817, "image5817");
+ GLADE_HOOKUP_OBJECT (FontView, outline3, "outline3");
+ GLADE_HOOKUP_OBJECT (FontView, image5818, "image5818");
+ GLADE_HOOKUP_OBJECT (FontView, shadow2, "shadow2");
+ GLADE_HOOKUP_OBJECT (FontView, image5819, "image5819");
+ GLADE_HOOKUP_OBJECT (FontView, wireframe2, "wireframe2");
+ GLADE_HOOKUP_OBJECT (FontView, image5820, "image5820");
+ GLADE_HOOKUP_OBJECT (FontView, transformations1, "transformations1");
+ GLADE_HOOKUP_OBJECT (FontView, image5821, "image5821");
+ GLADE_HOOKUP_OBJECT (FontView, transformations1_menu, "transformations1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, transform1, "transform1");
+ GLADE_HOOKUP_OBJECT (FontView, image5822, "image5822");
+ GLADE_HOOKUP_OBJECT (FontView, point_of_view_projection1, "point_of_view_projection1");
+ GLADE_HOOKUP_OBJECT (FontView, non_linear_transform1, "non_linear_transform1");
+ GLADE_HOOKUP_OBJECT (FontView, expand_stroke1, "expand_stroke1");
+ GLADE_HOOKUP_OBJECT (FontView, image5823, "image5823");
+ GLADE_HOOKUP_OBJECT (FontView, tilepath1, "tilepath1");
+ GLADE_HOOKUP_OBJECT (FontView, overlap1, "overlap1");
+ GLADE_HOOKUP_OBJECT (FontView, image5824, "image5824");
+ GLADE_HOOKUP_OBJECT (FontView, overlap1_menu, "overlap1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, remove_overlap1, "remove_overlap1");
+ GLADE_HOOKUP_OBJECT (FontView, image5825, "image5825");
+ GLADE_HOOKUP_OBJECT (FontView, intersect1, "intersect1");
+ GLADE_HOOKUP_OBJECT (FontView, image5826, "image5826");
+ GLADE_HOOKUP_OBJECT (FontView, find_intersection1, "find_intersection1");
+ GLADE_HOOKUP_OBJECT (FontView, image5827, "image5827");
+ GLADE_HOOKUP_OBJECT (FontView, simplify3, "simplify3");
+ GLADE_HOOKUP_OBJECT (FontView, image5828, "image5828");
+ GLADE_HOOKUP_OBJECT (FontView, simplify3_menu, "simplify3_menu");
+ GLADE_HOOKUP_OBJECT (FontView, simplify2, "simplify2");
+ GLADE_HOOKUP_OBJECT (FontView, image5829, "image5829");
+ GLADE_HOOKUP_OBJECT (FontView, simplify_more1, "simplify_more1");
+ GLADE_HOOKUP_OBJECT (FontView, cleanup1, "cleanup1");
+ GLADE_HOOKUP_OBJECT (FontView, canonical_start_point1, "canonical_start_point1");
+ GLADE_HOOKUP_OBJECT (FontView, canonical_contours1, "canonical_contours1");
+ GLADE_HOOKUP_OBJECT (FontView, add_extrema1, "add_extrema1");
+ GLADE_HOOKUP_OBJECT (FontView, image5830, "image5830");
+ GLADE_HOOKUP_OBJECT (FontView, round1, "round1");
+ GLADE_HOOKUP_OBJECT (FontView, round1_menu, "round1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, round_to_int1, "round_to_int1");
+ GLADE_HOOKUP_OBJECT (FontView, to_hundredths1, "to_hundredths1");
+ GLADE_HOOKUP_OBJECT (FontView, cluster1, "cluster1");
+ GLADE_HOOKUP_OBJECT (FontView, autotrace1, "autotrace1");
+ GLADE_HOOKUP_OBJECT (FontView, separator25, "separator25");
+ GLADE_HOOKUP_OBJECT (FontView, correct_direction1, "correct_direction1");
+ GLADE_HOOKUP_OBJECT (FontView, image5831, "image5831");
+ GLADE_HOOKUP_OBJECT (FontView, separator26, "separator26");
+ GLADE_HOOKUP_OBJECT (FontView, build1, "build1");
+ GLADE_HOOKUP_OBJECT (FontView, image5832, "image5832");
+ GLADE_HOOKUP_OBJECT (FontView, build1_menu, "build1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, build_accented_glyph1, "build_accented_glyph1");
+ GLADE_HOOKUP_OBJECT (FontView, image5833, "image5833");
+ GLADE_HOOKUP_OBJECT (FontView, build_composite_glyph1, "build_composite_glyph1");
+ GLADE_HOOKUP_OBJECT (FontView, separator27, "separator27");
+ GLADE_HOOKUP_OBJECT (FontView, merge_fonts1, "merge_fonts1");
+ GLADE_HOOKUP_OBJECT (FontView, interpolate_fonts1, "interpolate_fonts1");
+ GLADE_HOOKUP_OBJECT (FontView, compare_fonts1, "compare_fonts1");
+ GLADE_HOOKUP_OBJECT (FontView, tools3, "tools3");
+ GLADE_HOOKUP_OBJECT (FontView, image5834, "image5834");
+ GLADE_HOOKUP_OBJECT (FontView, hints1, "hints1");
+ GLADE_HOOKUP_OBJECT (FontView, hints1_menu, "hints1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, autohint1, "autohint1");
+ GLADE_HOOKUP_OBJECT (FontView, hint_subsitution_pts1, "hint_subsitution_pts1");
+ GLADE_HOOKUP_OBJECT (FontView, auto_counter_hint1, "auto_counter_hint1");
+ GLADE_HOOKUP_OBJECT (FontView, dont_autohint1, "dont_autohint1");
+ GLADE_HOOKUP_OBJECT (FontView, separator28, "separator28");
+ GLADE_HOOKUP_OBJECT (FontView, autoinstr1, "autoinstr1");
+ GLADE_HOOKUP_OBJECT (FontView, edit_instructions1, "edit_instructions1");
+ GLADE_HOOKUP_OBJECT (FontView, edit_fpgm1, "edit_fpgm1");
+ GLADE_HOOKUP_OBJECT (FontView, edit_prep1, "edit_prep1");
+ GLADE_HOOKUP_OBJECT (FontView, edit_maxp1, "edit_maxp1");
+ GLADE_HOOKUP_OBJECT (FontView, edit_cvt_1, "edit_cvt_1");
+ GLADE_HOOKUP_OBJECT (FontView, private_to_cvt_1, "private_to_cvt_1");
+ GLADE_HOOKUP_OBJECT (FontView, separator30, "separator30");
+ GLADE_HOOKUP_OBJECT (FontView, clear_hints1, "clear_hints1");
+ GLADE_HOOKUP_OBJECT (FontView, clear_instructions1, "clear_instructions1");
+ GLADE_HOOKUP_OBJECT (FontView, separator31, "separator31");
+ GLADE_HOOKUP_OBJECT (FontView, histograms1, "histograms1");
+ GLADE_HOOKUP_OBJECT (FontView, histograms1_menu, "histograms1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, hstem1, "hstem1");
+ GLADE_HOOKUP_OBJECT (FontView, vstem1, "vstem1");
+ GLADE_HOOKUP_OBJECT (FontView, bluevalues1, "bluevalues1");
+ GLADE_HOOKUP_OBJECT (FontView, encoding2, "encoding2");
+ GLADE_HOOKUP_OBJECT (FontView, encoding2_menu, "encoding2_menu");
+ GLADE_HOOKUP_OBJECT (FontView, reencode1, "reencode1");
+ GLADE_HOOKUP_OBJECT (FontView, reencode1_menu, "reencode1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, separator65, "separator65");
+ GLADE_HOOKUP_OBJECT (FontView, compact1, "compact1");
+ GLADE_HOOKUP_OBJECT (FontView, force_encoding1, "force_encoding1");
+ GLADE_HOOKUP_OBJECT (FontView, force_encoding1_menu, "force_encoding1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, separator66, "separator66");
+ GLADE_HOOKUP_OBJECT (FontView, separator64, "separator64");
+ GLADE_HOOKUP_OBJECT (FontView, add_encoding_slots1, "add_encoding_slots1");
+ GLADE_HOOKUP_OBJECT (FontView, remove_unused_slots1, "remove_unused_slots1");
+ GLADE_HOOKUP_OBJECT (FontView, detach_glyphs1, "detach_glyphs1");
+ GLADE_HOOKUP_OBJECT (FontView, detatch___remove_glyphs1, "detatch___remove_glyphs1");
+ GLADE_HOOKUP_OBJECT (FontView, image5835, "image5835");
+ GLADE_HOOKUP_OBJECT (FontView, separator67, "separator67");
+ GLADE_HOOKUP_OBJECT (FontView, add_encoding_name1, "add_encoding_name1");
+ GLADE_HOOKUP_OBJECT (FontView, load_encoding1, "load_encoding1");
+ GLADE_HOOKUP_OBJECT (FontView, make_from_font1, "make_from_font1");
+ GLADE_HOOKUP_OBJECT (FontView, remove_encoding1, "remove_encoding1");
+ GLADE_HOOKUP_OBJECT (FontView, separator68, "separator68");
+ GLADE_HOOKUP_OBJECT (FontView, display_by_groups1, "display_by_groups1");
+ GLADE_HOOKUP_OBJECT (FontView, define_groups1, "define_groups1");
+ GLADE_HOOKUP_OBJECT (FontView, separator87, "separator87");
+ GLADE_HOOKUP_OBJECT (FontView, save_namelist_of_font1, "save_namelist_of_font1");
+ GLADE_HOOKUP_OBJECT (FontView, load_namelist1, "load_namelist1");
+ GLADE_HOOKUP_OBJECT (FontView, rename_glyphs1, "rename_glyphs1");
+ GLADE_HOOKUP_OBJECT (FontView, create_named_glyphs1, "create_named_glyphs1");
+ GLADE_HOOKUP_OBJECT (FontView, view3, "view3");
+ GLADE_HOOKUP_OBJECT (FontView, view3_menu, "view3_menu");
+ GLADE_HOOKUP_OBJECT (FontView, next_glyph1, "next_glyph1");
+ GLADE_HOOKUP_OBJECT (FontView, image5836, "image5836");
+ GLADE_HOOKUP_OBJECT (FontView, prev_glyph1, "prev_glyph1");
+ GLADE_HOOKUP_OBJECT (FontView, image5837, "image5837");
+ GLADE_HOOKUP_OBJECT (FontView, next_defined_glyph1, "next_defined_glyph1");
+ GLADE_HOOKUP_OBJECT (FontView, image5838, "image5838");
+ GLADE_HOOKUP_OBJECT (FontView, prev_defined_glyph1, "prev_defined_glyph1");
+ GLADE_HOOKUP_OBJECT (FontView, image5839, "image5839");
+ GLADE_HOOKUP_OBJECT (FontView, goto1, "goto1");
+ GLADE_HOOKUP_OBJECT (FontView, image5840, "image5840");
+ GLADE_HOOKUP_OBJECT (FontView, separator32, "separator32");
+ GLADE_HOOKUP_OBJECT (FontView, show_att1, "show_att1");
+ GLADE_HOOKUP_OBJECT (FontView, display_substitutions1, "display_substitutions1");
+ GLADE_HOOKUP_OBJECT (FontView, combinations1, "combinations1");
+ GLADE_HOOKUP_OBJECT (FontView, combinations1_menu, "combinations1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, kern_pairs1, "kern_pairs1");
+ GLADE_HOOKUP_OBJECT (FontView, anchor_pairs1, "anchor_pairs1");
+ GLADE_HOOKUP_OBJECT (FontView, anchor_pairs1_menu, "anchor_pairs1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, all2, "all2");
+ GLADE_HOOKUP_OBJECT (FontView, ligatures2, "ligatures2");
+ GLADE_HOOKUP_OBJECT (FontView, separator33, "separator33");
+ GLADE_HOOKUP_OBJECT (FontView, label_glyph_by1, "label_glyph_by1");
+ GLADE_HOOKUP_OBJECT (FontView, label_glyph_by1_menu, "label_glyph_by1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, glyph_image1, "glyph_image1");
+ GLADE_HOOKUP_OBJECT (FontView, glyph_name1, "glyph_name1");
+ GLADE_HOOKUP_OBJECT (FontView, unicode1, "unicode1");
+ GLADE_HOOKUP_OBJECT (FontView, encoding1, "encoding1");
+ GLADE_HOOKUP_OBJECT (FontView, separator62, "separator62");
+ GLADE_HOOKUP_OBJECT (FontView, show_h_metrics1, "show_h_metrics1");
+ GLADE_HOOKUP_OBJECT (FontView, show_v_metrics1, "show_v_metrics1");
+ GLADE_HOOKUP_OBJECT (FontView, separator34, "separator34");
+ GLADE_HOOKUP_OBJECT (FontView, _32x8_cell_window1, "_32x8_cell_window1");
+ GLADE_HOOKUP_OBJECT (FontView, _16x4_cell_window1, "_16x4_cell_window1");
+ GLADE_HOOKUP_OBJECT (FontView, _8x2_cell_window1, "_8x2_cell_window1");
+ GLADE_HOOKUP_OBJECT (FontView, separator85, "separator85");
+ GLADE_HOOKUP_OBJECT (FontView, _24_pixel_outline1, "_24_pixel_outline1");
+ GLADE_HOOKUP_OBJECT (FontView, _36_pixel_outline1, "_36_pixel_outline1");
+ GLADE_HOOKUP_OBJECT (FontView, _48_pixel_outline1, "_48_pixel_outline1");
+ GLADE_HOOKUP_OBJECT (FontView, _72_pixel_outline1, "_72_pixel_outline1");
+ GLADE_HOOKUP_OBJECT (FontView, _96_pixel_outline1, "_96_pixel_outline1");
+ GLADE_HOOKUP_OBJECT (FontView, separator35, "separator35");
+ GLADE_HOOKUP_OBJECT (FontView, anti_alias1, "anti_alias1");
+ GLADE_HOOKUP_OBJECT (FontView, fit_to_em1, "fit_to_em1");
+ GLADE_HOOKUP_OBJECT (FontView, separator89, "separator89");
+ GLADE_HOOKUP_OBJECT (FontView, bitmap_magnification1, "bitmap_magnification1");
+ GLADE_HOOKUP_OBJECT (FontView, metrics1, "metrics1");
+ GLADE_HOOKUP_OBJECT (FontView, metrics1_menu, "metrics1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, center_in_width1, "center_in_width1");
+ GLADE_HOOKUP_OBJECT (FontView, thirds_in_width1, "thirds_in_width1");
+ GLADE_HOOKUP_OBJECT (FontView, set_width1, "set_width1");
+ GLADE_HOOKUP_OBJECT (FontView, set_lbearing1, "set_lbearing1");
+ GLADE_HOOKUP_OBJECT (FontView, set_rbearing1, "set_rbearing1");
+ GLADE_HOOKUP_OBJECT (FontView, set_vertical_advance1, "set_vertical_advance1");
+ GLADE_HOOKUP_OBJECT (FontView, separator36, "separator36");
+ GLADE_HOOKUP_OBJECT (FontView, auto_width1, "auto_width1");
+ GLADE_HOOKUP_OBJECT (FontView, auto_kern1, "auto_kern1");
+ GLADE_HOOKUP_OBJECT (FontView, kern_by_classes1, "kern_by_classes1");
+ GLADE_HOOKUP_OBJECT (FontView, remove_all_kern_pairs1, "remove_all_kern_pairs1");
+ GLADE_HOOKUP_OBJECT (FontView, kern_pair_closeup1, "kern_pair_closeup1");
+ GLADE_HOOKUP_OBJECT (FontView, separator37, "separator37");
+ GLADE_HOOKUP_OBJECT (FontView, vkern_by_classes1, "vkern_by_classes1");
+ GLADE_HOOKUP_OBJECT (FontView, vkern_from_hkern1, "vkern_from_hkern1");
+ GLADE_HOOKUP_OBJECT (FontView, remove_all_vkern_pairs1, "remove_all_vkern_pairs1");
+ GLADE_HOOKUP_OBJECT (FontView, cid1, "cid1");
+ GLADE_HOOKUP_OBJECT (FontView, cid1_menu, "cid1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, convert_to_cid1, "convert_to_cid1");
+ GLADE_HOOKUP_OBJECT (FontView, convert_by_cmap1, "convert_by_cmap1");
+ GLADE_HOOKUP_OBJECT (FontView, separator38, "separator38");
+ GLADE_HOOKUP_OBJECT (FontView, flatten1, "flatten1");
+ GLADE_HOOKUP_OBJECT (FontView, flatten_by_cmap1, "flatten_by_cmap1");
+ GLADE_HOOKUP_OBJECT (FontView, separator69, "separator69");
+ GLADE_HOOKUP_OBJECT (FontView, insert_font1, "insert_font1");
+ GLADE_HOOKUP_OBJECT (FontView, insert_empty_font1, "insert_empty_font1");
+ GLADE_HOOKUP_OBJECT (FontView, remove_font1, "remove_font1");
+ GLADE_HOOKUP_OBJECT (FontView, separator70, "separator70");
+ GLADE_HOOKUP_OBJECT (FontView, change_supplement1, "change_supplement1");
+ GLADE_HOOKUP_OBJECT (FontView, cid_font_info1, "cid_font_info1");
+ GLADE_HOOKUP_OBJECT (FontView, image5841, "image5841");
+ GLADE_HOOKUP_OBJECT (FontView, mm1, "mm1");
+ GLADE_HOOKUP_OBJECT (FontView, mm1_menu, "mm1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, create_mm1, "create_mm1");
+ GLADE_HOOKUP_OBJECT (FontView, image5842, "image5842");
+ GLADE_HOOKUP_OBJECT (FontView, separator39, "separator39");
+ GLADE_HOOKUP_OBJECT (FontView, mm_validity_check1, "mm_validity_check1");
+ GLADE_HOOKUP_OBJECT (FontView, mm_info1, "mm_info1");
+ GLADE_HOOKUP_OBJECT (FontView, image5843, "image5843");
+ GLADE_HOOKUP_OBJECT (FontView, blend_to_new_font1, "blend_to_new_font1");
+ GLADE_HOOKUP_OBJECT (FontView, mm_change_def_weights1, "mm_change_def_weights1");
+ GLADE_HOOKUP_OBJECT (FontView, window1, "window1");
+ GLADE_HOOKUP_OBJECT (FontView, window1_menu, "window1_menu");
+ GLADE_HOOKUP_OBJECT (FontView, open_outline_window1, "open_outline_window1");
+ GLADE_HOOKUP_OBJECT (FontView, open_bitmap_window1, "open_bitmap_window1");
+ GLADE_HOOKUP_OBJECT (FontView, open_metrics_window1, "open_metrics_window1");
+ GLADE_HOOKUP_OBJECT (FontView, separator71, "separator71");
+ GLADE_HOOKUP_OBJECT (FontView, warnings1, "warnings1");
+ GLADE_HOOKUP_OBJECT (FontView, image5844, "image5844");
+ GLADE_HOOKUP_OBJECT (FontView, separator3, "separator3");
+ GLADE_HOOKUP_OBJECT (FontView, help4, "help4");
+ GLADE_HOOKUP_OBJECT (FontView, help4_menu, "help4_menu");
+ GLADE_HOOKUP_OBJECT (FontView, help1, "help1");
+ GLADE_HOOKUP_OBJECT (FontView, image5845, "image5845");
+ GLADE_HOOKUP_OBJECT (FontView, overview1, "overview1");
+ GLADE_HOOKUP_OBJECT (FontView, index1, "index1");
+ GLADE_HOOKUP_OBJECT (FontView, image5846, "image5846");
+ GLADE_HOOKUP_OBJECT (FontView, about1, "about1");
+ GLADE_HOOKUP_OBJECT (FontView, image5847, "image5847");
+ GLADE_HOOKUP_OBJECT (FontView, license1, "license1");
+ GLADE_HOOKUP_OBJECT (FontView, status, "status");
+ GLADE_HOOKUP_OBJECT (FontView, hbox5, "hbox5");
+ GLADE_HOOKUP_OBJECT (FontView, view, "view");
+ GLADE_HOOKUP_OBJECT (FontView, vscrollbar2, "vscrollbar2");
+ GLADE_HOOKUP_OBJECT_NO_REF (FontView, tooltips, "tooltips");
+
+ gtk_window_add_accel_group (GTK_WINDOW (FontView), accel_group);
+
+ return FontView;
+}
+
+GtkWidget*
+create_FontForgeSplash (void)
+{
+ GtkWidget *FontForgeSplash;
+ GdkPixbuf *FontForgeSplash_icon_pixbuf;
+ GtkWidget *vbox7;
+ GtkWidget *vbox11;
+ GtkWidget *ffsplash1;
+ GtkWidget *ffsplash2;
+ GtkWidget *ffsplash3;
+ GtkWidget *Notices;
+ GtkWidget *Dedication;
+ GtkWidget *hseparator1;
+ GtkWidget *Version;
+ GtkWidget *LibVersion;
+
+ FontForgeSplash = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (FontForgeSplash, "FontForgeSplash");
+ gtk_widget_set_events (FontForgeSplash, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
+ gtk_window_set_title (GTK_WINDOW (FontForgeSplash), _("FontForge"));
+ gtk_window_set_position (GTK_WINDOW (FontForgeSplash), GTK_WIN_POS_CENTER);
+ FontForgeSplash_icon_pixbuf = create_pixbuf ("logo.xbm");
+ if (FontForgeSplash_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (FontForgeSplash), FontForgeSplash_icon_pixbuf);
+ gdk_pixbuf_unref (FontForgeSplash_icon_pixbuf);
+ }
+
+ vbox7 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox7, "vbox7");
+ gtk_widget_show (vbox7);
+ gtk_container_add (GTK_CONTAINER (FontForgeSplash), vbox7);
+
+ vbox11 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox11, "vbox11");
+ gtk_widget_show (vbox11);
+ gtk_box_pack_start (GTK_BOX (vbox7), vbox11, TRUE, TRUE, 0);
+
+ ffsplash1 = create_pixmap (FontForgeSplash, "ffsplash1.png");
+ gtk_widget_set_name (ffsplash1, "ffsplash1");
+ gtk_widget_show (ffsplash1);
+ gtk_box_pack_start (GTK_BOX (vbox11), ffsplash1, TRUE, TRUE, 0);
+
+ ffsplash2 = create_pixmap (FontForgeSplash, "ffsplash2.png");
+ gtk_widget_set_name (ffsplash2, "ffsplash2");
+ gtk_widget_show (ffsplash2);
+ gtk_box_pack_start (GTK_BOX (vbox11), ffsplash2, TRUE, TRUE, 0);
+
+ ffsplash3 = create_pixmap (FontForgeSplash, "ffsplash3.png");
+ gtk_widget_set_name (ffsplash3, "ffsplash3");
+ gtk_widget_show (ffsplash3);
+ gtk_box_pack_start (GTK_BOX (vbox11), ffsplash3, TRUE, TRUE, 0);
+
+ Notices = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (Notices, "Notices");
+ gtk_widget_show (Notices);
+ gtk_box_pack_start (GTK_BOX (vbox7), Notices, FALSE, FALSE, 0);
+
+ Dedication = gtk_label_new (_("<span face=\"serif\">When my father finished his book on Renaissance printing (<i>The Craft of Printing and the Publication of Shakespeare's Works</i>) he told me that I would have to write the chapter on computer typography. This is my attempt to do so.</span>"));
+ gtk_widget_set_name (Dedication, "Dedication");
+ gtk_widget_show (Dedication);
+ gtk_box_pack_start (GTK_BOX (Notices), Dedication, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (Dedication, 379, -1);
+ gtk_label_set_use_markup (GTK_LABEL (Dedication), TRUE);
+ gtk_label_set_line_wrap (GTK_LABEL (Dedication), TRUE);
+
+ hseparator1 = gtk_hseparator_new ();
+ gtk_widget_set_name (hseparator1, "hseparator1");
+ gtk_widget_show (hseparator1);
+ gtk_box_pack_start (GTK_BOX (Notices), hseparator1, FALSE, FALSE, 0);
+
+ Version = gtk_label_new (_("Version"));
+ gtk_widget_set_name (Version, "Version");
+ gtk_widget_show (Version);
+ gtk_box_pack_start (GTK_BOX (Notices), Version, FALSE, FALSE, 0);
+ GTK_WIDGET_SET_FLAGS (Version, GTK_CAN_FOCUS);
+ gtk_label_set_selectable (GTK_LABEL (Version), TRUE);
+
+ LibVersion = gtk_label_new (_("Library Version"));
+ gtk_widget_set_name (LibVersion, "LibVersion");
+ gtk_widget_show (LibVersion);
+ gtk_box_pack_start (GTK_BOX (Notices), LibVersion, FALSE, FALSE, 0);
+ gtk_label_set_justify (GTK_LABEL (LibVersion), GTK_JUSTIFY_CENTER);
+
+ g_signal_connect ((gpointer) FontForgeSplash, "button_press_event",
+ G_CALLBACK (SplashDismiss),
+ NULL);
+ g_signal_connect ((gpointer) FontForgeSplash, "delete_event",
+ G_CALLBACK (SplashDismiss),
+ NULL);
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (FontForgeSplash, FontForgeSplash, "FontForgeSplash");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, vbox7, "vbox7");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, vbox11, "vbox11");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, ffsplash1, "ffsplash1");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, ffsplash2, "ffsplash2");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, ffsplash3, "ffsplash3");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, Notices, "Notices");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, Dedication, "Dedication");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, hseparator1, "hseparator1");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, Version, "Version");
+ GLADE_HOOKUP_OBJECT (FontForgeSplash, LibVersion, "LibVersion");
+
+ return FontForgeSplash;
+}
+
+GtkWidget*
+create_FontViewShowMetrics (void)
+{
+ GtkWidget *FontViewShowMetrics;
+ GtkWidget *vbox10;
+ GtkWidget *hbuttonbox1;
+
+ FontViewShowMetrics = gtk_dialog_new ();
+ gtk_widget_set_name (FontViewShowMetrics, "FontViewShowMetrics");
+
+ vbox10 = GTK_DIALOG (FontViewShowMetrics)->vbox;
+ gtk_widget_set_name (vbox10, "vbox10");
+ gtk_widget_show (vbox10);
+
+ hbuttonbox1 = GTK_DIALOG (FontViewShowMetrics)->action_area;
+ gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
+ gtk_widget_show (hbuttonbox1);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END);
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (FontViewShowMetrics, FontViewShowMetrics, "FontViewShowMetrics");
+ GLADE_HOOKUP_OBJECT_NO_REF (FontViewShowMetrics, vbox10, "vbox10");
+ GLADE_HOOKUP_OBJECT_NO_REF (FontViewShowMetrics, hbuttonbox1, "hbuttonbox1");
+
+ return FontViewShowMetrics;
+}
+
+GtkWidget*
+create_FontViewPopupMenu (void)
+{
+ GtkWidget *FontViewPopupMenu;
+ GtkWidget *cut3;
+ GtkWidget *copy3;
+ GtkWidget *copy_reference2;
+ GtkWidget *image5419;
+ GtkWidget *copy_width2;
+ GtkWidget *image5420;
+ GtkWidget *paste3;
+ GtkWidget *clear3;
+ GtkWidget *copy_fg_to_bg2;
+ GtkWidget *image5421;
+ GtkWidget *unlink_reference2;
+ GtkWidget *image5422;
+ GtkWidget *separator90;
+ GtkWidget *char_info1;
+ GtkWidget *image5423;
+ GtkWidget *transform2;
+ GtkWidget *image5424;
+ GtkWidget *expand_stroke2;
+ GtkWidget *image5425;
+ GtkWidget *round_to_int2;
+ GtkWidget *correct_direction2;
+ GtkWidget *image5426;
+ GtkWidget *separator91;
+ GtkWidget *auto_hint1;
+ GtkWidget *center_in_width2;
+ GtkWidget *set_width2;
+ GtkAccelGroup *accel_group;
+
+ accel_group = gtk_accel_group_new ();
+
+ FontViewPopupMenu = gtk_menu_new ();
+ gtk_widget_set_name (FontViewPopupMenu, "FontViewPopupMenu");
+
+ cut3 = gtk_image_menu_item_new_from_stock ("gtk-cut", accel_group);
+ gtk_widget_set_name (cut3, "cut3");
+ gtk_widget_show (cut3);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), cut3);
+
+ copy3 = gtk_image_menu_item_new_from_stock ("gtk-copy", accel_group);
+ gtk_widget_set_name (copy3, "copy3");
+ gtk_widget_show (copy3);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), copy3);
+
+ copy_reference2 = gtk_image_menu_item_new_with_mnemonic (_("C_opy Reference"));
+ gtk_widget_set_name (copy_reference2, "copy_reference2");
+ gtk_widget_show (copy_reference2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), copy_reference2);
+
+ image5419 = create_pixmap (FontViewPopupMenu, "editcopyref.png");
+ gtk_widget_set_name (image5419, "image5419");
+ gtk_widget_show (image5419);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_reference2), image5419);
+
+ copy_width2 = gtk_image_menu_item_new_with_mnemonic (_("Copy _Width"));
+ gtk_widget_set_name (copy_width2, "copy_width2");
+ gtk_widget_show (copy_width2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), copy_width2);
+
+ image5420 = create_pixmap (FontViewPopupMenu, "editcopywidth.png");
+ gtk_widget_set_name (image5420, "image5420");
+ gtk_widget_show (image5420);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_width2), image5420);
+
+ paste3 = gtk_image_menu_item_new_from_stock ("gtk-paste", accel_group);
+ gtk_widget_set_name (paste3, "paste3");
+ gtk_widget_show (paste3);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), paste3);
+
+ clear3 = gtk_image_menu_item_new_from_stock ("gtk-clear", accel_group);
+ gtk_widget_set_name (clear3, "clear3");
+ gtk_widget_show (clear3);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), clear3);
+
+ copy_fg_to_bg2 = gtk_image_menu_item_new_with_mnemonic (_("Copy _Fg to Bg"));
+ gtk_widget_set_name (copy_fg_to_bg2, "copy_fg_to_bg2");
+ gtk_widget_show (copy_fg_to_bg2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), copy_fg_to_bg2);
+
+ image5421 = create_pixmap (FontViewPopupMenu, "editcopyfg2bg.png");
+ gtk_widget_set_name (image5421, "image5421");
+ gtk_widget_show (image5421);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_fg_to_bg2), image5421);
+
+ unlink_reference2 = gtk_image_menu_item_new_with_mnemonic (_("Unlin_k Reference"));
+ gtk_widget_set_name (unlink_reference2, "unlink_reference2");
+ gtk_widget_show (unlink_reference2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), unlink_reference2);
+
+ image5422 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5422, "image5422");
+ gtk_widget_show (image5422);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (unlink_reference2), image5422);
+
+ separator90 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator90, "separator90");
+ gtk_widget_show (separator90);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), separator90);
+ gtk_widget_set_sensitive (separator90, FALSE);
+
+ char_info1 = gtk_image_menu_item_new_with_mnemonic (_("Glyph _Info..."));
+ gtk_widget_set_name (char_info1, "char_info1");
+ gtk_widget_show (char_info1);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), char_info1);
+
+ image5423 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image5423, "image5423");
+ gtk_widget_show (image5423);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (char_info1), image5423);
+
+ transform2 = gtk_image_menu_item_new_with_mnemonic (_("_Transform..."));
+ gtk_widget_set_name (transform2, "transform2");
+ gtk_widget_show (transform2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), transform2);
+
+ image5424 = create_pixmap (FontViewPopupMenu, "elementtransform.png");
+ gtk_widget_set_name (image5424, "image5424");
+ gtk_widget_show (image5424);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (transform2), image5424);
+
+ expand_stroke2 = gtk_image_menu_item_new_with_mnemonic (_("_Expand Stroke..."));
+ gtk_widget_set_name (expand_stroke2, "expand_stroke2");
+ gtk_widget_show (expand_stroke2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), expand_stroke2);
+
+ image5425 = create_pixmap (FontViewPopupMenu, "elementexpandstroke.png");
+ gtk_widget_set_name (image5425, "image5425");
+ gtk_widget_show (image5425);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (expand_stroke2), image5425);
+
+ round_to_int2 = gtk_menu_item_new_with_mnemonic (_("Round to _Int"));
+ gtk_widget_set_name (round_to_int2, "round_to_int2");
+ gtk_widget_show (round_to_int2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), round_to_int2);
+
+ correct_direction2 = gtk_image_menu_item_new_with_mnemonic (_("Correct _Direction"));
+ gtk_widget_set_name (correct_direction2, "correct_direction2");
+ gtk_widget_show (correct_direction2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), correct_direction2);
+
+ image5426 = create_pixmap (FontViewPopupMenu, "elementcorrectdir.png");
+ gtk_widget_set_name (image5426, "image5426");
+ gtk_widget_show (image5426);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (correct_direction2), image5426);
+
+ separator91 = gtk_menu_item_new ();
+ gtk_widget_set_name (separator91, "separator91");
+ gtk_widget_show (separator91);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), separator91);
+ gtk_widget_set_sensitive (separator91, FALSE);
+
+ auto_hint1 = gtk_menu_item_new_with_mnemonic (_("Auto _Hint"));
+ gtk_widget_set_name (auto_hint1, "auto_hint1");
+ gtk_widget_show (auto_hint1);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), auto_hint1);
+
+ center_in_width2 = gtk_menu_item_new_with_mnemonic (_("Center in Width"));
+ gtk_widget_set_name (center_in_width2, "center_in_width2");
+ gtk_widget_show (center_in_width2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), center_in_width2);
+
+ set_width2 = gtk_menu_item_new_with_mnemonic (_("Set _Width"));
+ gtk_widget_set_name (set_width2, "set_width2");
+ gtk_widget_show (set_width2);
+ gtk_container_add (GTK_CONTAINER (FontViewPopupMenu), set_width2);
+
+ g_signal_connect ((gpointer) cut3, "activate",
+ G_CALLBACK (FontViewMenu_Cut),
+ NULL);
+ g_signal_connect ((gpointer) copy3, "activate",
+ G_CALLBACK (FontViewMenu_Copy),
+ NULL);
+ g_signal_connect ((gpointer) copy_reference2, "activate",
+ G_CALLBACK (FontViewMenu_CopyRef),
+ NULL);
+ g_signal_connect ((gpointer) copy_width2, "activate",
+ G_CALLBACK (FontViewMenu_CopyWidth),
+ NULL);
+ g_signal_connect ((gpointer) paste3, "activate",
+ G_CALLBACK (FontViewMenu_Paste),
+ NULL);
+ g_signal_connect ((gpointer) clear3, "activate",
+ G_CALLBACK (FontViewMenu_Clear),
+ NULL);
+ g_signal_connect ((gpointer) copy_fg_to_bg2, "activate",
+ G_CALLBACK (FontViewMenu_CopyFg2Bg),
+ NULL);
+ g_signal_connect ((gpointer) unlink_reference2, "activate",
+ G_CALLBACK (FontViewMenu_UnlinkRef),
+ NULL);
+ g_signal_connect ((gpointer) char_info1, "activate",
+ G_CALLBACK (FontViewMenu_CharInfo),
+ NULL);
+ g_signal_connect ((gpointer) transform2, "activate",
+ G_CALLBACK (FontViewMenu_Transform),
+ NULL);
+ g_signal_connect ((gpointer) expand_stroke2, "activate",
+ G_CALLBACK (FontViewMenu_ExpandStroke),
+ NULL);
+ g_signal_connect ((gpointer) round_to_int2, "activate",
+ G_CALLBACK (FontViewMenu_RoundToInt),
+ NULL);
+ g_signal_connect ((gpointer) correct_direction2, "activate",
+ G_CALLBACK (FontViewMenu_CorrectDir),
+ NULL);
+ g_signal_connect ((gpointer) auto_hint1, "activate",
+ G_CALLBACK (FontViewMenu_AutoHint),
+ NULL);
+ g_signal_connect ((gpointer) center_in_width2, "activate",
+ G_CALLBACK (FontViewMenu_CenterWidth),
+ NULL);
+ g_signal_connect ((gpointer) set_width2, "activate",
+ G_CALLBACK (FontViewMenu_SetWidth),
+ NULL);
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (FontViewPopupMenu, FontViewPopupMenu, "FontViewPopupMenu");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, cut3, "cut3");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, copy3, "copy3");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, copy_reference2, "copy_reference2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5419, "image5419");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, copy_width2, "copy_width2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5420, "image5420");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, paste3, "paste3");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, clear3, "clear3");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, copy_fg_to_bg2, "copy_fg_to_bg2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5421, "image5421");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, unlink_reference2, "unlink_reference2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5422, "image5422");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, separator90, "separator90");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, char_info1, "char_info1");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5423, "image5423");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, transform2, "transform2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5424, "image5424");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, expand_stroke2, "expand_stroke2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5425, "image5425");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, round_to_int2, "round_to_int2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, correct_direction2, "correct_direction2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, image5426, "image5426");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, separator91, "separator91");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, auto_hint1, "auto_hint1");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, center_in_width2, "center_in_width2");
+ GLADE_HOOKUP_OBJECT (FontViewPopupMenu, set_width2, "set_width2");
+
+ gtk_menu_set_accel_group (GTK_MENU (FontViewPopupMenu), accel_group);
+
+ return FontViewPopupMenu;
+}
+
diff --git a/gtkui/fontforge.glade b/gtkui/fontforge.glade
index 6eb4e8f0..caebdbf5 100644
--- a/gtkui/fontforge.glade
+++ b/gtkui/fontforge.glade
@@ -17,6 +17,8 @@
<signal name="delete_event" handler="FontView_RequestClose" last_modification_time="Sun, 13 Jun 2004 03:33:55 GMT"/>
<signal name="destroy_event" handler="FontView_DestroyWindow" last_modification_time="Tue, 25 Dec 2007 20:55:36 GMT"/>
<signal name="configure_event" handler="FontView_Resize" last_modification_time="Wed, 26 Dec 2007 20:33:41 GMT"/>
+ <signal name="selection_clear_event" handler="FontView_ClearSelection" last_modification_time="Fri, 28 Dec 2007 05:23:04 GMT"/>
+ <signal name="realize" handler="FontView_Realize" last_modification_time="Sat, 29 Dec 2007 04:11:09 GMT"/>
<child>
<widget class="GtkVBox" id="vbox1">
@@ -50,7 +52,7 @@
<accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4319">
+ <widget class="GtkImage" id="image5931">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
@@ -72,7 +74,7 @@
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4320">
+ <widget class="GtkImage" id="image5932">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
@@ -114,7 +116,7 @@
<accelerator key="Q" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4321">
+ <widget class="GtkImage" id="image5933">
<property name="visible">True</property>
<property name="stock">gtk-close</property>
<property name="icon_size">1</property>
@@ -142,7 +144,7 @@
<accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4322">
+ <widget class="GtkImage" id="image5934">
<property name="visible">True</property>
<property name="stock">gtk-save</property>
<property name="icon_size">1</property>
@@ -164,7 +166,7 @@
<accelerator key="S" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4323">
+ <widget class="GtkImage" id="image5935">
<property name="visible">True</property>
<property name="stock">gtk-save-as</property>
<property name="icon_size">1</property>
@@ -186,7 +188,7 @@
<accelerator key="S" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4324">
+ <widget class="GtkImage" id="image5936">
<property name="visible">True</property>
<property name="stock">gtk-save</property>
<property name="icon_size">1</property>
@@ -208,7 +210,7 @@
<accelerator key="G" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4325">
+ <widget class="GtkImage" id="image5937">
<property name="visible">True</property>
<property name="pixbuf">filegenerate.png</property>
<property name="xalign">0.5</property>
@@ -229,7 +231,7 @@
<accelerator key="G" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4326">
+ <widget class="GtkImage" id="image5938">
<property name="visible">True</property>
<property name="pixbuf">filegeneratefamily.png</property>
<property name="xalign">0.5</property>
@@ -256,7 +258,7 @@
<accelerator key="I" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4327">
+ <widget class="GtkImage" id="image5939">
<property name="visible">True</property>
<property name="pixbuf">fileimport.png</property>
<property name="xalign">0.5</property>
@@ -287,7 +289,7 @@
<accelerator key="R" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4328">
+ <widget class="GtkImage" id="image5940">
<property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property>
@@ -308,7 +310,7 @@
<signal name="activate" handler="FontViewMenu_RevertToBackup" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4329">
+ <widget class="GtkImage" id="image5941">
<property name="visible">True</property>
<property name="stock">gtk-go-back</property>
<property name="icon_size">1</property>
@@ -330,7 +332,7 @@
<accelerator key="R" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4330">
+ <widget class="GtkImage" id="image5942">
<property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property>
@@ -358,7 +360,7 @@
<accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4331">
+ <widget class="GtkImage" id="image5943">
<property name="visible">True</property>
<property name="stock">gtk-print</property>
<property name="icon_size">1</property>
@@ -385,7 +387,7 @@
<signal name="activate" handler="FontViewMenu_ExecScript" last_modification_time="Tue, 11 May 2004 18:00:24 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4332">
+ <widget class="GtkImage" id="image5944">
<property name="visible">True</property>
<property name="stock">gtk-execute</property>
<property name="icon_size">1</property>
@@ -432,7 +434,7 @@
<signal name="activate" handler="Menu_Preferences" last_modification_time="Tue, 11 May 2004 18:00:24 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4333">
+ <widget class="GtkImage" id="image5945">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@@ -460,7 +462,7 @@
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4334">
+ <widget class="GtkImage" id="image5946">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
@@ -496,7 +498,7 @@
<accelerator key="Z" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4335">
+ <widget class="GtkImage" id="image5947">
<property name="visible">True</property>
<property name="stock">gtk-undo</property>
<property name="icon_size">1</property>
@@ -518,7 +520,7 @@
<accelerator key="Y" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4336">
+ <widget class="GtkImage" id="image5948">
<property name="visible">True</property>
<property name="stock">gtk-redo</property>
<property name="icon_size">1</property>
@@ -546,7 +548,7 @@
<accelerator key="X" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4337">
+ <widget class="GtkImage" id="image5949">
<property name="visible">True</property>
<property name="stock">gtk-cut</property>
<property name="icon_size">1</property>
@@ -568,7 +570,7 @@
<accelerator key="C" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4338">
+ <widget class="GtkImage" id="image5950">
<property name="visible">True</property>
<property name="stock">gtk-copy</property>
<property name="icon_size">1</property>
@@ -590,7 +592,7 @@
<accelerator key="G" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4339">
+ <widget class="GtkImage" id="image5951">
<property name="visible">True</property>
<property name="pixbuf">editcopyref.png</property>
<property name="xalign">0.5</property>
@@ -620,7 +622,7 @@
<accelerator key="W" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4340">
+ <widget class="GtkImage" id="image5952">
<property name="visible">True</property>
<property name="pixbuf">editcopywidth.png</property>
<property name="xalign">0.5</property>
@@ -640,7 +642,7 @@
<signal name="activate" handler="FontViewMenu_CopyVWidth" last_modification_time="Tue, 11 May 2004 18:00:24 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4341">
+ <widget class="GtkImage" id="image5953">
<property name="visible">True</property>
<property name="pixbuf">editcopyvwidth.png</property>
<property name="xalign">0.5</property>
@@ -660,7 +662,7 @@
<signal name="activate" handler="FontViewMenu_CopyLBearing" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4342">
+ <widget class="GtkImage" id="image5954">
<property name="visible">True</property>
<property name="pixbuf">editcopylbearing.png</property>
<property name="xalign">0.5</property>
@@ -680,7 +682,7 @@
<signal name="activate" handler="FontViewMenu_CopyRBearing" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4343">
+ <widget class="GtkImage" id="image5955">
<property name="visible">True</property>
<property name="pixbuf">editcopyrbearing.png</property>
<property name="xalign">0.5</property>
@@ -701,7 +703,7 @@
<accelerator key="V" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4344">
+ <widget class="GtkImage" id="image5956">
<property name="visible">True</property>
<property name="stock">gtk-paste</property>
<property name="icon_size">1</property>
@@ -723,7 +725,7 @@
<accelerator key="V" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4345">
+ <widget class="GtkImage" id="image5957">
<property name="visible">True</property>
<property name="stock">gtk-paste</property>
<property name="icon_size">1</property>
@@ -745,7 +747,7 @@
<accelerator key="V" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4346">
+ <widget class="GtkImage" id="image5958">
<property name="visible">True</property>
<property name="stock">gtk-paste</property>
<property name="icon_size">1</property>
@@ -776,7 +778,7 @@
<accelerator key="Delete" modifiers="0" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4347">
+ <widget class="GtkImage" id="image5959">
<property name="visible">True</property>
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
@@ -797,7 +799,7 @@
<signal name="activate" handler="FontViewMenu_ClearBackground" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4348">
+ <widget class="GtkImage" id="image5960">
<property name="visible">True</property>
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
@@ -818,7 +820,7 @@
<signal name="activate" handler="FontViewMenu_CopyFg2Bg" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4349">
+ <widget class="GtkImage" id="image5961">
<property name="visible">True</property>
<property name="pixbuf">editcopyfg2bg.png</property>
<property name="xalign">0.5</property>
@@ -902,7 +904,7 @@
<signal name="activate" handler="FontViewMenu_SelectDefault" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4350">
+ <widget class="GtkImage" id="image5962">
<property name="visible">True</property>
<property name="pixbuf">selectdefault.png</property>
<property name="xalign">0.5</property>
@@ -922,7 +924,7 @@
<signal name="activate" handler="FontViewMenu_SelectWhite" last_modification_time="Tue, 11 May 2004 18:39:43 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4351">
+ <widget class="GtkImage" id="image5963">
<property name="visible">True</property>
<property name="pixbuf">selectwhite.png</property>
<property name="xalign">0.5</property>
@@ -942,7 +944,7 @@
<signal name="activate" handler="FontViewMenu_SelectRed" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4352">
+ <widget class="GtkImage" id="image5964">
<property name="visible">True</property>
<property name="pixbuf">selectred.png</property>
<property name="xalign">0.5</property>
@@ -962,7 +964,7 @@
<signal name="activate" handler="FontViewMenu_SelectGreen" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4353">
+ <widget class="GtkImage" id="image5965">
<property name="visible">True</property>
<property name="pixbuf">selectgreen.png</property>
<property name="xalign">0.5</property>
@@ -982,7 +984,7 @@
<signal name="activate" handler="FontViewMenu_SelectBlue" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4354">
+ <widget class="GtkImage" id="image5966">
<property name="visible">True</property>
<property name="pixbuf">selectblue.png</property>
<property name="xalign">0.5</property>
@@ -1002,7 +1004,7 @@
<signal name="activate" handler="FontViewMenu_SelectYellow" last_modification_time="Tue, 11 May 2004 18:39:43 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4355">
+ <widget class="GtkImage" id="image5967">
<property name="visible">True</property>
<property name="pixbuf">selectyellow.png</property>
<property name="xalign">0.5</property>
@@ -1022,7 +1024,7 @@
<signal name="activate" handler="FontViewMenu_SelectCyan" last_modification_time="Tue, 11 May 2004 18:39:43 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4356">
+ <widget class="GtkImage" id="image5968">
<property name="visible">True</property>
<property name="pixbuf">selectcyan.png</property>
<property name="xalign">0.5</property>
@@ -1042,7 +1044,7 @@
<signal name="activate" handler="FontViewMenu_SelectMagenta" last_modification_time="Tue, 11 May 2004 18:39:43 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4357">
+ <widget class="GtkImage" id="image5969">
<property name="visible">True</property>
<property name="pixbuf">selectmagenta.png</property>
<property name="xalign">0.5</property>
@@ -1062,7 +1064,7 @@
<signal name="activate" handler="FontViewMenu_SelectColorPicker" last_modification_time="Tue, 11 May 2004 18:39:43 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4358">
+ <widget class="GtkImage" id="image5970">
<property name="visible">True</property>
<property name="stock">gtk-select-color</property>
<property name="icon_size">1</property>
@@ -1080,6 +1082,24 @@
</child>
<child>
+ <widget class="GtkMenuItem" id="select_by_wildcard1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Select by _Wildcard</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_SelectByName" last_modification_time="Fri, 28 Dec 2007 16:26:56 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="select_by_script1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Select by _Script</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_SelectByScript" last_modification_time="Fri, 28 Dec 2007 16:26:56 GMT"/>
+ </widget>
+ </child>
+
+ <child>
<widget class="GtkMenuItem" id="separator11">
<property name="visible">True</property>
</widget>
@@ -1149,7 +1169,7 @@
<accelerator key="F" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4359">
+ <widget class="GtkImage" id="image5971">
<property name="visible">True</property>
<property name="stock">gtk-find-and-replace</property>
<property name="icon_size">1</property>
@@ -1187,7 +1207,7 @@
<accelerator key="U" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4360">
+ <widget class="GtkImage" id="image5972">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon_size">1</property>
@@ -1286,7 +1306,7 @@
<signal name="activate" handler="FontViewMenu_RemoveUndoes" last_modification_time="Tue, 11 May 2004 18:35:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4361">
+ <widget class="GtkImage" id="image5973">
<property name="visible">True</property>
<property name="stock">gtk-delete</property>
<property name="icon_size">1</property>
@@ -1322,7 +1342,7 @@
<accelerator key="F" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4362">
+ <widget class="GtkImage" id="image5974">
<property name="visible">True</property>
<property name="stock">gtk-select-font</property>
<property name="icon_size">1</property>
@@ -1344,7 +1364,7 @@
<accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4363">
+ <widget class="GtkImage" id="image5975">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_size">1</property>
@@ -1374,7 +1394,7 @@
<signal name="activate" handler="FontViewMenu_MathInfo" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4364">
+ <widget class="GtkImage" id="image5976">
<property name="visible">True</property>
<property name="pixbuf">elementmathinfo.png</property>
<property name="xalign">0.5</property>
@@ -1400,6 +1420,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Show _Dependent</property>
<property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_ActivateDependents" last_modification_time="Fri, 28 Dec 2007 18:13:13 GMT"/>
<child>
<widget class="GtkMenu" id="show_dependent1_menu">
@@ -1409,7 +1430,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_References...</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_References" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ShowDependentRefs" last_modification_time="Fri, 28 Dec 2007 16:33:17 GMT"/>
</widget>
</child>
@@ -1418,7 +1439,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Substitutions</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_Substitutions" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ShowDependentSubs" last_modification_time="Fri, 28 Dec 2007 16:33:17 GMT"/>
</widget>
</child>
</widget>
@@ -1448,7 +1469,7 @@
<accelerator key="E" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4365">
+ <widget class="GtkImage" id="image5977">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
@@ -1469,7 +1490,7 @@
<signal name="activate" handler="FontViewMenu_Validate" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4366">
+ <widget class="GtkImage" id="image5978">
<property name="visible">True</property>
<property name="pixbuf">elementvalidate.png</property>
<property name="xalign">0.5</property>
@@ -1496,7 +1517,7 @@
<accelerator key="B" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4367">
+ <widget class="GtkImage" id="image5979">
<property name="visible">True</property>
<property name="pixbuf">elementbitmapsavail.png</property>
<property name="xalign">0.5</property>
@@ -1517,7 +1538,7 @@
<accelerator key="B" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4368">
+ <widget class="GtkImage" id="image5980">
<property name="visible">True</property>
<property name="pixbuf">elementregenbitmaps.png</property>
<property name="xalign">0.5</property>
@@ -1551,7 +1572,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
- <widget class="GtkImage" id="image4369">
+ <widget class="GtkImage" id="image5981">
<property name="visible">True</property>
<property name="pixbuf">changeweight.png</property>
<property name="xalign">0.5</property>
@@ -1572,7 +1593,7 @@
<signal name="activate" handler="FontViewMenu_ChangeWeight" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4370">
+ <widget class="GtkImage" id="image5982">
<property name="visible">True</property>
<property name="pixbuf">changeweight.png</property>
<property name="xalign">0.5</property>
@@ -1592,7 +1613,7 @@
<signal name="activate" handler="FontViewMenu_Oblique" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4371">
+ <widget class="GtkImage" id="image5983">
<property name="visible">True</property>
<property name="pixbuf">oblique.png</property>
<property name="xalign">0.5</property>
@@ -1612,7 +1633,7 @@
<signal name="activate" handler="FontViewMenu_Condense" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4372">
+ <widget class="GtkImage" id="image5984">
<property name="visible">True</property>
<property name="pixbuf">extendcondense.png</property>
<property name="xalign">0.5</property>
@@ -1632,7 +1653,7 @@
<signal name="activate" handler="FontViewMenu_Inline" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4373">
+ <widget class="GtkImage" id="image5985">
<property name="visible">True</property>
<property name="pixbuf">inline.png</property>
<property name="xalign">0.5</property>
@@ -1652,7 +1673,7 @@
<signal name="activate" handler="FontViewMenu_Outline" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4374">
+ <widget class="GtkImage" id="image5986">
<property name="visible">True</property>
<property name="pixbuf">outline.png</property>
<property name="xalign">0.5</property>
@@ -1672,7 +1693,7 @@
<signal name="activate" handler="FontViewMenu_Shadow" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4375">
+ <widget class="GtkImage" id="image5987">
<property name="visible">True</property>
<property name="pixbuf">shadow.png</property>
<property name="xalign">0.5</property>
@@ -1692,7 +1713,7 @@
<signal name="activate" handler="FontViewMenu_WireFrame" last_modification_time="Sun, 23 Dec 2007 22:14:50 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4376">
+ <widget class="GtkImage" id="image5988">
<property name="visible">True</property>
<property name="pixbuf">wireframe.png</property>
<property name="xalign">0.5</property>
@@ -1716,7 +1737,7 @@
<signal name="activate" handler="FontViewMenu_ActivateTransformations" last_modification_time="Sun, 22 Aug 2004 20:51:58 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4377">
+ <widget class="GtkImage" id="image5989">
<property name="visible">True</property>
<property name="pixbuf">elementtransform.png</property>
<property name="xalign">0.5</property>
@@ -1737,7 +1758,7 @@
<signal name="activate" handler="FontViewMenu_Transform" last_modification_time="Tue, 11 May 2004 22:04:15 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4378">
+ <widget class="GtkImage" id="image5990">
<property name="visible">True</property>
<property name="pixbuf">elementtransform.png</property>
<property name="xalign">0.5</property>
@@ -1780,7 +1801,7 @@
<accelerator key="E" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4379">
+ <widget class="GtkImage" id="image5991">
<property name="visible">True</property>
<property name="pixbuf">elementexpandstroke.png</property>
<property name="xalign">0.5</property>
@@ -1806,10 +1827,9 @@
<property name="visible">True</property>
<property name="label" translatable="yes">O_verlap</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_ActivateOverlap" last_modification_time="Thu, 13 May 2004 23:26:35 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4380">
+ <widget class="GtkImage" id="image5992">
<property name="visible">True</property>
<property name="pixbuf">rmoverlap.png</property>
<property name="xalign">0.5</property>
@@ -1831,7 +1851,7 @@
<accelerator key="O" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4381">
+ <widget class="GtkImage" id="image5993">
<property name="visible">True</property>
<property name="pixbuf">rmoverlap.png</property>
<property name="xalign">0.5</property>
@@ -1851,7 +1871,7 @@
<signal name="activate" handler="FontViewMenu_Intersect" last_modification_time="Wed, 12 May 2004 00:31:52 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4382">
+ <widget class="GtkImage" id="image5994">
<property name="visible">True</property>
<property name="pixbuf">intersection.png</property>
<property name="xalign">0.5</property>
@@ -1871,7 +1891,7 @@
<signal name="activate" handler="FontViewMenu_FindInter" last_modification_time="Wed, 12 May 2004 00:31:52 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4383">
+ <widget class="GtkImage" id="image5995">
<property name="visible">True</property>
<property name="pixbuf">findinter.png</property>
<property name="xalign">0.5</property>
@@ -1892,10 +1912,9 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Simplify</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_ActivateSimplify" last_modification_time="Thu, 13 May 2004 23:27:03 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4384">
+ <widget class="GtkImage" id="image5996">
<property name="visible">True</property>
<property name="pixbuf">elementsimplify.png</property>
<property name="xalign">0.5</property>
@@ -1917,7 +1936,7 @@
<accelerator key="M" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4385">
+ <widget class="GtkImage" id="image5997">
<property name="visible">True</property>
<property name="pixbuf">elementsimplify.png</property>
<property name="xalign">0.5</property>
@@ -1947,6 +1966,24 @@
<signal name="activate" handler="FontViewMenu_Cleanup" last_modification_time="Wed, 12 May 2004 00:31:52 GMT"/>
</widget>
</child>
+
+ <child>
+ <widget class="GtkMenuItem" id="canonical_start_point1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Canonical Start _Point</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CanonicalStart" last_modification_time="Fri, 28 Dec 2007 16:40:36 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="canonical_contours1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Canonical Conto_urs</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CanonicalContours" last_modification_time="Fri, 28 Dec 2007 16:40:36 GMT"/>
+ </widget>
+ </child>
</widget>
</child>
</widget>
@@ -1961,7 +1998,7 @@
<accelerator key="X" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4386">
+ <widget class="GtkImage" id="image5998">
<property name="visible">True</property>
<property name="pixbuf">elementaddextrema.png</property>
<property name="xalign">0.5</property>
@@ -2036,7 +2073,7 @@
<signal name="activate" handler="FontViewMenu_CorrectDir" last_modification_time="Thu, 13 May 2004 00:36:34 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4387">
+ <widget class="GtkImage" id="image5999">
<property name="visible">True</property>
<property name="pixbuf">elementcorrectdir.png</property>
<property name="xalign">0.5</property>
@@ -2059,9 +2096,10 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Build</property>
<property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_ActivateBuild" last_modification_time="Fri, 28 Dec 2007 18:13:13 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4388">
+ <widget class="GtkImage" id="image6000">
<property name="visible">True</property>
<property name="pixbuf">elementbuildaccent.png</property>
<property name="xalign">0.5</property>
@@ -2083,7 +2121,7 @@
<accelerator key="A" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4389">
+ <widget class="GtkImage" id="image6001">
<property name="visible">True</property>
<property name="pixbuf">elementbuildaccent.png</property>
<property name="xalign">0.5</property>
@@ -2150,10 +2188,10 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Tools</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontView_ToolsActivate" last_modification_time="Wed, 26 Dec 2007 19:35:29 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ToolsActivate" last_modification_time="Sat, 29 Dec 2007 01:24:04 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4390">
+ <widget class="GtkImage" id="image6002">
<property name="visible">True</property>
<property name="pixbuf">python.png</property>
<property name="xalign">0.5</property>
@@ -2190,7 +2228,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Hint _Subsitution Pts</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_HintSubsPts" last_modification_time="Thu, 13 May 2004 00:52:04 GMT"/>
+ <signal name="activate" handler="FontViewMenu_AutoHintSubsPts" last_modification_time="Fri, 28 Dec 2007 17:35:21 GMT"/>
</widget>
</child>
@@ -2371,7 +2409,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Reencode</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="ReencodeMenuBuild" last_modification_time="Sat, 26 Nov 2005 22:07:12 GMT"/>
+ <signal name="activate" handler="FontViewMenu_BuildReencode" last_modification_time="Fri, 28 Dec 2007 17:43:34 GMT"/>
<child>
<widget class="GtkMenu" id="reencode1_menu">
@@ -2401,7 +2439,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Force Encoding</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="BuildForceEncodingMenu" last_modification_time="Sat, 26 Nov 2005 22:07:12 GMT"/>
+ <signal name="activate" handler="FontViewMenu_BuildForceEncoding" last_modification_time="Fri, 28 Dec 2007 17:43:34 GMT"/>
<child>
<widget class="GtkMenu" id="force_encoding1_menu">
@@ -2454,10 +2492,10 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Detatch &amp; Remo_ve Glyphs</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_DetachRemoveGlyphs" last_modification_time="Sat, 26 Nov 2005 22:07:12 GMT"/>
+ <signal name="activate" handler="FontViewMenu_DetachAndRemoveGlyphs" last_modification_time="Fri, 28 Dec 2007 17:53:51 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4391">
+ <widget class="GtkImage" id="image6003">
<property name="visible">True</property>
<property name="stock">gtk-delete</property>
<property name="icon_size">1</property>
@@ -2565,7 +2603,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Rename Gl_yphs...</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_RenameGlyphs" last_modification_time="Wed, 05 Apr 2006 19:46:04 GMT"/>
+ <signal name="activate" handler="FontViewMenu_RenameByNamelist" last_modification_time="Fri, 28 Dec 2007 17:53:51 GMT"/>
</widget>
</child>
@@ -2600,7 +2638,7 @@
<signal name="activate" handler="FontViewMenu_ChangeChar" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4392">
+ <widget class="GtkImage" id="image6004">
<property name="visible">True</property>
<property name="stock">gtk-go-forward</property>
<property name="icon_size">1</property>
@@ -2621,7 +2659,7 @@
<signal name="activate" handler="FontViewMenu_ChangeChar" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4393">
+ <widget class="GtkImage" id="image6005">
<property name="visible">True</property>
<property name="stock">gtk-go-back</property>
<property name="icon_size">1</property>
@@ -2642,7 +2680,7 @@
<signal name="activate" handler="FontViewMenu_ChangeChar" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4394">
+ <widget class="GtkImage" id="image6006">
<property name="visible">True</property>
<property name="pixbuf">viewnextdef.png</property>
<property name="xalign">0.5</property>
@@ -2662,7 +2700,7 @@
<signal name="activate" handler="FontViewMenu_ChangeChar" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4395">
+ <widget class="GtkImage" id="image6007">
<property name="visible">True</property>
<property name="pixbuf">viewprevdef.png</property>
<property name="xalign">0.5</property>
@@ -2682,7 +2720,7 @@
<signal name="activate" handler="FontViewMenu_Goto" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4396">
+ <widget class="GtkImage" id="image6008">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
@@ -2741,20 +2779,20 @@
</child>
<child>
- <widget class="GtkMenuItem" id="anchored_pairs1">
+ <widget class="GtkMenuItem" id="anchor_pairs1">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Anchored Pairs</property>
+ <property name="label" translatable="yes">_Anchor Pairs</property>
<property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_ActivateAnchoredPairs" last_modification_time="Fri, 28 Dec 2007 18:13:13 GMT"/>
<child>
- <widget class="GtkMenu" id="anchored_pairs1_menu">
+ <widget class="GtkMenu" id="anchor_pairs1_menu">
<child>
<widget class="GtkMenuItem" id="all2">
<property name="visible">True</property>
<property name="label" translatable="yes">_All</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_AllAnchoredPairs" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
</widget>
</child>
</widget>
@@ -2849,7 +2887,7 @@
<property name="tooltip" translatable="yes">Show Horizontal Metrics lines</property>
<property name="label" translatable="yes">Show H. Metrics...</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_ShowHMetrics" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ShowMetrics" last_modification_time="Fri, 28 Dec 2007 17:15:39 GMT"/>
</widget>
</child>
@@ -2859,7 +2897,7 @@
<property name="tooltip" translatable="yes">Show Vertical Metrics lines</property>
<property name="label" translatable="yes">Show V. Metrics...</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_ShowVMetrics" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ShowMetrics" last_modification_time="Fri, 28 Dec 2007 17:15:39 GMT"/>
</widget>
</child>
@@ -2906,50 +2944,55 @@
</child>
<child>
- <widget class="GtkMenuItem" id="24_pixel_outline1">
+ <widget class="GtkCheckMenuItem" id="24_pixel_outline1">
<property name="visible">True</property>
<property name="label" translatable="yes">_24 pixel outline</property>
<property name="use_underline">True</property>
+ <property name="active">False</property>
<signal name="activate" handler="FontViewMenu_PixelSize" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<accelerator key="2" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="36_pixel_outline1">
+ <widget class="GtkCheckMenuItem" id="36_pixel_outline1">
<property name="visible">True</property>
<property name="label" translatable="yes">_36 pixel outline</property>
<property name="use_underline">True</property>
+ <property name="active">False</property>
<signal name="activate" handler="FontViewMenu_PixelSize" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<accelerator key="3" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="48_pixel_outline1">
+ <widget class="GtkCheckMenuItem" id="48_pixel_outline1">
<property name="visible">True</property>
<property name="label" translatable="yes">_48 pixel outline</property>
<property name="use_underline">True</property>
+ <property name="active">False</property>
<signal name="activate" handler="FontViewMenu_PixelSize" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<accelerator key="4" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="72_pixel_outline1">
+ <widget class="GtkCheckMenuItem" id="72_pixel_outline1">
<property name="visible">True</property>
<property name="label" translatable="yes">_72 pixel outline</property>
<property name="use_underline">True</property>
+ <property name="active">False</property>
<signal name="activate" handler="FontViewMenu_PixelSize" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<accelerator key="7" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="96_pixel_outline1">
+ <widget class="GtkCheckMenuItem" id="96_pixel_outline1">
<property name="visible">True</property>
<property name="label" translatable="yes">_96 pixel outline</property>
<property name="use_underline">True</property>
+ <property name="active">False</property>
<signal name="activate" handler="FontViewMenu_PixelSize" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
<accelerator key="9" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
@@ -2967,7 +3010,7 @@
<property name="label" translatable="yes">_Anti Alias</property>
<property name="use_underline">True</property>
<property name="active">True</property>
- <signal name="activate" handler="FontViewMenu_AntiAlias" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
+ <signal name="activate" handler="FontViewMenu_PixelSize" last_modification_time="Sat, 29 Dec 2007 01:12:35 GMT"/>
<accelerator key="5" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
@@ -2978,7 +3021,7 @@
<property name="label" translatable="yes">_Fit to em</property>
<property name="use_underline">True</property>
<property name="active">False</property>
- <signal name="activate" handler="FontViewMenu_FitToEm" last_modification_time="Thu, 13 May 2004 01:07:55 GMT"/>
+ <signal name="activate" handler="FontViewMenu_PixelSize" last_modification_time="Sat, 29 Dec 2007 01:12:35 GMT"/>
<accelerator key="6" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
@@ -3026,7 +3069,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Thirds in Width</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_Thirds" last_modification_time="Thu, 13 May 2004 01:15:38 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ThirdsWidth" last_modification_time="Fri, 28 Dec 2007 17:35:21 GMT"/>
</widget>
</child>
@@ -3184,7 +3227,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Convert by C_Map</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_CvtByCMap" last_modification_time="Thu, 13 May 2004 01:25:01 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ConvertByCMap" last_modification_time="Fri, 28 Dec 2007 17:35:21 GMT"/>
</widget>
</child>
@@ -3208,7 +3251,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">F_latten By CMap</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_FlattenCMap" last_modification_time="Thu, 13 May 2004 01:25:01 GMT"/>
+ <signal name="activate" handler="FontViewMenu_FlattenByCMap" last_modification_time="Fri, 28 Dec 2007 17:35:21 GMT"/>
</widget>
</child>
@@ -3241,7 +3284,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Remove Font</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_RemoveFont" last_modification_time="Thu, 13 May 2004 01:25:01 GMT"/>
+ <signal name="activate" handler="FontViewMenu_RemoveFontFromCID" last_modification_time="Fri, 28 Dec 2007 17:35:21 GMT"/>
</widget>
</child>
@@ -3265,10 +3308,10 @@
<property name="visible">True</property>
<property name="label" translatable="yes">C_ID Font Info...</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="FontViewMenu_CID_FontInfo" last_modification_time="Thu, 13 May 2004 01:25:01 GMT"/>
+ <signal name="activate" handler="FontViewMenu_CIDFontInfo" last_modification_time="Fri, 28 Dec 2007 17:35:21 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4397">
+ <widget class="GtkImage" id="image6009">
<property name="visible">True</property>
<property name="stock">gtk-select-font</property>
<property name="icon_size">1</property>
@@ -3304,7 +3347,7 @@
<signal name="activate" handler="FontViewMenu_CreateMM" last_modification_time="Thu, 13 May 2004 01:25:01 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4398">
+ <widget class="GtkImage" id="image6010">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
@@ -3340,7 +3383,7 @@
<signal name="activate" handler="FontViewMenu_MMInfo" last_modification_time="Thu, 13 May 2004 01:25:01 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4399">
+ <widget class="GtkImage" id="image6011">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_size">1</property>
@@ -3429,7 +3472,7 @@
<signal name="activate" handler="WindowMenu_Warnings" last_modification_time="Sun, 27 Nov 2005 13:16:03 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4400">
+ <widget class="GtkImage" id="image6012">
<property name="visible">True</property>
<property name="stock">gtk-dialog-warning</property>
<property name="icon_size">1</property>
@@ -3466,11 +3509,11 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="MenuHelp_Help" last_modification_time="Tue, 11 May 2004 18:48:57 GMT"/>
+ <signal name="activate" handler="FontViewMenu_ContextualHelp" last_modification_time="Fri, 28 Dec 2007 16:23:41 GMT"/>
<accelerator key="F1" modifiers="0" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4401">
+ <widget class="GtkImage" id="image6013">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>
@@ -3484,6 +3527,16 @@
</child>
<child>
+ <widget class="GtkMenuItem" id="overview1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Overview</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="MenuHelp_Help" last_modification_time="Fri, 28 Dec 2007 16:23:41 GMT"/>
+ <accelerator key="F1" modifiers="GDK_SHIFT_MASK" signal="activate"/>
+ </widget>
+ </child>
+
+ <child>
<widget class="GtkImageMenuItem" id="index1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Index</property>
@@ -3492,7 +3545,7 @@
<accelerator key="F1" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4402">
+ <widget class="GtkImage" id="image6014">
<property name="visible">True</property>
<property name="stock">gtk-index</property>
<property name="icon_size">1</property>
@@ -3513,7 +3566,7 @@
<signal name="activate" handler="MenuHelp_About" last_modification_time="Tue, 11 May 2004 18:48:57 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image4403">
+ <widget class="GtkImage" id="image6015">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_size">1</property>
@@ -3569,6 +3622,7 @@
<child>
<widget class="GtkDrawingArea" id="view">
<property name="visible">True</property>
+ <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK</property>
<signal name="button_press_event" handler="FontViewView_Mouse" last_modification_time="Thu, 27 Dec 2007 00:34:56 GMT"/>
<signal name="button_release_event" handler="FontViewView_Mouse" last_modification_time="Thu, 27 Dec 2007 00:35:14 GMT"/>
<signal name="motion_notify_event" handler="FontViewView_Mouse" last_modification_time="Thu, 27 Dec 2007 00:35:43 GMT"/>
@@ -3627,13 +3681,58 @@
<property name="spacing">0</property>
<child>
- <widget class="GtkImage" id="SplashImage">
+ <widget class="GtkVBox" id="vbox11">
<property name="visible">True</property>
- <property name="pixbuf">splashff.png</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkImage" id="ffsplash1">
+ <property name="visible">True</property>
+ <property name="pixbuf">ffsplash1.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkImage" id="ffsplash2">
+ <property name="visible">True</property>
+ <property name="pixbuf">ffsplash2.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkImage" id="ffsplash3">
+ <property name="visible">True</property>
+ <property name="pixbuf">ffsplash3.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -3702,6 +3801,27 @@
<property name="fill">False</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkLabel" id="LibVersion">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Library Version</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -14462,4 +14582,253 @@
</child>
</widget>
+<widget class="GtkMenu" id="FontViewPopupMenu">
+
+ <child>
+ <widget class="GtkImageMenuItem" id="cut3">
+ <property name="visible">True</property>
+ <property name="label">gtk-cut</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="FontViewMenu_Cut" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="copy3">
+ <property name="visible">True</property>
+ <property name="label">gtk-copy</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="FontViewMenu_Copy" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="copy_reference2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">C_opy Reference</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CopyRef" last_modification_time="Sat, 29 Dec 2007 01:06:51 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5419">
+ <property name="visible">True</property>
+ <property name="pixbuf">editcopyref.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="copy_width2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Copy _Width</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CopyWidth" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5420">
+ <property name="visible">True</property>
+ <property name="pixbuf">editcopywidth.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="paste3">
+ <property name="visible">True</property>
+ <property name="label">gtk-paste</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="FontViewMenu_Paste" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="clear3">
+ <property name="visible">True</property>
+ <property name="label">gtk-clear</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="FontViewMenu_Clear" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="copy_fg_to_bg2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Copy _Fg to Bg</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CopyFg2Bg" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5421">
+ <property name="visible">True</property>
+ <property name="pixbuf">editcopyfg2bg.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="unlink_reference2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Unlin_k Reference</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_UnlinkRef" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5422">
+ <property name="visible">True</property>
+ <property name="stock">gtk-refresh</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="separator90">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="char_info1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Glyph _Info...</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CharInfo" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5423">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="transform2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Transform...</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_Transform" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5424">
+ <property name="visible">True</property>
+ <property name="pixbuf">elementtransform.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="expand_stroke2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Expand Stroke...</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_ExpandStroke" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5425">
+ <property name="visible">True</property>
+ <property name="pixbuf">elementexpandstroke.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="round_to_int2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Round to _Int</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_RoundToInt" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="correct_direction2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Correct _Direction</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CorrectDir" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image5426">
+ <property name="visible">True</property>
+ <property name="pixbuf">elementcorrectdir.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="separator91">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="auto_hint1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Auto _Hint</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_AutoHint" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="center_in_width2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Center in Width</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_CenterWidth" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="set_width2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Set _Width</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="FontViewMenu_SetWidth" last_modification_time="Sat, 29 Dec 2007 00:42:19 GMT"/>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff --git a/gtkui/fontforgegtk.h b/gtkui/fontforgegtk.h
new file mode 100644
index 00000000..8cd44da0
--- /dev/null
+++ b/gtkui/fontforgegtk.h
@@ -0,0 +1,82 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _FONTFORGEGTK_H_
+#define _FONTFORGEGTK_H_
+
+#include <fontforge/fontforgevw.h>
+
+extern void help(char *filename);
+
+# include <gtk/gtk.h>
+# include "gwwv.h"
+# include "interface.h"
+# include "callbacks.h"
+# include "support.h"
+# include "viewsgtk.h"
+extern GdkCursor *ct_magplus, *ct_magminus, *ct_mypointer,
+ *ct_circle, *ct_square, *ct_triangle, *ct_pen,
+ *ct_ruler, *ct_knife, *ct_rotate, *ct_skew, *ct_scale, *ct_flip,
+ *ct_3drotate, *ct_perspective,
+ *ct_updown, *ct_leftright, *ct_nesw, *ct_nwse,
+ *ct_rect, *ct_elipse, *ct_poly, *ct_star, *ct_filledrect, *ct_filledelipse,
+ *ct_pencil, *ct_shift, *ct_line, *ct_myhand, *ct_setwidth,
+ *ct_kerning, *ct_rbearing, *ct_lbearing, *ct_eyedropper,
+ *ct_prohibition, *ct_ddcursor, *ct_spiroright, *ct_spiroleft;
+extern GdkCursor *ct_pointer, *ct_backpointer, *ct_hand,
+ *ct_question, *ct_cross, *ct_4way, *ct_text, *ct_watch, *ct_draganddrop,
+ *ct_invisible;
+
+extern int display_has_alpha; /* Just a guess... */
+
+extern void InitCursors(void);
+
+extern int ErrorWindowExists(void);
+extern void ShowErrorWindow(void);
+extern struct ui_interface gtk_ui_interface;
+extern struct prefs_interface gtk_prefs_interface;
+/*extern struct sc_interface gdraw_sc_interface;*/
+/*extern struct cv_interface gdraw_cv_interface;*/
+/*extern struct bc_interface gdraw_bc_interface;*/
+/*extern struct mv_interface gdraw_mv_interface;*/
+extern struct fv_interface gtk_fv_interface;
+/*extern struct fi_interface gdraw_fi_interface;*/
+/*extern struct clip_interface gdraw_clip_interface;*/
+
+extern int ItalicConstrained;
+extern char *script_menu_names[SCRIPT_MENU_MAX];
+extern char *script_filenames[SCRIPT_MENU_MAX];
+extern char *RecentFiles[RECENT_MAX];
+
+extern FontView *fv_list;
+
+extern struct gwwv_filter def_font_filters[], *user_font_filters;
+extern int default_font_filter_index;
+
+/* The version of the library that the exe was built against */
+extern Library_Version_Configuration exe_library_version_configuration;
+
+#endif
diff --git a/gtkui/fontview.c b/gtkui/fontview.c
new file mode 100644
index 00000000..d1d2f14a
--- /dev/null
+++ b/gtkui/fontview.c
@@ -0,0 +1,5676 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "fontforgegtk.h"
+#include <fontforge/groups.h>
+#include <fontforge/psfont.h>
+#include <fontforge/gfile.h>
+#include <fontforge/utype.h>
+#include <fontforge/ustring.h>
+#include <glib.h>
+#include <math.h>
+#include <unistd.h>
+#include <gdk/gdkkeysyms.h>
+
+int OpenCharsInNewWindow = 1;
+char *RecentFiles[RECENT_MAX] = { NULL };
+int save_to_dir = 0; /* use sfdir rather than sfd */
+char *script_menu_names[SCRIPT_MENU_MAX];
+char *script_filenames[SCRIPT_MENU_MAX];
+extern int onlycopydisplayed, copymetadata, copyttfinstr;
+extern struct compressors compressors[];
+int display_has_alpha;
+
+enum glyphlable { gl_glyph, gl_name, gl_unicode, gl_encoding };
+int default_fv_font_size = 24, default_fv_antialias=true,
+ default_fv_bbsized=true,
+ default_fv_showhmetrics=false, default_fv_showvmetrics=false,
+ default_fv_glyphlabel = gl_glyph;
+#define METRICS_BASELINE 0x0000c0
+#define METRICS_ORIGIN 0xc00000
+#define METRICS_ADVANCE 0x008000
+FontView *fv_list=NULL;
+
+# define FV_From_Widget(menuitem) \
+ (FontView *) g_object_get_data( \
+ G_OBJECT( gtk_widget_get_toplevel( GTK_WIDGET( menuitem ))),\
+ "ffdata" )
+
+# define FV_From_MI(menuitem) \
+ (FontView *) lookup_ffdata( GTK_WIDGET( menuitem ))
+
+
+static void FVBDFCInitClut(FontView *fv,BDFFont *bdf, uint32 *clut) {
+ int i;
+
+ clut[0] = 0; /* Transparent */
+ if ( bdf->clut==NULL )
+ clut[1] = 0xff000000; /* Opaque black */
+ else {
+ GdkColor *fg = &fv->v->style->fg[fv->v->state];
+ GdkColor *bg = &fv->v->style->bg[fv->v->state];
+ for ( i=1; i<bdf->clut->clut_len; ++i ) {
+ int r,g,b;
+ r = ((fg->red *i + bg->red *(bdf->clut->clut_len-1-i))/bdf->clut->clut_len)>>8;
+ g = ((fg->green*i + bg->green*(bdf->clut->clut_len-1-i))/bdf->clut->clut_len)>>8;
+ b = ((fg->blue *i + bg->blue *(bdf->clut->clut_len-1-i))/bdf->clut->clut_len)>>8;
+ clut[i] = 0xff000000 | (r<<16) | (g<<8) | b;
+ }
+ }
+}
+
+static void FVBDFCToSlot(FontView *fv,BDFFont *bdf, BDFChar *bdfc, uint32 *clut) {
+ /* I could use a grey-scale image as an alpha channel, and set the RGB to */
+ /* the foreground color. That only works if X supports alpha channels, */
+ /* which I don't really know. Or I can do the composing here, and create */
+ /* a transparent/opaque mask (no inbetween states). That'll always work */
+ /* and have the same effect */
+ /* 0=>transparent, 0xff=>opaque (I think) */
+ /* Two cases: GImage may be bitmap or grey scale */
+ int i,j, hpos,vpos, ii, jj, pixel;
+ uint32 rgba;
+ int mag = fv->magnify>0 ? fv->magnify : 1;
+ int width = gdk_pixbuf_get_width(fv->char_slot);
+ int height = gdk_pixbuf_get_height(fv->char_slot);
+ int bpl = gdk_pixbuf_get_rowstride(fv->char_slot);
+ gchar *pixel_data = gdk_pixbuf_get_pixels(fv->char_slot), *pt;
+
+ memset(pixel_data,0,(height-1)*bpl + width*4); /* Last line is not guaranteed to be bpl long */
+ for ( i=bdfc->ymin; i<=bdfc->ymax; ++i ) {
+ vpos = fv->magnify*(bdf->ascent-i);
+ if ( vpos<0 || vpos>=height )
+ continue;
+ for ( j=bdfc->xmax-bdfc->xmin; j>=0; --j ) {
+ hpos = fv->magnify*(j);
+ if ( hpos<0 )
+ continue;
+ if ( bdf->clut!=NULL )
+ pixel = bdfc->bitmap[(bdfc->ymax-i)*bdfc->bytes_per_line+j];
+ else
+ pixel = bdfc->bitmap[(bdfc->ymax-i)*bdfc->bytes_per_line+(j>>3)]&(0x80>>(j&7)) ? 1 : 0;
+ rgba = clut[pixel];
+ pt = pixel_data+(vpos*bpl)+hpos*4;
+ for ( ii=0; ii<mag && vpos+ii<height; ++ii ) {
+ for ( jj=0; jj<mag && hpos+jj<width; ++jj ) {
+ pt[0] = (rgba>>16)&0xff;
+ pt[1] = (rgba>>8 )&0xff;
+ pt[2] = (rgba )&0xff;
+ pt[3] = (rgba>>24)&0xff;
+ pt+=4;
+ }
+ pt = pixel_data+((vpos+ii+1)*bpl)+hpos*4;
+ }
+ }
+ }
+}
+
+static void FV_ToggleCharChanged(SplineChar *sc) {
+ int i, j;
+ int pos;
+ FontView *fv;
+
+ for ( fv = (FontView *) sc->parent->fv; fv!=NULL; fv=(FontView *) fv->b.nextsame ) {
+ if ( fv->b.sf!=sc->parent ) /* Can happen in CID fonts if char's parent is not currently active */
+ continue;
+ if ( fv->v==NULL || fv->colcnt==0 ) /* Can happen in scripts */
+ continue;
+ for ( pos=0; pos<fv->b.map->enccount; ++pos ) if ( fv->b.map->map[pos]==sc->orig_pos ) {
+ i = pos / fv->colcnt;
+ j = pos - i*fv->colcnt;
+ i -= fv->rowoff;
+ /* Normally we should be checking against fv->rowcnt (rather than <=rowcnt) */
+ /* but every now and then the WM forces us to use a window size which doesn't */
+ /* fit our expectations (maximized view) and we must be prepared for half */
+ /* lines */
+ if ( i>=0 && i<=fv->rowcnt ) {
+ GdkGC *gc = fv->v->style->fg_gc[fv->v->state];
+ GdkGCValues values;
+ GdkColor bg;
+ gdk_gc_get_values(gc,&values);
+ bg.pixel = -1;
+ if ( sc->color!=COLOR_DEFAULT ) {
+ bg.red = ((sc->color>>16)&0xff)*0x101;
+ bg.green = ((sc->color>>8 )&0xff)*0x101;
+ bg.blue = ((sc->color )&0xff)*0x101;
+ } else if ( sc->layers[ly_back].splines!=NULL || sc->layers[ly_back].images!=NULL ) {
+ bg.red = bg.green = bg.blue = 0x8000; bg.pixel = 0x808080;
+ } else
+ bg = values.background;
+ /* Bug!!! This only works on RealColor */
+ bg.red ^= values.foreground.red;
+ bg.green ^= values.foreground.green;
+ bg.blue ^= values.foreground.blue;
+ bg.pixel ^= values.foreground.pixel;
+ /* End bug */
+ gdk_gc_set_function(gc,GDK_XOR);
+ gdk_gc_set_foreground(gc, &bg);
+ gdk_draw_rectangle(fv->v->window, gc, TRUE,
+ j*fv->cbw+1, i*fv->cbh+1, fv->cbw-1, fv->lab_height);
+ gdk_gc_set_values(gc,&values,
+ GDK_GC_FOREGROUND | GDK_GC_FUNCTION );
+ }
+ }
+ }
+}
+
+void FVMarkHintsOutOfDate(SplineChar *sc) {
+ int i, j;
+ int pos;
+ FontView *fv;
+
+ if ( sc->parent->onlybitmaps || sc->parent->multilayer || sc->parent->strokedfont || sc->parent->order2 )
+return;
+ for ( fv = (FontView *) sc->parent->fv; fv!=NULL; fv=(FontView *) fv->b.nextsame ) {
+ if ( fv->b.sf!=sc->parent ) /* Can happen in CID fonts if char's parent is not currently active */
+ continue;
+ if ( fv->v==NULL || fv->colcnt==0 ) /* Can happen in scripts */
+ continue;
+ for ( pos=0; pos<fv->b.map->enccount; ++pos ) if ( fv->b.map->map[pos]==sc->orig_pos ) {
+ i = pos / fv->colcnt;
+ j = pos - i*fv->colcnt;
+ i -= fv->rowoff;
+ /* Normally we should be checking against fv->rowcnt (rather than <=rowcnt) */
+ /* but every now and then the WM forces us to use a window size which doesn't */
+ /* fit our expectations (maximized view) and we must be prepared for half */
+ /* lines */
+ if ( i>=0 && i<=fv->rowcnt ) {
+ GdkColor hintcol;
+ GdkRectangle r;
+ hintcol.red = hintcol.green = 0;
+ hintcol.blue = 0xffff;
+ gdk_gc_set_rgb_fg_color(fv->gc,&hintcol);
+ r.x = j*fv->cbw+1; r.width = fv->cbw-1;
+ r.y = i*fv->cbh+1; r.height = fv->lab_height-1;
+ gdk_draw_line(GDK_DRAWABLE(fv->v->window),fv->gc,r.x,r.y,r.x,r.y+r.height-1);
+ gdk_draw_line(GDK_DRAWABLE(fv->v->window),fv->gc,r.x+1,r.y,r.x+1,r.y+r.height-1);
+ gdk_draw_line(GDK_DRAWABLE(fv->v->window),fv->gc,r.x+r.width-1,r.y,r.x+r.width-1,r.y+r.height-1);
+ gdk_draw_line(GDK_DRAWABLE(fv->v->window),fv->gc,r.x+r.width-2,r.y,r.x+r.width-2,r.y+r.height-1);
+ }
+ }
+ }
+}
+
+static void FontViewRefreshAll(SplineFont *sf) {
+ FontView *fv;
+ for ( fv = (FontView *) (sf->fv); fv!=NULL; fv = (FontView *) (fv->b.nextsame) )
+ if ( fv->v!=NULL )
+ gtk_widget_queue_draw(fv->v);
+}
+
+void FVDeselectAll(FontView *fv) {
+ int i, redraw = false;
+
+ for ( i=0; i<fv->b.map->enccount; ++i ) {
+ if ( fv->b.selected[i] ) {
+ fv->b.selected[i] = false;
+ redraw = true;
+ }
+ }
+ fv->sel_index = 0;
+ if ( redraw )
+ gtk_widget_queue_draw(fv->v);
+}
+
+static void FVInvertSelection(FontView *fv) {
+ int i;
+
+ for ( i=0; i<fv->b.map->enccount; ++i ) {
+ fv->b.selected[i] = !fv->b.selected[i];
+ }
+ fv->sel_index = 1;
+ gtk_widget_queue_draw(fv->v);
+}
+
+static void FVSelectAll(FontView *fv) {
+ int i, redraw = false;
+
+ for ( i=0; i<fv->b.map->enccount; ++i ) {
+ if ( !fv->b.selected[i] ) {
+ fv->b.selected[i] = true;
+ redraw = true;
+ }
+ }
+ fv->sel_index = 1;
+ if ( redraw )
+ gtk_widget_queue_draw(fv->v);
+}
+
+static char *SubMatch(char *pattern, char *eop, char *name,int ignorecase) {
+ char ch, *ppt, *npt, *ept, *eon;
+
+ while ( pattern<eop && ( ch = *pattern)!='\0' ) {
+ if ( ch=='*' ) {
+ if ( pattern[1]=='\0' )
+return( name+strlen(name));
+ for ( npt=name; ; ++npt ) {
+ if ( (eon = SubMatch(pattern+1,eop,npt,ignorecase))!= NULL )
+return( eon );
+ if ( *npt=='\0' )
+return( NULL );
+ }
+ } else if ( ch=='?' ) {
+ if ( *name=='\0' )
+return( NULL );
+ ++name;
+ } else if ( ch=='[' ) {
+ /* [<char>...] matches the chars
+ /* [<char>-<char>...] matches any char within the range (inclusive)
+ /* the above may be concattenated and the resultant pattern matches
+ /* anything thing which matches any of them.
+ /* [^<char>...] matches any char which does not match the rest of
+ /* the pattern
+ /* []...] as a special case a ']' immediately after the '[' matches
+ /* itself and does not end the pattern */
+ int found = 0, not=0;
+ ++pattern;
+ if ( pattern[0]=='^' ) { not = 1; ++pattern; }
+ for ( ppt = pattern; (ppt!=pattern || *ppt!=']') && *ppt!='\0' ; ++ppt ) {
+ ch = *ppt;
+ if ( ppt[1]=='-' && ppt[2]!=']' && ppt[2]!='\0' ) {
+ char ch2 = ppt[2];
+ if ( (*name>=ch && *name<=ch2) ||
+ (ignorecase && islower(ch) && islower(ch2) &&
+ *name>=toupper(ch) && *name<=toupper(ch2)) ||
+ (ignorecase && isupper(ch) && isupper(ch2) &&
+ *name>=tolower(ch) && *name<=tolower(ch2))) {
+ if ( !not ) {
+ found = 1;
+ break;
+ }
+ } else {
+ if ( not ) {
+ found = 1;
+ break;
+ }
+ }
+ ppt += 2;
+ } else if ( ch==*name || (ignorecase && tolower(ch)==tolower(*name)) ) {
+ if ( !not ) {
+ found = 1;
+ break;
+ }
+ } else {
+ if ( not ) {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if ( !found )
+return( NULL );
+ while ( *ppt!=']' && *ppt!='\0' ) ++ppt;
+ pattern = ppt;
+ ++name;
+ } else if ( ch=='{' ) {
+ /* matches any of a comma seperated list of substrings */
+ for ( ppt = pattern+1; *ppt!='\0' ; ppt = ept ) {
+ for ( ept=ppt; *ept!='}' && *ept!=',' && *ept!='\0'; ++ept );
+ npt = SubMatch(ppt,ept,name,ignorecase);
+ if ( npt!=NULL ) {
+ char *ecurly = ept;
+ while ( *ecurly!='}' && ecurly<eop && *ecurly!='\0' ) ++ecurly;
+ if ( (eon=SubMatch(ecurly+1,eop,npt,ignorecase))!=NULL )
+return( eon );
+ }
+ if ( *ept=='}' )
+return( NULL );
+ if ( *ept==',' ) ++ept;
+ }
+ } else if ( ch==*name ) {
+ ++name;
+ } else if ( ignorecase && tolower(ch)==tolower(*name)) {
+ ++name;
+ } else
+return( NULL );
+ ++pattern;
+ }
+return( name );
+}
+
+/* Handles *?{}[] wildcards */
+static int WildMatch(char *pattern, char *name,int ignorecase) {
+ char *eop = pattern + strlen(pattern);
+
+ if ( pattern==NULL )
+return( true );
+
+ name = SubMatch(pattern,eop,name,ignorecase);
+ if ( name==NULL )
+return( false );
+ if ( *name=='\0' )
+return( true );
+
+return( false );
+}
+
+static void FVSelectByName(FontView *fv) {
+ int j, gid;
+ char *ret, *end;
+ SplineChar *sc;
+ EncMap *map = fv->b.map;
+ SplineFont *sf = fv->b.sf;
+ struct altuni *alt;
+
+ ret = gwwv_ask_string(_("Select all instances of the wildcard pattern"),".notdef",_("Select all instances of the wildcard pattern"));
+ if ( ret==NULL )
+return;
+ FVDeselectAll(fv);
+ if (( *ret=='0' && ( ret[1]=='x' || ret[1]=='X' )) ||
+ ((*ret=='u' || *ret=='U') && ret[1]=='+' )) {
+ int uni = (int) strtol(ret+2,&end,16);
+ int vs= -2;
+ if ( *end=='.' ) {
+ ++end;
+ if (( *end=='0' && ( end[1]=='x' || end[1]=='X' )) ||
+ ((*end=='u' || *end=='U') && end[1]=='+' ))
+ end += 2;
+ vs = (int) strtoul(end,&end,16);
+ }
+ if ( *end!='\0' || uni<0 || uni>=0x110000 ) {
+ free(ret);
+ gwwv_post_error( _("Bad Number"),_("Bad Number") );
+return;
+ }
+ for ( j=0; j<map->enccount; ++j ) if ( (gid=map->map[j])!=-1 && (sc=sf->glyphs[gid])!=NULL ) {
+ if ( vs==-2 ) {
+ for ( alt=sc->altuni; alt!=NULL && (alt->unienc!=uni || alt->fid!=0); alt=alt->next );
+ } else {
+ for ( alt=sc->altuni; alt!=NULL && (alt->unienc!=uni || alt->vs!=vs || alt->fid!=0); alt=alt->next );
+ }
+ if ( (sc->unicodeenc == uni && vs<0) || alt!=NULL ) {
+ fv->b.selected[j] = true;
+ }
+ }
+ } else {
+ for ( j=0; j<map->enccount; ++j ) if ( (gid=map->map[j])!=-1 && (sc=sf->glyphs[gid])!=NULL ) {
+ if ( WildMatch(ret,sc->name,false) ) {
+ fv->b.selected[j] = true;
+ }
+ }
+ }
+ free(ret);
+ fv->sel_index = 1;
+ gtk_widget_queue_draw(fv->v);
+}
+
+static void FVSelectByScript(FontView *fv) {
+ gwwv_post_notice("NYI", "Select by Script not yet implemented!!!!" );
+}
+
+static void FVSelectColor(FontView *fv, uint32 col, int door) {
+ int i, any=0;
+ uint32 sccol;
+ SplineChar **glyphs = fv->b.sf->glyphs;
+
+ for ( i=0; i<fv->b.map->enccount; ++i ) {
+ int gid = fv->b.map->map[i];
+ sccol = ( gid==-1 || glyphs[gid]==NULL ) ? COLOR_DEFAULT : glyphs[gid]->color;
+ if ( (door && !fv->b.selected[i] && sccol==col) ||
+ (!door && fv->b.selected[i]!=(sccol==col)) ) {
+ fv->b.selected[i] = !fv->b.selected[i];
+ if ( fv->b.selected[i] ) any = true;
+ }
+ }
+ fv->sel_index = any;
+ gtk_widget_queue_draw(fv->v);
+}
+
+static void FVReselect(FontView *fv, int newpos) {
+ int i;
+
+ if ( newpos<0 ) newpos = 0;
+ else if ( newpos>=fv->b.map->enccount ) newpos = fv->b.map->enccount-1;
+
+ if ( fv->pressed_pos<fv->end_pos ) {
+ if ( newpos>fv->end_pos ) {
+ for ( i=fv->end_pos+1; i<=newpos; ++i ) if ( !fv->b.selected[i] ) {
+ fv->b.selected[i] = fv->sel_index;
+ }
+ } else if ( newpos<fv->pressed_pos ) {
+ for ( i=fv->end_pos; i>fv->pressed_pos; --i ) if ( fv->b.selected[i] ) {
+ fv->b.selected[i] = false;
+ }
+ for ( i=fv->pressed_pos-1; i>=newpos; --i ) if ( !fv->b.selected[i] ) {
+ fv->b.selected[i] = fv->sel_index;
+ }
+ } else {
+ for ( i=fv->end_pos; i>newpos; --i ) if ( fv->b.selected[i] ) {
+ fv->b.selected[i] = false;
+ }
+ }
+ } else {
+ if ( newpos<fv->end_pos ) {
+ for ( i=fv->end_pos-1; i>=newpos; --i ) if ( !fv->b.selected[i] ) {
+ fv->b.selected[i] = fv->sel_index;
+ }
+ } else if ( newpos>fv->pressed_pos ) {
+ for ( i=fv->end_pos; i<fv->pressed_pos; ++i ) if ( fv->b.selected[i] ) {
+ fv->b.selected[i] = false;
+ }
+ for ( i=fv->pressed_pos+1; i<=newpos; ++i ) if ( !fv->b.selected[i] ) {
+ fv->b.selected[i] = fv->sel_index;
+ }
+ } else {
+ for ( i=fv->end_pos; i<newpos; ++i ) if ( fv->b.selected[i] ) {
+ fv->b.selected[i] = false;
+ }
+ }
+ }
+ fv->end_pos = newpos;
+ gtk_widget_queue_draw(fv->v);
+}
+
+static void FVFlattenAllBitmapSelections(FontView *fv) {
+ BDFFont *bdf;
+ int i;
+
+ for ( bdf = fv->b.sf->bitmaps; bdf!=NULL; bdf=bdf->next ) {
+ for ( i=0; i<bdf->glyphcnt; ++i )
+ if ( bdf->glyphs[i]!=NULL && bdf->glyphs[i]->selection!=NULL )
+ BCFlattenFloat(bdf->glyphs[i]);
+ }
+}
+
+static int AskChanged(SplineFont *sf) {
+ int ret;
+ char *buts[4];
+ char *filename, *fontname;
+
+ if ( sf->cidmaster!=NULL )
+ sf = sf->cidmaster;
+
+ filename = sf->filename;
+ fontname = sf->fontname;
+
+ if ( filename==NULL && sf->origname!=NULL &&
+ sf->onlybitmaps && sf->bitmaps!=NULL && sf->bitmaps->next==NULL )
+ filename = sf->origname;
+ if ( filename==NULL ) filename = "untitled.sfd";
+ filename = GFileNameTail(filename);
+ buts[0] = GTK_STOCK_SAVE;
+ buts[1] = _("_Don't Save");
+ buts[2] = GTK_STOCK_CANCEL;
+ buts[3] = NULL;
+ ret = gwwv_ask( _("Font changed"),(const char **) buts,0,2,_("Font %1$.40s in file %2$.40s has been changed.\nDo you want to save it?"),fontname,filename);
+return( ret );
+}
+
+int _FVMenuGenerate(FontView *fv,int family) {
+ FVFlattenAllBitmapSelections(fv);
+return( SFGenerateFont(fv->b.sf,family,fv->b.normal==NULL?fv->b.map:fv->b.normal) );
+}
+
+void FontViewMenu_Generate(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ _FVMenuGenerate(fv,false);
+}
+
+void FontViewMenu_GenerateFamily(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ _FVMenuGenerate(fv,true);
+}
+
+extern int save_to_dir;
+
+static int SaveAs_FormatChange(GtkWidget *g, gpointer data) {
+ GtkWidget *dlg = gtk_widget_get_toplevel(g); /* !!!! Is this what I need???? */
+ char *oldname = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dlg));
+ int *_s2d = data;
+ int s2d = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g));
+ char *pt, *newname = galloc(strlen(oldname)+8);
+#ifdef VMS
+ char *pt2;
+
+ strcpy(newname,oldname);
+ pt = strrchr(newname,'.');
+ pt2 = strrchr(newname,'_');
+ if ( pt==NULL )
+ pt = pt2;
+ else if ( pt2!=NULL && pt<pt2 )
+ pt = pt2;
+ if ( pt==NULL )
+ pt = newname+strlen(newname);
+ strcpy(pt,s2d ? "_sfdir" : ".sfd" );
+#else
+ strcpy(newname,oldname);
+ pt = strrchr(newname,'.');
+ if ( pt==NULL )
+ pt = newname+strlen(newname);
+ strcpy(pt,s2d ? ".sfdir" : ".sfd" );
+#endif
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dlg),newname);
+ save_to_dir = *_s2d = s2d;
+ SavePrefs(true);
+return( true );
+}
+
+int _FVMenuSaveAs(FontView *fv) {
+ char *temp;
+ char *ret;
+ char *filename;
+ int ok;
+ int s2d = fv->b.cidmaster!=NULL ? fv->b.cidmaster->save_to_dir :
+ fv->b.sf->mm!=NULL ? fv->b.sf->mm->normal->save_to_dir :
+ fv->b.sf->save_to_dir;
+ gsize read, written;
+ GtkWidget *as_dir;
+
+ if ( fv->b.cidmaster!=NULL && fv->b.cidmaster->filename!=NULL )
+ temp=g_filename_to_utf8(fv->b.cidmaster->filename,-1,&read,&written,NULL);
+ else if ( fv->b.sf->mm!=NULL && fv->b.sf->mm->normal->filename!=NULL )
+ temp=g_filename_to_utf8(fv->b.sf->mm->normal->filename,-1,&read,&written,NULL);
+ else if ( fv->b.sf->filename!=NULL )
+ temp=g_filename_to_utf8(fv->b.sf->filename,-1,&read,&written,NULL);
+ else {
+ SplineFont *sf = fv->b.cidmaster?fv->b.cidmaster:
+ fv->b.sf->mm!=NULL?fv->b.sf->mm->normal:fv->b.sf;
+ char *fn = sf->defbasefilename ? sf->defbasefilename : sf->fontname;
+ temp = galloc((strlen(fn)+10));
+ strcpy(temp,fn);
+ if ( sf->defbasefilename!=NULL )
+ /* Don't add a default suffix, they've already told us what name to use */;
+ else if ( fv->b.cidmaster!=NULL )
+ strcat(temp,"CID");
+ else if ( sf->mm==NULL )
+ ;
+ else if ( sf->mm->apple )
+ strcat(temp,"Var");
+ else
+ strcat(temp,"MM");
+#ifdef VMS
+ strcat(temp,save_to_dir ? "_sfdir" : ".sfd");
+#else
+ strcat(temp,save_to_dir ? ".sfdir" : ".sfd");
+#endif
+ s2d = save_to_dir;
+ }
+
+ as_dir = gtk_check_button_new_with_mnemonic(_("Save as _Directory"));
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( as_dir ), s2d );
+ g_signal_connect (G_OBJECT(as_dir), "toggled",
+ G_CALLBACK (SaveAs_FormatChange),
+ &s2d);
+ ret = gwwv_save_filename_with_gadget(_("Save as"),temp,NULL,as_dir);
+ free(temp);
+ if ( ret==NULL )
+return( 0 );
+ filename = g_filename_from_utf8(ret,-1,&read,&written,NULL);
+ free(ret);
+ FVFlattenAllBitmapSelections(fv);
+ fv->b.sf->compression = 0;
+ ok = SFDWrite(filename,fv->b.sf,fv->b.map,fv->b.normal,s2d);
+ if ( ok ) {
+ SplineFont *sf = fv->b.cidmaster?fv->b.cidmaster:fv->b.sf->mm!=NULL?fv->b.sf->mm->normal:fv->b.sf;
+ free(sf->filename);
+ sf->filename = filename;
+ sf->save_to_dir = s2d;
+ free(sf->origname);
+ sf->origname = copy(filename);
+ sf->new = false;
+ if ( sf->mm!=NULL ) {
+ int i;
+ for ( i=0; i<sf->mm->instance_count; ++i ) {
+ free(sf->mm->instances[i]->filename);
+ sf->mm->instances[i]->filename = filename;
+ free(sf->mm->instances[i]->origname);
+ sf->mm->instances[i]->origname = copy(filename);
+ sf->mm->instances[i]->new = false;
+ }
+ }
+ SplineFontSetUnChanged(sf);
+ FVSetTitle( (FontViewBase *) fv);
+ } else
+ free(filename);
+return( ok );
+}
+
+void FontViewMenu_SaveAs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ _FVMenuSaveAs(fv);
+}
+
+int _FVMenuSave(FontView *fv) {
+ int ret = 0;
+ SplineFont *sf = fv->b.cidmaster?fv->b.cidmaster:
+ fv->b.sf->mm!=NULL?fv->b.sf->mm->normal:
+ fv->b.sf;
+
+ if ( sf->filename==NULL )
+ ret = _FVMenuSaveAs(fv);
+ else {
+ FVFlattenAllBitmapSelections(fv);
+ if ( !SFDWriteBak(sf,fv->b.map,fv->b.normal) )
+ gwwv_post_error(_("Save Failed"),_("Save Failed"));
+ else {
+ SplineFontSetUnChanged(sf);
+ ret = true;
+ }
+ }
+return( ret );
+}
+
+void FontViewMenu_Save(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ _FVMenuSave(fv);
+}
+
+void _FVCloseWindows(FontView *fv) {
+ int i, j;
+ BDFFont *bdf;
+ MetricsView *mv, *mnext;
+ SplineFont *sf = fv->b.cidmaster?fv->b.cidmaster:fv->b.sf->mm!=NULL?fv->b.sf->mm->normal : fv->b.sf;
+
+ PrintWindowClose();
+ if ( fv->b.nextsame==NULL && fv->b.sf->fv==(FontViewBase *) fv && fv->b.sf->kcld!=NULL )
+ KCLD_End(fv->b.sf->kcld);
+ if ( fv->b.nextsame==NULL && fv->b.sf->fv==(FontViewBase *) fv && fv->b.sf->vkcld!=NULL )
+ KCLD_End(fv->b.sf->vkcld);
+
+ for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
+ CharView *cv, *next;
+ for ( cv = (CharView *) sf->glyphs[i]->views; cv!=NULL; cv = next ) {
+ next = (CharView *) cv->b.next;
+ gtk_widget_destroy(cv->gw);
+ }
+ if ( sf->glyphs[i]->charinfo )
+ CharInfoDestroy(sf->glyphs[i]->charinfo);
+ }
+ if ( sf->mm!=NULL ) {
+ MMSet *mm = sf->mm;
+ for ( j=0; j<mm->instance_count; ++j ) {
+ SplineFont *sf = mm->instances[j];
+ for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
+ CharView *cv, *next;
+ for ( cv = (CharView *) sf->glyphs[i]->views; cv!=NULL; cv = next ) {
+ next = (CharView *) cv->b.next;
+ gtk_widget_destroy(cv->gw);
+ }
+ if ( sf->glyphs[i]->charinfo )
+ CharInfoDestroy(sf->glyphs[i]->charinfo);
+ }
+ for ( mv=sf->metrics; mv!=NULL; mv = mnext ) {
+ mnext = mv->next;
+ gtk_widget_destroy(mv->gw);
+ }
+ }
+ } else if ( sf->subfontcnt!=0 ) {
+ for ( j=0; j<sf->subfontcnt; ++j ) {
+ for ( i=0; i<sf->subfonts[j]->glyphcnt; ++i ) if ( sf->subfonts[j]->glyphs[i]!=NULL ) {
+ CharView *cv, *next;
+ for ( cv = (CharView *) sf->subfonts[j]->glyphs[i]->views; cv!=NULL; cv = next ) {
+ next = (CharView *) cv->b.next;
+ gtk_widget_destroy(cv->gw);
+ if ( sf->subfonts[j]->glyphs[i]->charinfo )
+ CharInfoDestroy(sf->subfonts[j]->glyphs[i]->charinfo);
+ }
+ }
+ for ( mv=sf->subfonts[j]->metrics; mv!=NULL; mv = mnext ) {
+ mnext = mv->next;
+ gtk_widget_destroy(mv->gw);
+ }
+ }
+ } else {
+ for ( mv=sf->metrics; mv!=NULL; mv = mnext ) {
+ mnext = mv->next;
+ gtk_widget_destroy(mv->gw);
+ }
+ }
+ for ( bdf = sf->bitmaps; bdf!=NULL; bdf=bdf->next ) {
+ for ( i=0; i<bdf->glyphcnt; ++i ) if ( bdf->glyphs[i]!=NULL ) {
+ BitmapView *bv, *next;
+ for ( bv = bdf->glyphs[i]->views; bv!=NULL; bv = next ) {
+ next = bv->next;
+ gtk_widget_destroy(bv->gw);
+ }
+ }
+ }
+ if ( fv->b.sf->fontinfo!=NULL )
+ FontInfoDestroy(fv->b.sf);
+ if ( fv->b.sf->valwin!=NULL )
+ ValidationDestroy(fv->b.sf);
+ SVDetachFV(fv);
+
+ g_main_context_iteration(NULL,true); /* Waits until all window destroy events are processed (I think) */
+}
+
+static int SFAnyChanged(SplineFont *sf) {
+ if ( sf->mm!=NULL ) {
+ MMSet *mm = sf->mm;
+ int i;
+ if ( mm->changed )
+return( true );
+ for ( i=0; i<mm->instance_count; ++i )
+ if ( sf->mm->instances[i]->changed )
+return( true );
+ /* Changes to the blended font aren't real (for adobe fonts) */
+ if ( mm->apple && mm->normal->changed )
+return( true );
+
+return( false );
+ } else
+return( sf->changed );
+}
+
+static int _FVMenuClose(FontView *fv) {
+ int i;
+ SplineFont *sf = fv->b.cidmaster?fv->b.cidmaster:fv->b.sf;
+
+ if ( !SFCloseAllInstrs(fv->b.sf) )
+return( false );
+
+ if ( fv->b.nextsame!=NULL || fv->b.sf->fv!=(FontViewBase *) fv ) {
+ /* There's another view, can close this one with no problems */
+ } else if ( SFAnyChanged(sf) ) {
+ i = AskChanged(fv->b.sf);
+ if ( i==2 ) /* Cancel */
+return( false );
+ if ( i==0 && !_FVMenuSave(fv)) /* Save */
+return(false);
+ else
+ SFClearAutoSave(sf); /* if they didn't save it, remove change record */
+ }
+ _FVCloseWindows(fv);
+ if ( sf->filename!=NULL )
+ RecentFilesRemember(sf->filename);
+ else if ( sf->origname!=NULL )
+ RecentFilesRemember(sf->origname);
+ if ( fv_list==fv && fv->b.next==NULL )
+exit( 0 );
+ gtk_widget_destroy(fv->gw);
+return( true );
+}
+
+void Menu_New(GtkMenuItem *menuitem, gpointer user_data) {
+ FontNew();
+}
+
+void FontViewMenu_Close(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ _FVMenuClose(fv);
+}
+
+gboolean FontView_RequestClose(GtkWidget *widget, GdkEvent *event,
+ gpointer user_data) {
+ FontView *fv = (FontView *) g_object_get_data(G_OBJECT(widget),"ffdata");
+
+ _FVMenuClose(fv);
+return( true );
+}
+
+gboolean FontView_DestroyWindow(GtkWidget *widget, GdkEvent *event,
+ gpointer user_data) {
+ FontView *fv = (FontView *) g_object_get_data(G_OBJECT(widget),"ffdata");
+
+ if ( fv_list==fv )
+ fv_list = (FontView *) (fv->b.next);
+ else {
+ FontView *n;
+ for ( n=fv_list; n->b.next!=&fv->b; n=(FontView *) (n->b.next) );
+ n->b.next = fv->b.next;
+ }
+ if ( fv_list!=NULL ) /* Freeing a large font can take forever, and if we're just going to exit there's no real reason to do so... */
+ FontViewFree(&fv->b);
+return( true );
+}
+
+gboolean FontView_ClearSelection(GtkWidget *widget, GdkEventSelection *event,
+ gpointer user_data) {
+ ClipboardClear();
+return( true );
+}
+
+static void FV_ReattachCVs(SplineFont *old,SplineFont *new) {
+ int i, j, pos;
+ CharView *cv, *cvnext;
+ SplineFont *sub;
+
+ for ( i=0; i<old->glyphcnt; ++i ) {
+ if ( old->glyphs[i]!=NULL && old->glyphs[i]->views!=NULL ) {
+ if ( new->subfontcnt==0 ) {
+ pos = SFFindExistingSlot(new,old->glyphs[i]->unicodeenc,old->glyphs[i]->name);
+ sub = new;
+ } else {
+ pos = -1;
+ for ( j=0; j<new->subfontcnt && pos==-1 ; ++j ) {
+ sub = new->subfonts[j];
+ pos = SFFindExistingSlot(sub,old->glyphs[i]->unicodeenc,old->glyphs[i]->name);
+ }
+ }
+ if ( pos==-1 ) {
+ for ( cv=(CharView *) old->glyphs[i]->views; cv!=NULL; cv = cvnext ) {
+ cvnext = (CharView *) cv->b.next;
+ gtk_widget_destroy(cv->gw);
+ }
+ } else {
+ for ( cv=(CharView *) old->glyphs[i]->views; cv!=NULL; cv = cvnext ) {
+ cvnext = (CharView *) cv->b.next;
+ CVChangeSC(cv,sub->glyphs[pos]);
+ cv->b.layerheads[dm_grid] = &new->grid;
+ }
+ }
+ }
+ }
+}
+
+void FontViewMenu_RevertFile(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVRevert((FontViewBase *) fv);
+}
+
+void FontViewMenu_RevertToBackup(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVRevertBackup((FontViewBase *) fv);
+}
+
+void FontViewMenu_RevertGlyph(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVRevertGlyph((FontViewBase *) fv);
+}
+
+void Menu_Preferences(GtkMenuItem *menuitem, gpointer user_data) {
+ DoPrefs();
+}
+
+void Menu_SaveAll(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv;
+
+ for ( fv = fv_list; fv!=NULL; fv = (FontView *) fv->b.next ) {
+ if ( SFAnyChanged(fv->b.sf) && !_FVMenuSave(fv))
+return;
+ }
+}
+
+static void _MenuExit(void *junk) {
+ FontView *fv, *next;
+
+ for ( fv = fv_list; fv!=NULL; fv = next ) {
+ next = (FontView *) fv->b.next;
+ if ( !_FVMenuClose(fv))
+return;
+ }
+ exit(0);
+}
+
+void Menu_Quit(GtkMenuItem *menuitem, gpointer user_data) {
+ _MenuExit(NULL);
+}
+
+char *GetPostscriptFontName(char *dir, int mult) {
+ gsize read, written;
+ char *u_dir=NULL, *ret, *temp=NULL;
+
+ if ( dir!=NULL )
+ u_dir = g_filename_to_utf8(dir,-1,&read,&written,NULL);
+ ret = FVOpenFont(_("Open Font"), u_dir,mult);
+ if ( ret!=NULL )
+ temp = g_filename_from_utf8(ret,-1,&read,&written,NULL);
+ free(u_dir); free(ret);
+
+return( temp );
+}
+
+void MergeKernInfo(SplineFont *sf,EncMap *map) {
+#ifndef __Mac
+ static char wild[] = "*.{afm,tfm,ofm,pfm,bin,hqx,dfont,fea}";
+ static char wild2[] = "*.{afm,amfm,tfm,ofm,pfm,bin,hqx,dfont,fea}";
+#else
+ static char wild[] = "*"; /* Mac resource files generally don't have extensions */
+ static char wild2[] = "*";
+#endif
+ char *ret = gwwv_open_filename(_("Merge Feature Info"),NULL,
+ sf->mm!=NULL?wild2:wild);
+ char *temp;
+ gsize read, written;
+
+ if ( ret==NULL ) /* Cancelled */
+return;
+ temp = g_filename_from_utf8(ret,-1,&read,&written,NULL);
+
+ if ( !LoadKerningDataFromMetricsFile(sf,temp,map))
+ gwwv_post_error( _("Failed to load kern data from %s"), ret);
+ free(ret);
+ free(temp);
+}
+
+void FontViewMenu_MergeKern(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ MergeKernInfo(fv->b.sf,fv->b.map);
+}
+
+void Menu_Open(GtkMenuItem *menuitem, gpointer user_data) {
+ char *temp;
+ char *eod, *fpt, *file, *full;
+ FontViewBase *test; int fvcnt, fvtest;
+
+ for ( fvcnt=0, test=(FontViewBase *) fv_list; test!=NULL; ++fvcnt, test=test->next );
+ do {
+ temp = GetPostscriptFontName(NULL,true);
+ if ( temp==NULL )
+return;
+ eod = strrchr(temp,'/');
+ *eod = '\0';
+ file = eod+1;
+ do {
+ fpt = strstr(file,"; ");
+ if ( fpt!=NULL ) *fpt = '\0';
+ full = galloc(strlen(temp)+1+strlen(file)+1);
+ strcpy(full,temp); strcat(full,"/"); strcat(full,file);
+ ViewPostscriptFont(full);
+ file = fpt+2;
+ free(full);
+ } while ( fpt!=NULL );
+ free(temp);
+ for ( fvtest=0, test=(FontViewBase *) fv_list; test!=NULL; ++fvtest, test=test->next );
+ } while ( fvtest==fvcnt ); /* did the load fail for some reason? try again */
+}
+
+void FontViewMenu_ContextualHelp(GtkMenuItem *menuitem, gpointer user_data) {
+ help("fontview.html");
+}
+
+void MenuHelp_Help(GtkMenuItem *menuitem, gpointer user_data) {
+ help("overview.html");
+}
+
+void MenuHelp_Index(GtkMenuItem *menuitem, gpointer user_data) {
+ help("IndexFS.html");
+}
+
+void MenuHelp_License(GtkMenuItem *menuitem, gpointer user_data) {
+ help("license.html");
+}
+
+void MenuHelp_About(GtkMenuItem *menuitem, gpointer user_data) {
+ ShowAboutScreen();
+}
+
+void FontViewMenu_Import(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int empty = fv->b.sf->onlybitmaps && fv->b.sf->bitmaps==NULL;
+ BDFFont *bdf;
+ FVImport(fv);
+ if ( empty && fv->b.sf->bitmaps!=NULL ) {
+ for ( bdf= fv->b.sf->bitmaps; bdf->next!=NULL; bdf = bdf->next );
+ FVChangeDisplayBitmap((FontViewBase *) fv,bdf);
+ }
+}
+
+static int FVSelCount(FontView *fv) {
+ int i, cnt=0;
+
+ for ( i=0; i<fv->b.map->enccount; ++i )
+ if ( fv->b.selected[i] ) ++cnt;
+ if ( cnt>10 ) {
+ static char *buts[] = { GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL };
+ if ( gwwv_ask(_("Many Windows"),(const char **) buts,0,1,_("This involves opening more than 10 windows.\nIs that really what you want?"))==1 )
+return( false );
+ }
+return( true );
+}
+
+void FontViewMenu_OpenOutline(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i;
+ SplineChar *sc;
+
+ if ( !FVSelCount(fv))
+return;
+ for ( i=0; i<fv->b.map->enccount; ++i )
+ if ( fv->b.selected[i] ) {
+ sc = FVMakeChar(fv,i);
+ CharViewCreate(sc,fv,i);
+ }
+}
+
+void FontViewMenu_OpenBitmap(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i;
+ SplineChar *sc;
+
+ if ( fv->b.cidmaster==NULL ? (fv->b.sf->bitmaps==NULL) : (fv->b.cidmaster->bitmaps==NULL) )
+return;
+ if ( !FVSelCount(fv))
+return;
+ for ( i=0; i<fv->b.map->enccount; ++i )
+ if ( fv->b.selected[i] ) {
+ sc = FVMakeChar(fv,i);
+ if ( sc!=NULL )
+ BitmapViewCreatePick(i,fv);
+ }
+}
+
+void WindowMenu_Warnings(GtkMenuItem *menuitem, gpointer user_data) {
+ ShowErrorWindow();
+}
+
+void FontViewMenu_OpenMetrics(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ MetricsViewCreate(fv,NULL,fv->filled==fv->show?NULL:fv->show);
+}
+
+void FontViewMenu_Print(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ PrintDlg(fv,NULL,NULL);
+}
+
+#if !defined(_NO_FFSCRIPT) || !defined(_NO_PYTHON)
+void FontViewMenu_ExecScript(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ ScriptDlg(fv,NULL);
+}
+#endif
+
+void FontViewMenu_FontInfo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FontMenuFontInfo(fv);
+}
+
+void FontViewMenu_MathInfo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SFMathDlg(fv->b.sf);
+}
+
+void FontViewMenu_FindProbs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FindProblems(fv,NULL,NULL);
+}
+
+void FontViewMenu_Validate(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SFValidationWindow(fv->b.sf,ff_none);
+}
+
+void FontViewMenu_ChangeWeight(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ EmboldenDlg(fv,NULL);
+}
+
+void FontViewMenu_Oblique(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ ObliqueDlg(fv,NULL);
+}
+
+void FontViewMenu_Condense(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ CondenseExtendDlg(fv,NULL);
+}
+
+/* returns -1 if nothing selected, if exactly one char return it, -2 if more than one */
+static int FVAnyCharSelected(FontView *fv) {
+ int i, val=-1;
+
+ for ( i=0; i<fv->b.map->enccount; ++i ) {
+ if ( fv->b.selected[i]) {
+ if ( val==-1 )
+ val = i;
+ else
+return( -2 );
+ }
+ }
+return( val );
+}
+
+static int FVAllSelected(FontView *fv) {
+ int i, any = false;
+ /* Is everything real selected? */
+
+ for ( i=0; i<fv->b.sf->glyphcnt; ++i ) if ( SCWorthOutputting(fv->b.sf->glyphs[i])) {
+ if ( !fv->b.selected[fv->b.map->backmap[i]] )
+return( false );
+ any = true;
+ }
+return( any );
+}
+
+void FontViewMenu_CopyFromAll(GtkMenuItem *menuitem, gpointer user_data) {
+
+ onlycopydisplayed = false;
+ SavePrefs(true);
+}
+
+void FontViewMenu_CopyFromDisplayed(GtkMenuItem *menuitem, gpointer user_data) {
+
+ onlycopydisplayed = true;
+ SavePrefs(true);
+}
+
+void FontViewMenu_CopyFromMetadata(GtkMenuItem *menuitem, gpointer user_data) {
+
+ copymetadata = !copymetadata;
+ SavePrefs(true);
+}
+
+void FontViewMenu_CopyFromTTInstrs(GtkMenuItem *menuitem, gpointer user_data) {
+
+ copyttfinstr = !copyttfinstr;
+ SavePrefs(true);
+}
+
+void FontViewMenu_Copy(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ FVCopy((FontViewBase *) fv,ct_fullcopy);
+}
+
+void FontViewMenu_CopyLookupData(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ FVCopy((FontViewBase *) fv,ct_lookups);
+}
+
+void FontViewMenu_CopyRef(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ FVCopy((FontViewBase *) fv,ct_reference);
+}
+
+void FontViewMenu_CopyWidth(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ FVCopyWidth((FontViewBase *) fv,ut_width);
+}
+
+void FontViewMenu_CopyVWidth(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ if ( !fv->b.sf->hasvmetrics )
+return;
+ FVCopyWidth((FontViewBase *) fv,ut_vwidth);
+}
+
+void FontViewMenu_CopyLBearing(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ FVCopyWidth((FontViewBase *) fv,ut_lbearing);
+}
+
+void FontViewMenu_CopyRBearing(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ FVCopyWidth((FontViewBase *) fv,ut_rbearing);
+}
+
+void FontViewMenu_Paste(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ PasteIntoFV((FontViewBase *) fv,false,NULL);
+}
+
+void FontViewMenu_PasteInto(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ PasteIntoFV((FontViewBase *) fv,true,NULL);
+}
+
+#ifdef FONTFORGE_CONFIG_PASTEAFTER
+void FontViewMenu_PasteAfter(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int pos = FVAnyCharSelected(fv);
+ if ( pos<0 )
+return;
+ PasteIntoFV((FontViewBase *) fv,2,NULL);
+}
+#endif
+
+void FontViewMenu_SameGlyphAs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSameGlyphAs((FontViewBase *) fv);
+}
+
+void FontViewMenu_CopyFg2Bg(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVCopyFgtoBg( (FontViewBase *) fv );
+}
+
+void FontViewMenu_Clear(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVClear( (FontViewBase *) fv );
+}
+
+void FontViewMenu_ClearBackground(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVClearBackground( (FontViewBase *) fv );
+}
+
+void FontViewMenu_Join(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVJoin( (FontViewBase *) fv );
+}
+
+void FontViewMenu_UnlinkRef(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVUnlinkRef( (FontViewBase *) fv );
+}
+
+void FontViewMenu_RemoveUndoes(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SFRemoveUndoes(fv->b.sf,fv->b.selected,fv->b.map);
+}
+
+void FontViewMenu_Undo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVUndo((FontViewBase *) fv);
+}
+
+void FontViewMenu_Redo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVRedo((FontViewBase *) fv);
+}
+
+void FontViewMenu_Cut(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVCopy((FontViewBase *) fv,ct_fullcopy);
+ FVClear((FontViewBase *) fv);
+}
+
+void FontViewMenu_SelectAll(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectAll(fv);
+}
+
+void FontViewMenu_InvertSelection(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVInvertSelection(fv);
+}
+
+void FontViewMenu_DeselectAll(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVDeselectAll(fv);
+}
+
+void FontViewMenu_SelectByName(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectByName(fv);
+}
+
+void FontViewMenu_SelectByScript(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectByScript(fv);
+}
+
+void FontViewMenu_SelectWorthOutputting(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i, gid;
+ EncMap *map = fv->b.map;
+ SplineFont *sf = fv->b.sf;
+
+ for ( i=0; i< map->enccount; ++i )
+ fv->b.selected[i] = ( (gid=map->map[i])!=-1 && sf->glyphs[gid]!=NULL &&
+ SCWorthOutputting(sf->glyphs[gid]) );
+ gtk_widget_queue_draw(fv->v);
+}
+
+void FontViewMenu_SelectChangedGlyphs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i, gid;
+ EncMap *map = fv->b.map;
+ SplineFont *sf = fv->b.sf;
+
+ for ( i=0; i< map->enccount; ++i )
+ fv->b.selected[i] = ( (gid=map->map[i])!=-1 && sf->glyphs[gid]!=NULL && sf->glyphs[gid]->changed );
+ gtk_widget_queue_draw(fv->v);
+}
+
+void FontViewMenu_SelectUnhintedGlyphs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i, gid;
+ EncMap *map = fv->b.map;
+ SplineFont *sf = fv->b.sf;
+ int order2 = sf->order2;
+
+ for ( i=0; i< map->enccount; ++i )
+ fv->b.selected[i] = ( (gid=map->map[i])!=-1 && sf->glyphs[gid]!=NULL &&
+ ((!order2 && sf->glyphs[gid]->changedsincelasthinted ) ||
+ ( order2 && sf->glyphs[gid]->layers[ly_fore].splines!=NULL &&
+ sf->glyphs[gid]->ttf_instrs_len<=0 ) ||
+ ( order2 && sf->glyphs[gid]->instructions_out_of_date )) );
+ gtk_widget_queue_draw(fv->v);
+}
+
+void FontViewMenu_SelectAutohintable(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i, gid;
+ EncMap *map = fv->b.map;
+ SplineFont *sf = fv->b.sf;
+
+ for ( i=0; i< map->enccount; ++i )
+ fv->b.selected[i] = (gid=map->map[i])!=-1 && sf->glyphs[gid]!=NULL &&
+ !sf->glyphs[gid]->manualhints;
+ gtk_widget_queue_draw(fv->v);
+}
+
+void FontViewMenu_SelectDefault(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,COLOR_DEFAULT,false);
+}
+
+void FontViewMenu_SelectWhite(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,0xffffff,false);
+}
+
+void FontViewMenu_SelectRed(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,0xff0000,false);
+}
+
+void FontViewMenu_SelectGreen(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,0x00ff00,false);
+}
+
+void FontViewMenu_SelectBlue(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,0x0000ff,false);
+}
+
+void FontViewMenu_SelectYellow(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,0xffff00,false);
+}
+
+void FontViewMenu_SelectCyan(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,0x00ffff,false);
+}
+
+void FontViewMenu_SelectMagenta(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectColor(fv,0xff00ff,false);
+}
+
+void FontViewMenu_SelectColorPicker(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ GtkWidget *color_picker = gtk_color_selection_dialog_new(_("Select Color"));
+ GtkWidget *color_sel = GTK_COLOR_SELECTION_DIALOG( color_picker )->colorsel;
+ static GdkColor last_col;
+
+ gtk_color_selection_set_current_color(
+ GTK_COLOR_SELECTION( color_sel ), &last_col );
+ if (gtk_dialog_run( GTK_DIALOG( color_picker )) == GTK_RESPONSE_ACCEPT) {
+ gtk_color_selection_get_current_color(
+ GTK_COLOR_SELECTION( color_sel ), &last_col );
+ FVSelectColor(fv,((last_col.red>>8)<<16) |
+ ((last_col.green>>8)<<8) |
+ (last_col.blue>>8),
+ false);
+ }
+ gtk_widget_destroy( color_picker );
+}
+
+void FontViewMenu_SelectByLookupSubtable(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVSelectByPST(fv);
+}
+
+static void FVReplaceOutlineWithReference( FontView *fv, double fudge ) {
+
+ if ( fv->v!=NULL )
+ gdk_window_set_cursor(fv->v->window,ct_watch);
+
+ FVBReplaceOutlineWithReference((FontViewBase *) fv, fudge);
+
+ if ( fv->v!=NULL ) {
+ gtk_widget_queue_draw(fv->v);
+ gdk_window_set_cursor(fv->v->window,ct_pointer);
+ }
+}
+
+void FontViewMenu_FindRpl(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SVCreate(fv);
+}
+
+void FontViewMenu_RplRef(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVReplaceOutlineWithReference(fv,.001);
+}
+
+void FontViewMenu_CharInfo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int pos = FVAnyCharSelected(fv);
+ if ( pos<0 )
+return;
+ if ( fv->b.cidmaster!=NULL &&
+ (fv->b.map->map[pos]==-1 || fv->b.sf->glyphs[fv->b.map->map[pos]]==NULL ))
+return;
+ SCCharInfo(SFMakeChar(fv->b.sf,fv->b.map,pos),fv->b.map,pos);
+}
+
+void FontViewMenu_BDFInfo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( fv->b.sf->bitmaps==NULL )
+return;
+ if ( fv->show!=fv->filled )
+ SFBdfProperties(fv->b.sf,fv->b.map,fv->show);
+ else
+ SFBdfProperties(fv->b.sf,fv->b.map,NULL);
+}
+
+void FontViewMenu_GlyphRename(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVMassGlyphRename(fv);
+}
+
+void FontViewMenu_ShowDependentRefs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int pos = FVAnyCharSelected(fv);
+ SplineChar *sc;
+
+ if ( pos<0 || fv->b.map->map[pos]==-1 )
+return;
+ sc = fv->b.sf->glyphs[fv->b.map->map[pos]];
+ if ( sc==NULL || sc->dependents==NULL )
+return;
+ SCRefBy(sc);
+}
+
+void FontViewMenu_ShowDependentSubs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int pos = FVAnyCharSelected(fv);
+ SplineChar *sc;
+
+ if ( pos<0 || fv->b.map->map[pos]==-1 )
+return;
+ sc = fv->b.sf->glyphs[fv->b.map->map[pos]];
+ if ( sc==NULL )
+return;
+ SCSubBy(sc);
+}
+
+static int getorigin(void *d,BasePoint *base,int index) {
+ /*FontView *fv = (FontView *) d;*/
+
+ base->x = base->y = 0;
+ switch ( index ) {
+ case 0: /* Character origin */
+ /* all done */
+ break;
+ case 1: /* Center of selection */
+ /*CVFindCenter(cv,base,!CVAnySel(cv,NULL,NULL,NULL,NULL));*/
+ break;
+ default:
+return( false );
+ }
+return( true );
+}
+
+static void FVDoTransform(FontView *fv) {
+ int flags=0x3;
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ if ( FVAllSelected(fv))
+ flags = 0x7;
+ TransformDlgCreate(fv,FVTransFunc,getorigin,flags,cvt_none);
+}
+
+void FontViewMenu_Transform(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVDoTransform(fv);
+}
+
+void FontViewMenu_PointOfView(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ struct pov_data pov_data;
+ if ( FVAnyCharSelected(fv)==-1 || fv->b.sf->onlybitmaps )
+return;
+ if ( PointOfViewDlg(&pov_data,fv->b.sf,false)==-1 )
+return;
+ FVPointOfView((FontViewBase *) fv,&pov_data);
+}
+
+void FontViewMenu_NonLinearTransform(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( FVAnyCharSelected(fv)==-1 || fv->b.sf->onlybitmaps )
+return;
+ NonLinearDlg(fv,NULL);
+}
+
+void FontViewMenu_BitmapsAvail(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ BitmapDlg(fv,NULL,true );
+}
+
+void FontViewMenu_RegenBitmaps(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ BitmapDlg(fv,NULL,false );
+}
+
+void FontViewMenu_RemoveBitmapGlyphs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ BitmapDlg(fv,NULL,-1 );
+}
+
+void FontViewMenu_ExpandStroke(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ FVStroke(fv);
+}
+
+void FontViewMenu_TilePath(GtkMenuItem *menuitem, gpointer user_data) {
+# ifdef FONTFORGE_CONFIG_TILEPATH
+ FontView *fv = FV_From_MI(menuitem);
+ FVTile(fv);
+# endif
+}
+
+void FontViewMenu_RemoveOverlap(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ /* We know it's more likely that we'll find a problem in the overlap code */
+ /* than anywhere else, so let's save the current state against a crash */
+ DoAutoSaves();
+
+ FVOverlap((FontViewBase *) fv,over_remove);
+}
+
+void FontViewMenu_Intersect(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ DoAutoSaves();
+ FVOverlap((FontViewBase *) fv,over_intersect);
+}
+
+void FontViewMenu_FindInter(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVOverlap((FontViewBase *) fv,over_findinter);
+}
+
+void FontViewMenu_Inline(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ OutlineDlg(fv,NULL,NULL,true);
+}
+
+void FontViewMenu_Outline(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ OutlineDlg(fv,NULL,NULL,false);
+}
+
+void FontViewMenu_Shadow(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ ShadowDlg(fv,NULL,NULL,false);
+}
+
+void FontViewMenu_WireFrame(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ ShadowDlg(fv,NULL,NULL,true);
+}
+
+static void FVSimplify(FontView *fv,int type) {
+ static struct simplifyinfo smpls[] = {
+ { sf_normal },
+ { sf_normal,.75,.05,0,-1 },
+ { sf_normal,.75,.05,0,-1 }};
+ struct simplifyinfo *smpl = &smpls[type+1];
+
+ if ( smpl->linelenmax==-1 || (type==0 && !smpl->set_as_default)) {
+ smpl->err = (fv->b.sf->ascent+fv->b.sf->descent)/1000.;
+ smpl->linelenmax = (fv->b.sf->ascent+fv->b.sf->descent)/100.;
+ }
+
+ if ( type==1 ) {
+ if ( !SimplifyDlg(fv->b.sf,smpl))
+return;
+ if ( smpl->set_as_default )
+ smpls[1] = *smpl;
+ }
+ _FVSimplify((FontViewBase *) fv,smpl);
+}
+
+void FontViewMenu_Simplify(GtkMenuItem *menuitem, gpointer user_data) {
+ FVSimplify( (FontView *) FV_From_MI(menuitem), false);
+}
+
+void FontViewMenu_SimplifyMore(GtkMenuItem *menuitem, gpointer user_data) {
+ FVSimplify( (FontView *) FV_From_MI(menuitem), true);
+}
+
+void FontViewMenu_Cleanup(GtkMenuItem *menuitem, gpointer user_data) {
+ FVSimplify( (FontView *) FV_From_MI(menuitem), -1);
+}
+
+void FontViewMenu_CanonicalStart(GtkMenuItem *menuitem, gpointer user_data) {
+ FVCanonicalStart( (FontViewBase *) FV_From_MI(menuitem));
+}
+
+void FontViewMenu_CanonicalContours(GtkMenuItem *menuitem, gpointer user_data) {
+ FVCanonicalContours( (FontViewBase *) FV_From_MI(menuitem));
+}
+
+void FontViewMenu_AddExtrema(GtkMenuItem *menuitem, gpointer user_data) {
+ FVAddExtrema( (FontViewBase *) FV_From_MI(menuitem) );
+}
+
+void FontViewMenu_CorrectDir(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVCorrectDir((FontViewBase *) fv);
+}
+
+void FontViewMenu_RoundToInt(GtkMenuItem *menuitem, gpointer user_data) {
+ FVRound2Int( (FontViewBase *) FV_From_MI(menuitem), 1.0);
+}
+
+void FontViewMenu_RoundToHundredths(GtkMenuItem *menuitem, gpointer user_data) {
+ FVRound2Int( (FontViewBase *) FV_From_MI(menuitem),100.0);
+}
+
+void FontViewMenu_Cluster(GtkMenuItem *menuitem, gpointer user_data) {
+ FVCluster( (FontViewBase *) FV_From_MI(menuitem));
+}
+
+void FontViewMenu_Autotrace(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( fv->v!=NULL )
+ gdk_window_set_cursor(fv->v->window,ct_watch);
+ FVAutoTrace((FontViewBase *) fv,false);
+ if ( fv->v!=NULL )
+ gdk_window_set_cursor(fv->v->window,ct_pointer);
+}
+
+void FontViewMenu_BuildAccented(GtkMenuItem *menuitem, gpointer user_data) {
+ FVBuildAccent( (FontViewBase *) FV_From_MI(menuitem), true );
+}
+
+void FontViewMenu_BuildComposite(GtkMenuItem *menuitem, gpointer user_data) {
+ FVBuildAccent( (FontViewBase *) FV_From_MI(menuitem), false );
+}
+
+#if 0
+void FontViewMenu_BuildDuplicatem(GtkMenuItem *menuitem, gpointer user_data) {
+ FVBuildDuplicate( (FontViewBase *) FV_From_MI(menuitem));
+}
+#endif
+
+#ifdef KOREAN
+void FontViewMenu_ShowGroup(GtkMenuItem *menuitem, gpointer user_data) {
+ ShowGroup( ((FontView *) FV_From_MI(menuitem))->b.sf );
+}
+#endif
+
+#if HANYANG
+static void FontViewMenu_ModifyComposition(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( fv->b.sf->rules!=NULL )
+ SFModifyComposition(fv->b.sf);
+}
+
+static void FontViewMenu_BuildSyllables(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ if ( fv->b.sf->rules!=NULL )
+ SFBuildSyllables(fv->b.sf);
+}
+#endif
+
+void FontViewMenu_CompareFonts(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FontCompareDlg(fv);
+}
+
+void FontViewMenu_MergeFonts(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVMergeFonts(fv);
+}
+
+void FontViewMenu_Interpolate(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVInterpolateFonts(fv);
+}
+
+static void FVShowInfo(FontView *fv) {
+ if ( fv->v==NULL ) /* Can happen in scripts */
+return;
+
+ gtk_widget_queue_draw(fv->status);
+}
+
+void FVChangeChar(FontView *fv,int i) {
+
+ if ( i!=-1 ) {
+ FVDeselectAll(fv);
+ fv->b.selected[i] = true;
+ fv->sel_index = 1;
+ fv->end_pos = fv->pressed_pos = i;
+ FVScrollToChar(fv,i);
+ FVShowInfo(fv);
+ }
+}
+
+void FVScrollToChar(FontView *fv,int i) {
+ GtkAdjustment *sb;
+
+ if ( fv->v==NULL || fv->colcnt==0 ) /* Can happen in scripts */
+return;
+
+ if ( i!=-1 ) {
+ if ( i/fv->colcnt<fv->rowoff || i/fv->colcnt >= fv->rowoff+fv->rowcnt ) {
+ fv->rowoff = i/fv->colcnt;
+ if ( fv->rowcnt>= 3 )
+ --fv->rowoff;
+ if ( fv->rowoff+fv->rowcnt>=fv->rowltot )
+ fv->rowoff = fv->rowltot-fv->rowcnt;
+ if ( fv->rowoff<0 ) fv->rowoff = 0;
+ sb = gtk_range_get_adjustment(GTK_RANGE(fv->vsb));
+ sb->value = fv->rowoff;
+ gtk_range_set_adjustment(GTK_RANGE(fv->vsb),sb);
+ gtk_widget_queue_draw(fv->v);
+ }
+ }
+}
+
+static void FVScrollToGID(FontView *fv,int gid) {
+ FVScrollToChar(fv,fv->b.map->backmap[gid]);
+}
+
+static void FV_ChangeGID(FontView *fv,int gid) {
+ FVChangeChar(fv,fv->b.map->backmap[gid]);
+}
+
+void FontViewMenu_ChangeChar(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *sf = fv->b.sf;
+ EncMap *map = fv->b.map;
+ int pos = FVAnyCharSelected(fv);
+
+ if ( pos>=0 ) {
+ if ( strcmp(gtk_widget_get_name(GTK_WIDGET(menuitem)),"next_glyph1")==0 )
+ ++pos;
+ if ( strcmp(gtk_widget_get_name(GTK_WIDGET(menuitem)),"prev_glyph1")==0 )
+ --pos;
+ else if ( strcmp(gtk_widget_get_name(GTK_WIDGET(menuitem)),"next_defined_glyph1")==0 ) {
+ for ( ++pos; pos<map->enccount &&
+ (map->map[pos]==-1 || !SCWorthOutputting(sf->glyphs[map->map[pos]]) ||
+ (fv->show!=fv->filled && fv->show->glyphs[map->map[pos]]==NULL ));
+ ++pos );
+ if ( pos>=map->enccount ) {
+ int selpos = FVAnyCharSelected(fv);
+ char *iconv_name = map->enc->iconv_name ? map->enc->iconv_name :
+ map->enc->enc_name;
+ if ( strstr(iconv_name,"2022")!=NULL && selpos<0x2121 )
+ pos = 0x2121;
+ else if ( strstr(iconv_name,"EUC")!=NULL && selpos<0xa1a1 )
+ pos = 0xa1a1;
+ else if ( map->enc->is_tradchinese ) {
+ if ( strstrmatch(map->enc->enc_name,"HK")!=NULL &&
+ selpos<0x8140 )
+ pos = 0x8140;
+ else
+ pos = 0xa140;
+ } else if ( map->enc->is_japanese ) {
+ if ( strstrmatch(iconv_name,"SJIS")!=NULL ||
+ (strstrmatch(iconv_name,"JIS")!=NULL && strstrmatch(iconv_name,"SHIFT")!=NULL )) {
+ if ( selpos<0x8100 )
+ pos = 0x8100;
+ else if ( selpos<0xb000 )
+ pos = 0xb000;
+ }
+ } else if ( map->enc->is_korean ) {
+ if ( strstrmatch(iconv_name,"JOHAB")!=NULL ) {
+ if ( selpos<0x8431 )
+ pos = 0x8431;
+ } else { /* Wansung, EUC-KR */
+ if ( selpos<0xa1a1 )
+ pos = 0xa1a1;
+ }
+ } else if ( map->enc->is_simplechinese ) {
+ if ( strmatch(iconv_name,"EUC-CN")==0 && selpos<0xa1a1 )
+ pos = 0xa1a1;
+ }
+ if ( pos>=map->enccount )
+return;
+ }
+ } else if ( strcmp(gtk_widget_get_name(GTK_WIDGET(menuitem)),"prev_defined_glyph1")==0 ) {
+ for ( --pos; pos>=0 &&
+ (map->map[pos]==-1 || !SCWorthOutputting(sf->glyphs[map->map[pos]]) ||
+ (fv->show!=fv->filled && fv->show->glyphs[map->map[pos]]==NULL ));
+ --pos );
+ if ( pos<0 )
+return;
+ }
+ }
+ if ( pos<0 ) pos = map->enccount-1;
+ else if ( pos>= map->enccount ) pos = 0;
+ if ( pos>=0 && pos<map->enccount )
+ FVChangeChar(fv,pos);
+}
+
+static void FVShowSubFont(FontView *fv,SplineFont *new) {
+ MetricsView *mv, *mvnext;
+ BDFFont *newbdf;
+ int wascompact = fv->b.normal!=NULL;
+ extern int use_freetype_to_rasterize_fv;
+
+ for ( mv=fv->b.sf->metrics; mv!=NULL; mv = mvnext ) {
+ /* Don't bother trying to fix up metrics views, just not worth it */
+ mvnext = mv->next;
+ gtk_widget_destroy(mv->gw);
+ }
+ if ( wascompact ) {
+ EncMapFree(fv->b.map);
+ fv->b.map = fv->b.normal;
+ fv->b.normal = NULL;
+ fv->b.selected = grealloc(fv->b.selected,fv->b.map->enccount);
+ memset(fv->b.selected,0,fv->b.map->enccount);
+ }
+ CIDSetEncMap((FontViewBase *) fv,new);
+ if ( wascompact ) {
+ fv->b.normal = EncMapCopy(fv->b.map);
+ CompactEncMap(fv->b.map,fv->b.sf);
+ FontViewReformatOne(&fv->b);
+ FVSetTitle( (FontViewBase *) &fv->b);
+ }
+ newbdf = SplineFontPieceMeal(fv->b.sf,fv->filled->pixelsize,
+ (fv->antialias?pf_antialias:0)|(fv->bbsized?pf_bbsized:0)|
+ (use_freetype_to_rasterize_fv && !fv->b.sf->strokedfont && !fv->b.sf->multilayer?pf_ft_nohints:0),
+ NULL);
+ BDFFontFree(fv->filled);
+ if ( fv->filled == fv->show )
+ fv->show = newbdf;
+ fv->filled = newbdf;
+ gtk_widget_queue_draw(fv->v);
+}
+
+void FontViewMenu_Goto(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int pos = GotoChar(fv->b.sf,fv->b.map);
+ if ( fv->b.cidmaster!=NULL && pos!=-1 && !fv->b.map->enc->is_compact ) {
+ SplineFont *cidmaster = fv->b.cidmaster;
+ int k, hadk= cidmaster->subfontcnt;
+ for ( k=0; k<cidmaster->subfontcnt; ++k ) {
+ SplineFont *sf = cidmaster->subfonts[k];
+ if ( pos<sf->glyphcnt && sf->glyphs[pos]!=NULL )
+ break;
+ if ( pos<sf->glyphcnt )
+ hadk = k;
+ }
+ if ( k==cidmaster->subfontcnt && pos>=fv->b.sf->glyphcnt )
+ k = hadk;
+ if ( k!=cidmaster->subfontcnt && cidmaster->subfonts[k] != fv->b.sf )
+ FVShowSubFont(fv,cidmaster->subfonts[k]);
+ if ( pos>=fv->b.sf->glyphcnt )
+ pos = -1;
+ }
+ FVChangeChar(fv,pos);
+}
+
+void FontViewMenu_Ligatures(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SFShowLigatures(fv->b.sf,NULL);
+}
+
+void FontViewMenu_KernPairs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SFKernClassTempDecompose(fv->b.sf,false);
+ SFShowKernPairs(fv->b.sf,NULL,NULL);
+ SFKernCleanup(fv->b.sf,false);
+}
+
+static void FontViewMenu_AnchoredPairs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SFShowKernPairs(fv->b.sf,NULL,user_data);
+}
+
+void FontViewMenu_ShowAtt(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ ShowAtt(fv->b.sf);
+}
+
+void FontViewMenu_DisplaySubstitutions(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ if ( fv->cur_subtable!=0 ) {
+ fv->cur_subtable = NULL;
+ } else {
+ SplineFont *sf = fv->b.sf;
+ OTLookup *otf;
+ struct lookup_subtable *sub;
+ int cnt, k;
+ char **names = NULL;
+ if ( sf->cidmaster ) sf=sf->cidmaster;
+ for ( k=0; k<2; ++k ) {
+ cnt = 0;
+ for ( otf = sf->gsub_lookups; otf!=NULL; otf=otf->next ) {
+ if ( otf->lookup_type==gsub_single ) {
+ for ( sub=otf->subtables; sub!=NULL; sub=sub->next ) {
+ if ( names )
+ names[cnt] = sub->subtable_name;
+ ++cnt;
+ }
+ }
+ }
+ if ( cnt==0 )
+ break;
+ if ( names==NULL )
+ names = galloc((cnt+3) * sizeof(char *));
+ else {
+ names[cnt++] = "-";
+ names[cnt++] = _("New Lookup Subtable...");
+ names[cnt] = NULL;
+ }
+ }
+ sub = NULL;
+ if ( names!=NULL ) {
+ int ret = gwwv_choose(_("Display Substitution..."), (const char **) names, cnt, 0,
+ _("Pick a substitution to display in the window."));
+ if ( ret!=-1 )
+ sub = SFFindLookupSubtable(sf,names[ret]);
+ free(names);
+ if ( ret==-1 )
+return;
+ }
+ if ( sub==NULL )
+ sub = SFNewLookupSubtableOfType(sf,gsub_single,NULL);
+ if ( sub!=NULL )
+ fv->cur_subtable = sub;
+ }
+ gtk_widget_queue_draw(fv->v);
+}
+
+static void FVChangeDisplayFont(FontView *fv,BDFFont *bdf) {
+ int samesize=0;
+ int rcnt, ccnt;
+ int oldr, oldc;
+ int first_time = fv->show==NULL;
+
+ if ( fv->v==NULL ) /* Can happen in scripts */
+return;
+
+ if ( fv->show!=bdf ) {
+ oldc = fv->cbw*fv->colcnt;
+ oldr = fv->cbh*fv->rowcnt;
+
+ fv->show = bdf;
+ fv->b.active_bitmap = bdf==fv->filled ? NULL : bdf;
+ if ( fv->user_requested_magnify!=-1 )
+ fv->magnify=fv->user_requested_magnify;
+ else if ( bdf->pixelsize<20 ) {
+ if ( bdf->pixelsize<=9 )
+ fv->magnify = 3;
+ else
+ fv->magnify = 2;
+ samesize = ( fv->show && fv->cbw == (bdf->pixelsize*fv->magnify)+1 );
+ } else
+ fv->magnify = 1;
+ if ( !first_time && fv->cbw == fv->magnify*bdf->pixelsize+1 )
+ samesize = true;
+ fv->cbw = (bdf->pixelsize*fv->magnify)+1;
+ fv->cbh = (bdf->pixelsize*fv->magnify)+1+fv->lab_height+1;
+ fv->resize_expected = !samesize;
+ ccnt = fv->b.sf->desired_col_cnt;
+ rcnt = fv->b.sf->desired_row_cnt;
+ if ((( bdf->pixelsize<=fv->b.sf->display_size || bdf->pixelsize<=-fv->b.sf->display_size ) &&
+ fv->b.sf->top_enc!=-1 /* Not defaulting */ ) ||
+ bdf->pixelsize<=48 ) {
+ /* use the desired sizes */
+ } else {
+ if ( bdf->pixelsize>48 ) {
+ ccnt = 8;
+ rcnt = 2;
+ }
+ if ( !first_time ) {
+ if ( ccnt < oldc/fv->cbw )
+ ccnt = oldc/fv->cbw;
+ if ( rcnt < oldr/fv->cbh )
+ rcnt = oldr/fv->cbh;
+ }
+ }
+ if ( samesize ) {
+ gtk_widget_queue_draw(fv->v);
+ } else {
+ gtk_widget_set_size_request(fv->v,
+ ccnt*fv->cbw+1,
+ rcnt*fv->cbh+1);
+ /* If we try to make the window smaller, we must force a resize */
+ /* of the whole system, else the size will remain the same */
+ /* Also when we get a resize event we must set the widget size */
+ /* to be minimal so that the user can resize */
+ if (( ccnt*fv->cbw < oldc || rcnt*fv->cbh < oldr ) && !first_time )
+ gtk_window_resize( GTK_WINDOW(fv->v), 1,1 );
+ if ( fv->char_slot!=NULL )
+ g_object_unref(G_OBJECT(fv->char_slot));
+ fv->char_slot=NULL;
+ }
+ }
+ if ( fv->char_slot==NULL )
+ fv->char_slot = gdk_pixbuf_new(GDK_COLORSPACE_RGB,true,8,fv->cbw-1,fv->cbh-1);
+}
+
+void FontViewMenu_ShowMetrics(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ GtkWidget *dlg = create_FontViewShowMetrics();
+ int isv = strcmp(gtk_widget_get_name(GTK_WIDGET(menuitem)),"show_v_metrics1")==0;
+ int metrics = !isv ? fv->showhmetrics : fv->showvmetrics;
+
+ if ( isv )
+ gtk_window_set_title(GTK_WINDOW(dlg), _("Show Vertical Metrics"));
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"baseline")),
+ (metrics&fvm_baseline)?true:false);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"origin")),
+ (metrics&fvm_origin)?true:false);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"AWBar")),
+ (metrics&fvm_advanceto)?true:false);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"AWLine")),
+ (metrics&fvm_advanceat)?true:false);
+ if ( gtk_dialog_run( GTK_DIALOG (dlg)) == GTK_RESPONSE_ACCEPT ) {
+ metrics = 0;
+ if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"baseline"))) )
+ metrics |= fvm_baseline;
+ if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"origin"))) )
+ metrics |= fvm_origin;
+ if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"AWBar"))) )
+ metrics |= fvm_advanceto;
+ if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dlg,"AWLine"))) )
+ metrics |= fvm_advanceat;
+ if ( isv )
+ fv->showvmetrics = metrics;
+ else
+ fv->showhmetrics = metrics;
+ }
+ gtk_widget_destroy( dlg );
+}
+
+static void FV_ChangeDisplayBitmap(FontView *fv,BDFFont *bdf) {
+ FVChangeDisplayFont(fv,bdf);
+ fv->b.sf->display_size = fv->show->pixelsize;
+}
+
+void FontViewMenu_PixelSize(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem), *fvs, *fvss;
+ int dspsize = fv->filled->pixelsize;
+ int changedmodifier = false;
+ G_CONST_RETURN gchar *name = gtk_widget_get_name(GTK_WIDGET(menuitem));
+ extern int use_freetype_to_rasterize_fv;
+
+ fv->magnify = 1;
+ fv->user_requested_magnify = -1;
+ if ( strstr(name,"24")!=NULL )
+ default_fv_font_size = dspsize = 24;
+ else if ( strstr(name,"36")!=NULL )
+ default_fv_font_size = dspsize = 36;
+ else if ( strstr(name,"48")!=NULL )
+ default_fv_font_size = dspsize = 48;
+ else if ( strstr(name,"72")!=NULL )
+ default_fv_font_size = dspsize = 72;
+ else if ( strstr(name,"96")!=NULL )
+ default_fv_font_size = dspsize = 96;
+ else if ( strcmp(name,"fit_to_em1")==0 ) {
+ default_fv_bbsized = fv->bbsized = !fv->bbsized;
+ fv->b.sf->display_bbsized = fv->bbsized;
+ changedmodifier = true;
+ } else {
+ default_fv_antialias = fv->antialias = !fv->antialias;
+ fv->b.sf->display_antialias = fv->antialias;
+ changedmodifier = true;
+ }
+
+ SavePrefs(true);
+ if ( fv->filled!=fv->show || fv->filled->pixelsize != dspsize || changedmodifier ) {
+ BDFFont *new, *old;
+ for ( fvs=(FontView *) fv->b.sf->fv; fvs!=NULL; fvs=(FontView *) fvs->b.nextsame )
+ fvs->touched = false;
+ while ( 1 ) {
+ for ( fvs=(FontView *) fv->b.sf->fv; fvs!=NULL; fvs=(FontView *) fvs->b.nextsame )
+ if ( !fvs->touched )
+ break;
+ if ( fvs==NULL )
+ break;
+ old = fvs->filled;
+ new = SplineFontPieceMeal(fvs->b.sf,dspsize,
+ (fvs->antialias?pf_antialias:0)|(fvs->bbsized?pf_bbsized:0)|
+ (use_freetype_to_rasterize_fv && !fvs->b.sf->strokedfont && !fvs->b.sf->multilayer?pf_ft_nohints:0),
+ NULL);
+ for ( fvss=fvs; fvss!=NULL; fvss = (FontView *) fvss->b.nextsame ) {
+ if ( fvss->filled==old ) {
+ fvss->filled = new;
+ fvss->antialias = fvs->antialias;
+ fvss->bbsized = fvs->bbsized;
+ if ( fvss->show==old || fvss==fv )
+ FVChangeDisplayFont(fvss,new);
+ fvss->touched = true;
+ }
+ }
+ BDFFontFree(old);
+ }
+ fv->b.sf->display_size = -dspsize;
+ if ( fv->b.cidmaster!=NULL ) {
+ int i;
+ for ( i=0; i<fv->b.cidmaster->subfontcnt; ++i )
+ fv->b.cidmaster->subfonts[i]->display_size = -dspsize;
+ }
+ }
+}
+
+void FontViewMenu_BitmapMagnification(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int magnify = fv->user_requested_magnify!=-1 ? fv->user_requested_magnify : fv->magnify;
+ char def[20], *end, *ret;
+ int val;
+ BDFFont *show = fv->show;
+
+ sprintf( def, "%d", magnify );
+ ret = gwwv_ask_string(_("Bitmap Magnification..."),def,_("Please specify a bitmap magnification factor."));
+ if ( ret==NULL )
+return;
+ val = strtol(ret,&end,10);
+ if ( val<1 || val>5 || *end!='\0' )
+ gwwv_post_error( _("Bad Number"),_("Bad Number") );
+ else {
+ fv->user_requested_magnify = val;
+ fv->show = fv->filled;
+ fv->b.active_bitmap = NULL;
+ FVChangeDisplayFont(fv,show);
+ }
+ free(ret);
+}
+
+void FontViewMenu_WindowSize(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ G_CONST_RETURN gchar *name = gtk_widget_get_name(GTK_WIDGET(menuitem));
+ int h=8,v=2;
+ extern int default_fv_col_count, default_fv_row_count;
+
+ sscanf(name,"%dx%d", &h, &v );
+ gtk_widget_set_size_request(fv->v,h*fv->cbw+1,v*fv->cbh+1);
+ fv->b.sf->desired_col_cnt = default_fv_col_count = h;
+ fv->b.sf->desired_row_cnt = default_fv_row_count = v;
+
+ SavePrefs(true);
+}
+
+void FontViewMenu_GlyphLabel(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ G_CONST_RETURN gchar *name = gtk_widget_get_name(GTK_WIDGET(menuitem));
+
+ if ( strstr(name,"glyph_image")!=NULL )
+ default_fv_glyphlabel = fv->glyphlabel = gl_glyph;
+ else if ( strstr(name,"glyph_name")!=NULL )
+ default_fv_glyphlabel = fv->glyphlabel = gl_name;
+ else if ( strstr(name,"unicode")!=NULL )
+ default_fv_glyphlabel = fv->glyphlabel = gl_unicode;
+ else if ( strstr(name,"encoding")!=NULL )
+ default_fv_glyphlabel = fv->glyphlabel = gl_encoding;
+
+ gtk_widget_queue_draw(fv->v);
+
+ SavePrefs(true);
+}
+
+static void FontViewMenu_ShowBitmap(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ BDFFont *bdf = user_data;
+
+ FV_ChangeDisplayBitmap(fv,bdf); /* Let's not change any of the others */
+}
+
+static void FV_ShowFilled(FontView *fv) {
+
+ fv->magnify = 1;
+ fv->user_requested_magnify = 1;
+ if ( fv->show!=fv->filled )
+ FVChangeDisplayFont(fv,fv->filled);
+ fv->b.sf->display_size = -fv->filled->pixelsize;
+ fv->b.active_bitmap = NULL;
+}
+
+void FontViewMenu_CenterWidth(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVMetricsCenter((FontViewBase *) fv,true);
+}
+
+void FontViewMenu_ThirdsWidth(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVMetricsCenter((FontViewBase *) fv,false);
+}
+
+void FontViewMenu_SetWidth(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ G_CONST_RETURN gchar *name = gtk_widget_get_name(GTK_WIDGET(menuitem));
+
+ if ( FVAnyCharSelected(fv)==-1 )
+return;
+ if ( strcmp(name,"set_vertical_advance1")==0 && !fv->b.sf->hasvmetrics )
+return;
+ FVSetWidth(fv,strcmp(name,"set_width1")==0 ?wt_width:
+ strcmp(name,"set_lbearing1")==0?wt_lbearing:
+ strcmp(name,"set_rbearing1")==0?wt_rbearing:
+ wt_vwidth);
+}
+
+void FontViewMenu_AutoWidth(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVAutoWidth(fv);
+}
+
+void FontViewMenu_AutoKern(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVAutoKern(fv);
+}
+
+void FontViewMenu_KernClasses(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ ShowKernClasses(fv->b.sf,NULL,false);
+}
+
+void FontViewMenu_VKernClasses(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ ShowKernClasses(fv->b.sf,NULL,true);
+}
+
+void FontViewMenu_RemoveKP(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVRemoveKerns((FontViewBase *) fv);
+}
+
+void FontViewMenu_RemoveVKP(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVRemoveVKerns( (FontViewBase *) fv);
+}
+
+void FontViewMenu_KernPairCloseup(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i;
+
+ for ( i=0; i<fv->b.map->enccount; ++i )
+ if ( fv->b.selected[i] )
+ break;
+ KernPairD(fv->b.sf,i==fv->b.map->enccount?NULL:
+ fv->b.map->map[i]==-1?NULL:
+ fv->b.sf->glyphs[fv->b.map->map[i]],NULL,false);
+}
+
+void FontViewMenu_VKernFromH(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVVKernFromHKern( (FontViewBase *) fv);
+}
+
+void FontViewMenu_AutoHint(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVAutoHint( (FontViewBase *) fv );
+}
+
+void FontViewMenu_AutoHintSubsPts(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVAutoHintSubs( (FontViewBase *) fv );
+}
+
+void FontViewMenu_AutoCounter(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVAutoCounter( (FontViewBase *) fv );
+}
+
+void FontViewMenu_DontAutoHint(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVDontAutoHint( (FontViewBase *) fv );
+}
+
+void FontViewMenu_AutoInstr(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ FVAutoInstr( (FontViewBase *) fv, true );
+}
+
+void FontViewMenu_EditInstrs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int index = FVAnyCharSelected(fv);
+ SplineChar *sc;
+ if ( index<0 )
+return;
+ sc = SFMakeChar(fv->b.sf,fv->b.map,index);
+ SCEditInstructions(sc);
+}
+
+void FontViewMenu_EditTable(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ G_CONST_RETURN gchar *name = gtk_widget_get_name(GTK_WIDGET(menuitem));
+ SFEditTable(fv->b.sf,
+ strcmp(name,"edit_prep1")==0?CHR('p','r','e','p'):
+ strcmp(name,"edit_fpgm1")==0?CHR('f','p','g','m'):
+ strcmp(name,"edit_maxp1")==0?CHR('m','a','x','p'):
+ CHR('c','v','t',' '));
+}
+
+void FontViewMenu_PrivateToCvt(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ CVT_ImportPrivate(fv->b.sf);
+}
+
+void FontViewMenu_ClearInstrs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVClearInstrs((FontViewBase *) fv);
+}
+
+void FontViewMenu_ClearHints(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVClearHints((FontViewBase *) fv);
+}
+
+void FontViewMenu_Histograms(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ G_CONST_RETURN gchar *name = gtk_widget_get_name(GTK_WIDGET(menuitem));
+ SFHistogram(fv->b.sf, NULL, FVAnyCharSelected(fv)!=-1?fv->b.selected:NULL,
+ fv->b.map,
+ strcmp(name,"hstem1")==0 ? hist_hstem :
+ strcmp(name,"vstem1")==0 ? hist_vstem :
+ hist_blues);
+}
+
+static void FontViewSetTitle(FontView *fv) {
+ char *title;
+ char *file=NULL;
+ char *enc;
+ int len;
+ gsize read, written;
+
+ if ( fv->gw==NULL ) /* In scripting */
+return;
+
+ enc = SFEncodingName(fv->b.sf,fv->b.map);
+ len = strlen(fv->b.sf->fontname)+1 + strlen(enc)+4;
+ if ( fv->b.cidmaster!=NULL ) {
+ if ( (file = fv->b.cidmaster->filename)==NULL )
+ file = fv->b.cidmaster->origname;
+ } else {
+ if ( (file = fv->b.sf->filename)==NULL )
+ file = fv->b.sf->origname;
+ }
+ if ( file!=NULL )
+ len += 2+strlen(file);
+ title = galloc((len+1));
+ strcpy(title,fv->b.sf->fontname);
+ if ( fv->b.sf->changed )
+ strcat(title,"*");
+ if ( file!=NULL ) {
+ char *temp;
+ strcat(title," ");
+ temp = g_filename_to_utf8(GFileNameTail(file),-1,&read,&written,NULL);
+ strcat(title,temp);
+ free(temp);
+ }
+ strcat(title, " (" );
+ strcat(title,enc);
+ strcat(title, ")" );
+ free(enc);
+
+ if ( GTK_WIDGET(fv->gw)->window!=NULL )
+ gdk_window_set_icon_name( GTK_WIDGET(fv->gw)->window, fv->b.sf->fontname );
+ gtk_window_set_title( GTK_WINDOW(fv->gw), title );
+ free(title);
+}
+
+static void FontViewSetTitles(SplineFont *sf) {
+ FontView *fv;
+
+ for ( fv = (FontView *) (sf->fv); fv!=NULL; fv=(FontView *) (fv->b.nextsame))
+ FontViewSetTitle(fv);
+}
+
+static void FontViewMenu_ShowSubFont(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *new = user_data;
+ FVShowSubFont(fv,new);
+}
+
+void FontViewMenu_Convert2CID(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster;
+ struct cidmap *cidmap;
+
+ if ( cidmaster!=NULL )
+return;
+ SFFindNearTop(fv->b.sf);
+ cidmap = AskUserForCIDMap();
+ if ( cidmap==NULL )
+return;
+ MakeCIDMaster(fv->b.sf,fv->b.map,false,NULL,cidmap);
+ SFRestoreNearTop(fv->b.sf);
+}
+
+static gboolean CMapFilter(const GtkFileFilterInfo *filter_info,gpointer data) {
+ const char *filename = filter_info->filename;
+ char buf2[256];
+ int ret = true;
+ FILE *file;
+ static char *cmapflag = "%!PS-Adobe-3.0 Resource-CMap";
+ char *pt;
+
+ pt = strrchr(filename,'.');
+ if ( pt==NULL )
+return( false );
+ if ( strcasecmp(pt,".cmap")!=0 )
+return( false );
+ file = fopen(filename,"r");
+ if ( file==NULL )
+return( false );
+ else {
+ if ( fgets(buf2,sizeof(buf2),file)==NULL ||
+ strncmp(buf2,cmapflag,strlen(cmapflag))!=0 )
+ ret = false;
+ fclose(file);
+ }
+return( ret );
+}
+
+static struct gwwv_filter cmap_filters[] = {
+ { N_("Adobe CMap files"), NULL, CMapFilter },
+ { N_("All"), "*" },
+ NULL
+};
+
+void FontViewMenu_ConvertByCMap(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster;
+ char *cmapfilename;
+
+ if ( cidmaster!=NULL )
+return;
+ cmapfilename = gwwv_open_filename_mult(_("Find an adobe CMap file..."),NULL,cmap_filters,false);
+ if ( cmapfilename==NULL )
+return;
+ MakeCIDMaster(fv->b.sf,fv->b.map,true,cmapfilename,NULL);
+ free(cmapfilename);
+}
+
+void FontViewMenu_Flatten(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster;
+
+ if ( cidmaster==NULL )
+return;
+ SFFlatten(cidmaster);
+}
+
+void FontViewMenu_FlattenByCMap(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster;
+ char *cmapname;
+
+ if ( cidmaster==NULL )
+return;
+ cmapname = gwwv_open_filename_mult(_("Find an adobe CMap file..."),NULL,cmap_filters,false);
+ if ( cmapname==NULL )
+return;
+ SFFindNearTop(fv->b.sf);
+ SFFlattenByCMap(cidmaster,cmapname);
+ SFRestoreNearTop(fv->b.sf);
+ free(cmapname);
+}
+
+void FontViewMenu_CIDInsertFont(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster;
+ SplineFont *new;
+ struct cidmap *map;
+ char *filename;
+ extern NameList *force_names_when_opening;
+
+ if ( cidmaster==NULL || cidmaster->subfontcnt>=255 ) /* Open type allows 1 byte to specify the fdselect */
+return;
+
+ filename = GetPostscriptFontName(NULL,false);
+ if ( filename==NULL )
+return;
+ new = LoadSplineFont(filename,0);
+ free(filename);
+ if ( new==NULL )
+return;
+ if ( new->fv == (FontViewBase *) fv ) /* Already part of us */
+return;
+ if ( new->fv != NULL ) {
+ if ( ((FontView *) new->fv)->gw!=NULL )
+ gdk_window_show(GDK_WINDOW( ((FontView *) new->fv)->gw->window ));
+ gwwv_post_error(_("Please close font"),_("Please close %s before inserting it into a CID font"),new->origname);
+return;
+ }
+ EncMapFree(new->map);
+ if ( force_names_when_opening!=NULL )
+ SFRenameGlyphsToNamelist(new,force_names_when_opening );
+
+ map = FindCidMap(cidmaster->cidregistry,cidmaster->ordering,cidmaster->supplement,cidmaster);
+ SFEncodeToMap(new,map);
+ if ( !PSDictHasEntry(new->private,"lenIV"))
+ PSDictChangeEntry(new->private,"lenIV","1"); /* It's 4 by default, in CIDs the convention seems to be 1 */
+ new->display_antialias = fv->b.sf->display_antialias;
+ new->display_bbsized = fv->b.sf->display_bbsized;
+ new->display_size = fv->b.sf->display_size;
+ FVInsertInCID((FontViewBase *) fv,new);
+ CIDMasterAsDes(new);
+}
+
+void FontViewMenu_CIDInsertEmptyFont(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster, *sf;
+ struct cidmap *map;
+
+ if ( cidmaster==NULL || cidmaster->subfontcnt>=255 ) /* Open type allows 1 byte to specify the fdselect */
+return;
+ map = FindCidMap(cidmaster->cidregistry,cidmaster->ordering,cidmaster->supplement,cidmaster);
+ sf = SplineFontBlank(MaxCID(map));
+ sf->glyphcnt = sf->glyphmax;
+ sf->cidmaster = cidmaster;
+ sf->display_antialias = fv->b.sf->display_antialias;
+ sf->display_bbsized = fv->b.sf->display_bbsized;
+ sf->display_size = fv->b.sf->display_size;
+ sf->private = gcalloc(1,sizeof(struct psdict));
+ PSDictChangeEntry(sf->private,"lenIV","1"); /* It's 4 by default, in CIDs the convention seems to be 1 */
+ FVInsertInCID((FontViewBase *) fv,sf);
+}
+
+void FontViewMenu_RemoveFontFromCID(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ static char *buts[] = { GTK_STOCK_REMOVE, GTK_STOCK_CANCEL, NULL };
+ SplineFont *cidmaster = fv->b.cidmaster, *sf = fv->b.sf, *replace;
+ int i;
+ MetricsView *mv, *mnext;
+ FontView *fvs;
+
+ if ( cidmaster==NULL || cidmaster->subfontcnt<=1 ) /* Can't remove last font */
+return;
+ if ( gwwv_ask(_("_Remove Font"),(const char **) buts,0,1,_("Are you sure you wish to remove sub-font %1$.40s from the CID font %2$.40s"),
+ sf->fontname,cidmaster->fontname)==1 )
+return;
+
+ for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
+ CharView *cv, *next;
+ for ( cv = (CharView *) sf->glyphs[i]->views; cv!=NULL; cv = next ) {
+ next = (CharView *) cv->b.next;
+ gtk_widget_destroy(cv->gw);
+ }
+ }
+ for ( mv=fv->b.sf->metrics; mv!=NULL; mv = mnext ) {
+ mnext = mv->next;
+ gtk_widget_destroy(mv->gw);
+ }
+ g_main_context_iteration(NULL,TRUE); /* Waits until all destroy windows are processed (I think) */
+
+ for ( i=0; i<cidmaster->subfontcnt; ++i )
+ if ( cidmaster->subfonts[i]==sf )
+ break;
+ replace = i==0?cidmaster->subfonts[1]:cidmaster->subfonts[i-1];
+ while ( i<cidmaster->subfontcnt-1 ) {
+ cidmaster->subfonts[i] = cidmaster->subfonts[i+1];
+ ++i;
+ }
+ --cidmaster->subfontcnt;
+
+ for ( fvs=(FontView *) fv->b.sf->fv; fvs!=NULL; fvs=(FontView *) fvs->b.nextsame ) {
+ if ( fvs->b.sf==sf )
+ CIDSetEncMap((FontViewBase *) fvs,replace);
+ }
+ FontViewReformatAll(fv->b.sf);
+ SplineFontFree(sf);
+}
+
+void FontViewMenu_CIDFontInfo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster;
+
+ if ( cidmaster==NULL )
+return;
+ FontInfo(cidmaster,-1,false);
+}
+
+void FontViewMenu_ChangeSupplement(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *cidmaster = fv->b.cidmaster;
+ struct cidmap *cidmap;
+ char buffer[20];
+ char *ret, *end;
+ int supple;
+
+ if ( cidmaster==NULL )
+return;
+ sprintf(buffer,"%d",cidmaster->supplement);
+ ret = gwwv_ask_string(_("Change Supplement..."),buffer,_("Please specify a new supplement for %.20s-%.20s"),
+ cidmaster->cidregistry,cidmaster->ordering);
+ if ( ret==NULL )
+return;
+ supple = strtol(ret,&end,10);
+ if ( *end!='\0' || supple<=0 ) {
+ free(ret);
+ gwwv_post_error( _("Bad Number"),_("Bad Number") );
+return;
+ }
+ free(ret);
+ if ( supple!=cidmaster->supplement ) {
+ /* this will make noises if it can't find an appropriate cidmap */
+ cidmap = FindCidMap(cidmaster->cidregistry,cidmaster->ordering,supple,cidmaster);
+ cidmaster->supplement = supple;
+ FVSetTitle( (FontViewBase *) fv);
+ }
+}
+
+static SplineChar *FVFindACharInDisplay(FontView *fv) {
+ int start, end, enc, gid;
+ EncMap *map = fv->b.map;
+ SplineFont *sf = fv->b.sf;
+ SplineChar *sc;
+
+ start = fv->rowoff*fv->colcnt;
+ end = start + fv->rowcnt*fv->colcnt;
+ for ( enc = start; enc<end && enc<map->enccount; ++enc ) {
+ if ( (gid=map->map[enc])!=-1 && (sc=sf->glyphs[gid])!=NULL )
+return( sc );
+ }
+return( NULL );
+}
+
+static void FontViewMenu_Reencode(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ Encoding *enc = NULL;
+ EncMap *map;
+ SplineChar *sc;
+
+ gwwv_post_notice("NYI", "Reencoding is not yet implemented");
+ /* !!!!! */
+
+ sc = FVFindACharInDisplay(fv);
+ enc = FindOrMakeEncoding(user_data);
+ if ( enc==&custom )
+ fv->b.map->enc = &custom;
+ else {
+ map = EncMapFromEncoding(fv->b.sf,enc);
+ fv->b.selected = grealloc(fv->b.selected,map->enccount);
+ memset(fv->b.selected,0,map->enccount);
+ EncMapFree(fv->b.map);
+ fv->b.map = map;
+ }
+ if ( fv->b.normal!=NULL ) {
+ EncMapFree(fv->b.normal);
+ fv->b.normal = NULL;
+ }
+ SFReplaceEncodingBDFProps(fv->b.sf,fv->b.map);
+ FontViewSetTitle(fv);
+ FontViewReformatOne(&fv->b);
+ if ( sc!=NULL ) {
+ int enc = fv->b.map->backmap[sc->orig_pos];
+ if ( enc!=-1 )
+ FVScrollToChar(fv,enc);
+ }
+}
+
+void FontViewMenu_BuildReencode(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ GetEncodingMenu(menuitem,FontViewMenu_Reencode,fv->b.map->enc);
+}
+
+static void FontViewMenu_ForceEncode(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ Encoding *enc = NULL;
+ int oldcnt = fv->b.map->enccount;
+
+ gwwv_post_notice("NYI", "Forced Reencoding is not yet implemented");
+return;
+ /*!!!!!!! */
+
+ enc = FindOrMakeEncoding(user_data);
+ SFForceEncoding(fv->b.sf,fv->b.map,enc);
+ if ( oldcnt < fv->b.map->enccount ) {
+ fv->b.selected = grealloc(fv->b.selected,fv->b.map->enccount);
+ memset(fv->b.selected+oldcnt,0,fv->b.map->enccount-oldcnt);
+ }
+ if ( fv->b.normal!=NULL ) {
+ EncMapFree(fv->b.normal);
+ fv->b.normal = NULL;
+ }
+ SFReplaceEncodingBDFProps(fv->b.sf,fv->b.map);
+ FontViewSetTitle(fv);
+ FontViewReformatOne(&fv->b);
+}
+
+void FontViewMenu_BuildForceEncoding(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ GetEncodingMenu(menuitem,FontViewMenu_ForceEncode,fv->b.map->enc);
+}
+
+void FontViewMenu_DisplayByGroups(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ DisplayGroups(fv);
+}
+
+void FontViewMenu_DefineGroups(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ DefineGroups(fv);
+}
+
+void FontViewMenu_MMValid(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ MMSet *mm = fv->b.sf->mm;
+
+ if ( mm==NULL )
+return;
+ MMValid(mm,true);
+}
+
+void FontViewMenu_CreateMM(GtkMenuItem *menuitem, gpointer user_data) {
+ MMWizard(NULL);
+}
+
+void FontViewMenu_MMInfo(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ MMSet *mm = fv->b.sf->mm;
+
+ if ( mm==NULL )
+return;
+ MMWizard(mm);
+}
+
+void FontViewMenu_ChangeDefWeights(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ MMSet *mm = fv->b.sf->mm;
+
+ if ( mm==NULL || mm->apple )
+return;
+ MMChangeBlend(mm,fv,false);
+}
+
+void FontViewMenu_Blend(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ MMSet *mm = fv->b.sf->mm;
+
+ if ( mm==NULL )
+return;
+ MMChangeBlend(mm,fv,true);
+}
+
+void FontViewMenu_AddEncodingSlots(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ char *ret, *end;
+ int cnt;
+
+ ret = gwwv_ask_string(_("Add Encoding Slots"),"1",fv->b.cidmaster?_("How many CID slots do you wish to add?"):_("How many unencoded glyph slots do you wish to add?"));
+ if ( ret==NULL )
+return;
+ cnt = strtol(ret,&end,10);
+ if ( *end!='\0' || cnt<=0 ) {
+ free(ret);
+ ff_post_error( _("Bad Number"),_("Bad Number") );
+return;
+ }
+ free(ret);
+ FVAddUnencoded((FontViewBase *) fv, cnt);
+}
+
+void FontViewMenu_RemoveUnusedSlots(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVRemoveUnused((FontViewBase *) fv);
+}
+
+void FontViewMenu_Compact(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineChar *sc;
+
+ sc = FVFindACharInDisplay(fv);
+ FVCompact((FontViewBase *) fv);
+ if ( sc!=NULL ) {
+ int enc = fv->b.map->backmap[sc->orig_pos];
+ if ( enc!=-1 )
+ FVScrollToChar(fv,enc);
+ }
+}
+
+void FontViewMenu_DetachGlyphs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ FVDetachGlyphs((FontViewBase *) fv);
+}
+
+void FontViewMenu_DetachAndRemoveGlyphs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ static char *buts[] = { GTK_STOCK_REMOVE, GTK_STOCK_CANCEL, NULL };
+
+ if ( gwwv_ask(_("Detach & Remove Glyphs"),(const char **) buts,0,1,_("Are you sure you wish to remove these glyphs? This operation cannot be undone."))==1 )
+return;
+
+ FVDetachAndRemoveGlyphs((FontViewBase *) fv);
+}
+
+void FontViewMenu_AddEncodingName(GtkMenuItem *menuitem, gpointer user_data) {
+ char *ret;
+ Encoding *enc;
+
+ /* Search the iconv database for the named encoding */
+ ret = gwwv_ask_string(_("Add Encoding Name..."),NULL,_("Please provide the name of an encoding in the iconv database which you want in the menu."));
+ if ( ret==NULL )
+return;
+ enc = FindOrMakeEncoding(ret);
+ if ( enc==NULL )
+ gwwv_post_error(_("Invalid Encoding"),_("Invalid Encoding"));
+ free(ret);
+}
+
+void FontViewMenu_LoadEncoding(GtkMenuItem *menuitem, gpointer user_data) {
+ LoadEncodingFile();
+}
+
+void FontViewMenu_MakeFromFont(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ (void) MakeEncoding(fv->b.sf,fv->b.map);
+}
+
+void FontViewMenu_RemoveEncoding(GtkMenuItem *menuitem, gpointer user_data) {
+ RemoveEncoding();
+}
+
+static int isuniname(char *name) {
+ int i;
+ if ( name[0]!='u' || name[1]!='n' || name[2]!='i' )
+return( false );
+ for ( i=3; i<7; ++i )
+ if ( name[i]<'0' || (name[i]>'9' && name[i]<'A') || name[i]>'F' )
+return( false );
+ if ( name[7]!='\0' )
+return( false );
+
+return( true );
+}
+
+static int isuname(char *name) {
+ int i;
+ if ( name[0]!='u' )
+return( false );
+ for ( i=1; i<5; ++i )
+ if ( name[i]<'0' || (name[i]>'9' && name[i]<'A') || name[i]>'F' )
+return( false );
+ if ( name[5]!='\0' )
+return( false );
+
+return( true );
+}
+
+void FontViewMenu_SaveNamelist(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ gsize read, written;
+ char buffer[1025];
+ char *filename, *temp;
+ FILE *file;
+ SplineChar *sc;
+ int i;
+
+ snprintf(buffer, sizeof(buffer),"%s/%s.nam", getPfaEditDir(buffer), fv->b.sf->fontname );
+ temp = g_filename_to_utf8(buffer,-1,&read,&written,NULL);
+ filename = gwwv_saveas_filename(_("Save Namelist of font"), temp,"*.nam");
+ free(temp);
+ if ( filename==NULL )
+return;
+ temp = g_filename_from_utf8(filename,-1,&read,&written,NULL);
+ file = fopen(temp,"w");
+ free(temp);
+ if ( file==NULL ) {
+ gwwv_post_error(_("Namelist creation failed"),_("Could not write %s"), filename);
+ free(filename);
+return;
+ }
+ for ( i=0; i<fv->b.sf->glyphcnt; ++i ) {
+ if ( (sc = fv->b.sf->glyphs[i])!=NULL && sc->unicodeenc!=-1 ) {
+ if ( !isuniname(sc->name) && !isuname(sc->name ) )
+ fprintf( file, "0x%04X %s\n", sc->unicodeenc, sc->name );
+ }
+ }
+ fclose(file);
+}
+
+void FontViewMenu_LoadNamelist(GtkMenuItem *menuitem, gpointer user_data) {
+ gsize read, written;
+ /* Read in a name list and copy it into the prefs dir so that we'll find */
+ /* it in the future */
+ /* Be prepared to update what we've already got if names match */
+ char buffer[1025];
+ char *ret = gwwv_open_filename(_("Load Namelist"),NULL, "*.nam");
+ char *temp, *pt;
+ char *buts[3];
+ FILE *old, *new;
+ int ch, ans;
+ NameList *nl;
+
+ if ( ret==NULL )
+return; /* Cancelled */
+ temp = g_filename_from_utf8(ret,-1,&read,&written,NULL);
+ pt = strrchr(temp,'/');
+ if ( pt==NULL )
+ pt = temp;
+ else
+ ++pt;
+ snprintf(buffer,sizeof(buffer),"%s/%s", getPfaEditDir(buffer), pt);
+ if ( access(buffer,F_OK)==0 ) {
+ buts[0] = _("_Replace");
+ buts[1] = GTK_STOCK_CANCEL;
+ buts[2] = NULL;
+ ans = gwwv_ask( _("Replace"),(const char **) buts,0,1,_("A name list with this name already exists. Replace it?"));
+ if ( ans==1 ) {
+ free(temp);
+ free(ret);
+return;
+ }
+ }
+
+ old = fopen( temp,"r");
+ if ( old==NULL ) {
+ gwwv_post_error(_("No such file"),_("Could not read %s"), ret );
+ free(ret); free(temp);
+return;
+ }
+ if ( (nl = LoadNamelist(temp))==NULL ) {
+ gwwv_post_error(_("Bad namelist file"),_("Could not parse %s"), ret );
+ free(ret); free(temp);
+return;
+ }
+ free(ret); free(temp);
+ if ( nl->uses_unicode ) {
+ if ( nl->a_utf8_name!=NULL )
+ ff_post_notice(_("Non-ASCII glyphnames"),_("This namelist contains at least one non-ASCII glyph name, namely: %s"), nl->a_utf8_name );
+ else
+ ff_post_notice(_("Non-ASCII glyphnames"),_("This namelist is based on a namelist which contains non-ASCII glyph names"));
+ }
+
+ new = fopen( buffer,"w");
+ if ( new==NULL ) {
+ gwwv_post_error(_("Create failed"),_("Could not write %s"), buffer );
+return;
+ }
+
+ while ( (ch=getc(old))!=EOF )
+ putc(ch,new);
+ fclose(old);
+ fclose(new);
+}
+
+void FontViewMenu_RenameByNamelist(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ char **namelists = AllNamelistNames();
+ int i;
+ int ret;
+ NameList *nl;
+ extern int allow_utf8_glyphnames;
+
+ for ( i=0; namelists[i]!=NULL; ++i );
+ ret = gwwv_choose(_("Rename by NameList"),(const char **) namelists,i,0,_("Rename the glyphs in this font to the names found in the selected namelist"));
+ if ( ret==-1 )
+return;
+ nl = NameListByName(namelists[ret]);
+ if ( nl==NULL ) {
+ IError("Couldn't find namelist");
+return;
+ } else if ( nl!=NULL && nl->uses_unicode && !allow_utf8_glyphnames) {
+ gwwv_post_error(_("Namelist contains non-ASCII names"),_("Glyph names should be limited to characters in the ASCII character set, but there are names in this namelist which use characters outside that range."));
+return;
+ }
+ SFRenameGlyphsToNamelist(fv->b.sf,nl);
+ gtk_widget_queue_draw(fv->v);
+}
+
+void FontViewMenu_CreateNamedGlyphs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ gsize read, written;
+ /* Read a file containing a list of names, and add an unencoded glyph for */
+ /* each name */
+ char buffer[33];
+ char *ret = gwwv_open_filename(_("Load glyph names"),NULL, "*");
+ char *temp, *pt;
+ FILE *file;
+ int ch;
+ SplineChar *sc;
+ FontView *fvs;
+
+ if ( ret==NULL )
+return; /* Cancelled */
+ temp = g_filename_from_utf8(ret,-1,&read,&written,NULL);
+
+ file = fopen( temp,"r");
+ if ( file==NULL ) {
+ gwwv_post_error(_("No such file"),_("Could not read %s"), ret );
+ free(ret); free(temp);
+return;
+ }
+ pt = buffer;
+ forever {
+ ch = getc(file);
+ if ( ch!=EOF && !isspace(ch)) {
+ if ( pt<buffer+sizeof(buffer)-1 )
+ *pt++ = ch;
+ } else {
+ if ( pt!=buffer ) {
+ *pt = '\0';
+ sc = NULL;
+ for ( fvs=(FontView *) fv->b.sf->fv; fvs!=NULL; fvs=(FontView *) fvs->b.nextsame ) {
+ EncMap *map = fvs->b.map;
+ if ( map->enccount+1>=map->encmax )
+ map->map = grealloc(map->map,(map->encmax += 20)*sizeof(int));
+ map->map[map->enccount] = -1;
+ fvs->b.selected = grealloc(fvs->b.selected,(map->enccount+1));
+ memset(fvs->b.selected+map->enccount,0,1);
+ ++map->enccount;
+ if ( sc==NULL ) {
+ sc = SFMakeChar(fv->b.sf,map,map->enccount-1);
+ free(sc->name);
+ sc->name = copy(buffer);
+ sc->comment = copy("."); /* Mark as something for sfd file */
+ /*SCLigDefault(sc);*/
+ }
+ map->map[map->enccount-1] = sc->orig_pos;
+ map->backmap[sc->orig_pos] = map->enccount-1;
+ }
+ pt = buffer;
+ }
+ if ( ch==EOF )
+ break;
+ }
+ }
+ fclose(file);
+ free(ret); free(temp);
+ FontViewReformatAll(fv->b.sf);
+}
+
+void FontViewMenu_ActivateCopyFrom(GtkMenuItem *menuitem, gpointer user_data) {
+ GtkWidget *w;
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "all_fonts1" );
+ gtk_widget_set_sensitive(w,!onlycopydisplayed);
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "displayed_fonts1" );
+ gtk_widget_set_sensitive(w,onlycopydisplayed);
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "glyph_metadata1" );
+ gtk_widget_set_sensitive(w,copymetadata);
+}
+
+void FontViewMenu_ActivateTransformations(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *sf = fv->b.sf;
+ int anychars = FVAnyCharSelected(fv);
+ GtkWidget *w;
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "transform1" );
+ gtk_widget_set_sensitive(w,anychars);
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "point_of_view_projection1" );
+ gtk_widget_set_sensitive(w,anychars && !sf->onlybitmaps );
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "non_linear_transform1" );
+ gtk_widget_set_sensitive(w,anychars && !sf->onlybitmaps);
+}
+
+void FontViewMenu_ToolsActivate(GtkMenuItem *menuitem, gpointer user_data) {
+ /* !!!!! Python menus */
+}
+
+struct fv_any {
+ FontView *fv;
+ int anychars;
+ void (*callback)(GtkWidget *w,gpointer user_data);
+};
+
+static void activate_file_items(GtkWidget *w, gpointer user_data) {
+ struct fv_any *fv_any = (struct fv_any *) user_data;
+ G_CONST_RETURN gchar *name = gtk_widget_get_name( GTK_WIDGET(w));
+
+ if ( strcmp(name,"open_outline_window1")==0 )
+ gtk_widget_set_sensitive(w,fv_any->anychars!=-1);
+ else if ( strcmp(name,"open_bitmap_window1")==0 )
+ gtk_widget_set_sensitive(w,fv_any->anychars!=-1 && fv_any->fv->b.sf->bitmaps!=NULL);
+ else if ( strcmp(name,"revert_file1")==0 )
+ gtk_widget_set_sensitive(w,fv_any->fv->b.sf->origname!=NULL);
+ else if ( strcmp(name,"revert_glyph1")==0 )
+ gtk_widget_set_sensitive(w,fv_any->anychars!=-1 && fv_any->fv->b.sf->origname!=NULL);
+ else if ( strcmp(name,"recent1")==0 )
+ gtk_widget_set_sensitive(w,RecentFilesAny());
+ else if ( strcmp(name,"script_menu1")==0 )
+ gtk_widget_set_sensitive(w,script_menu_names[0]!=NULL);
+ else if ( strcmp(name,"print2")==0 )
+ gtk_widget_set_sensitive(w,!fv_any->fv->b.sf->onlybitmaps);
+}
+
+void FontViewMenu_ActivateFile(GtkMenuItem *menuitem, gpointer user_data) {
+ struct fv_any data;
+
+ data.fv = FV_From_MI(menuitem);
+ data.anychars = FVAnyCharSelected(data.fv);
+
+ gtk_container_foreach( GTK_CONTAINER( gtk_menu_item_get_submenu(menuitem )),
+ activate_file_items, &data );
+}
+
+void FontViewMenu_ActivateEdit(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int pos = FVAnyCharSelected(fv), i;
+ /* I can only determine the contents of the clipboard asyncronously */
+ /* hence I can't check to see if it contains something that is pastable */
+ /* So all I can do with paste is check that something is selected */
+#if 0
+ int not_pasteable = pos==-1 ||
+ (!CopyContainsSomething() &&
+ !GDrawSelectionHasType(fv->gw,sn_clipboard,"image/png") &&
+ !GDrawSelectionHasType(fv->gw,sn_clipboard,"image/svg") &&
+ !GDrawSelectionHasType(fv->gw,sn_clipboard,"image/bmp") &&
+ !GDrawSelectionHasType(fv->gw,sn_clipboard,"image/eps"));
+#endif
+ GtkWidget *w;
+ int gid;
+ static char *poslist[] = { "cut2", "copy2", "copy_reference1", "copy_width1",
+ "copy_lbearing1", "copy_rbearing1", "paste2", "paste_into1",
+ "paste_after1", "same_glyph_as1", "clear2", "clear_background1",
+ "copy_fg_to_bg1", "join1", "replace_with_reference1",
+ "unlink_reference1", "remove_undoes1", NULL };
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "undo2" );
+ for ( i=0; i<fv->b.map->enccount; ++i )
+ if ( fv->b.selected[i] && (gid = fv->b.map->map[i])!=-1 &&
+ fv->b.sf->glyphs[gid]!=NULL ) {
+ if ( fv->b.sf->glyphs[gid]->layers[ly_fore].undoes!=NULL )
+ break;
+ }
+ gtk_widget_set_sensitive(w,i!=fv->b.map->enccount);
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "redo2" );
+ for ( i=0; i<fv->b.map->enccount; ++i )
+ if ( fv->b.selected[i] && (gid = fv->b.map->map[i])!=-1 &&
+ fv->b.sf->glyphs[gid]!=NULL ) {
+ if ( fv->b.sf->glyphs[gid]->layers[ly_fore].redoes!=NULL )
+ break;
+ }
+ gtk_widget_set_sensitive(w,i!=fv->b.map->enccount);
+
+ for ( i=0; poslist[i]!=NULL; ++i ) {
+ w = lookup_widget( GTK_WIDGET(menuitem), poslist[i] );
+ if ( w!=NULL )
+ gtk_widget_set_sensitive(w,pos!=-1);
+ }
+
+ w = lookup_widget( GTK_WIDGET(menuitem), "copy_vwidth1" );
+ if ( w!=NULL )
+ gtk_widget_set_sensitive(w,pos!=-1 && fv->b.sf->hasvmetrics);
+
+# ifndef FONTFORGE_CONFIG_PASTEAFTER
+ w = lookup_widget( GTK_WIDGET(menuitem), "paste_after1" );
+ gtk_widget_hide(w);
+# endif
+}
+
+void FontViewMenu_ActivateDependents(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int anychars = FVAnyCharSelected(fv);
+ int anygid = anychars<0 ? -1 : fv->b.map->map[anychars];
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "references1" ),
+ anygid>=0 &&
+ fv->b.sf->glyphs[anygid]!=NULL &&
+ fv->b.sf->glyphs[anygid]->dependents != NULL);
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "substitutions1" ),
+ anygid>=0 &&
+ fv->b.sf->glyphs[anygid]!=NULL &&
+ SCUsedBySubs(fv->b.sf->glyphs[anygid]));
+}
+
+void FontViewMenu_ActivateBuild(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int anybuildable = false;
+ int anybuildableaccents = false;
+ int i, gid;
+
+ for ( i=0; i<fv->b.map->enccount; ++i ) if ( fv->b.selected[i] && (gid=fv->b.map->map[i])!=-1 ) {
+ SplineChar *sc, dummy;
+ sc = fv->b.sf->glyphs[gid];
+ if ( sc==NULL )
+ sc = SCBuildDummy(&dummy,fv->b.sf,fv->b.map,i);
+ if ( SFIsSomethingBuildable(fv->b.sf,sc,true)) {
+ anybuildableaccents = anybuildable = true;
+ break;
+ } else if ( SFIsSomethingBuildable(fv->b.sf,sc,false))
+ anybuildable = true;
+ }
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "build_accented_char1" ),
+ anybuildableaccents );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "build_composite_char1" ),
+ anybuildable );
+}
+
+void FontViewMenu_ActivateElement(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int anychars = FVAnyCharSelected(fv);
+ int anygid = anychars<0 ? -1 : fv->b.map->map[anychars];
+ int anybuildable, anytraceable;
+ int gid;
+ GtkWidget *w;
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "char_info1" ),
+ anygid>=0 &&
+ (fv->b.cidmaster==NULL || fv->b.sf->glyphs[anygid]!=NULL));
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "find_problems1" ),
+ anygid!=-1);
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "transform1" ),
+ anygid!=-1);
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "non_linear_transform1" ),
+ anygid!=-1);
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "add_extrema1" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "round_to_int1" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "correct_direction1" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "simplify3" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "expand_stroke1" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "overlap1" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "style1" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "tilepath1" ),
+ anygid!=-1 && !fv->b.sf->onlybitmaps );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "bitmaps_available1" ),
+ fv->b.sf->mm==NULL );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "regenerate_bitmaps1" ),
+ fv->b.sf->mm==NULL && fv->b.sf->bitmaps!=NULL && !fv->b.sf->onlybitmaps );
+
+ anybuildable = false;
+ if ( anygid!=-1 ) {
+ int i, gid;
+ for ( i=0; i<fv->b.map->enccount; ++i ) if ( fv->b.selected[i] ) {
+ SplineChar *sc=NULL, dummy;
+ if ( (gid=fv->b.map->map[i])!=-1 )
+ sc = fv->b.sf->glyphs[gid];
+ if ( sc==NULL )
+ sc = SCBuildDummy(&dummy,fv->b.sf,fv->b.map,i);
+ if ( SFIsSomethingBuildable(fv->b.sf,sc,false)) {
+ anybuildable = true;
+ break;
+ }
+ }
+ }
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "build1" ),
+ anybuildable );
+
+ anytraceable = false;
+ if ( FindAutoTraceName()!=NULL && anychars!=-1 ) {
+ int i;
+ for ( i=0; i<fv->b.map->enccount; ++i )
+ if ( fv->b.selected[i] && (gid=fv->b.map->map[i])!=-1 &&
+ fv->b.sf->glyphs[gid]!=NULL &&
+ fv->b.sf->glyphs[gid]->layers[ly_back].images!=NULL ) {
+ anytraceable = true;
+ break;
+ }
+ }
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "autotrace1" ),
+ anytraceable );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "interpolate_fonts1" ),
+ !fv->b.sf->onlybitmaps );
+
+#ifndef FONTFORGE_CONFIG_NONLINEAR
+ w = lookup_widget( GTK_WIDGET(menuitem), "non_linear_transform1" );
+ gtk_widget_hide(w);
+#endif
+#ifndef FONTFORGE_CONFIG_TILEPATH
+ w = lookup_widget( GTK_WIDGET(menuitem), "tilepath1" );
+ gtk_widget_hide(w);
+#endif
+}
+
+void FontViewMenu_ActivateHints(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int anychars = FVAnyCharSelected(fv);
+ int anygid = anychars<0 ? -1 : fv->b.map->map[anychars];
+ int multilayer = fv->b.sf->multilayer;
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "autohint1" ),
+ anygid!=-1 && !multilayer );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "hint_subsitution_pts1" ),
+ !fv->b.sf->order2 && anygid!=-1 && !multilayer );
+ if ( fv->b.sf->mm!=NULL && fv->b.sf->mm->apple )
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "hint_subsitution_pts1" ),
+ false);
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "auto_counter_hint1" ),
+ !fv->b.sf->order2 && anygid!=-1 && !multilayer );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "dont_autohint1" ),
+ !fv->b.sf->order2 && anygid!=-1 && !multilayer );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "autoinstr1" ),
+ fv->b.sf->order2 && anygid!=-1 && !multilayer );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "edit_instructions1" ),
+ fv->b.sf->order2 && anygid>=0 && !multilayer );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "edit_fpgm1" ),
+ fv->b.sf->order2 && !multilayer );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "edit_prep1" ),
+ fv->b.sf->order2 && !multilayer );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "edit_cvt_1" ),
+ fv->b.sf->order2 && !multilayer );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "edit_maxp1" ),
+ fv->b.sf->order2 && !multilayer );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "private_to_cvt_1" ),
+ fv->b.sf->order2 && !multilayer );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "clear_hints1" ),
+ anygid!=-1 );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "clear_instructions1" ),
+ fv->b.sf->order2 && anygid!=-1 );
+}
+
+/* Builds up a menu containing all the anchor classes */
+void FontViewMenu_ActivateAnchoredPairs(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+
+ _aplistbuild(menuitem,fv->b.sf,FontViewMenu_AnchoredPairs);
+}
+
+void FontViewMenu_ActivateCombinations(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ SplineFont *sf = fv->b.sf;
+ EncMap *map = fv->b.map;
+ int i, gid, anyligs=0, anykerns=0;
+ PST *pst;
+
+ if ( sf->kerns ) anykerns=true;
+ for ( i=0; i<map->enccount; ++i ) if ( (gid=map->map[i])!=-1 && sf->glyphs[gid]!=NULL ) {
+ for ( pst=sf->glyphs[gid]->possub; pst!=NULL; pst=pst->next ) {
+ if ( pst->type==pst_ligature ) {
+ anyligs = true;
+ if ( anykerns )
+ break;
+ }
+ }
+ if ( sf->glyphs[gid]->kerns!=NULL ) {
+ anykerns = true;
+ if ( anyligs )
+ break;
+ }
+ }
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "ligatures2" ),
+ anyligs);
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "kern_pairs1" ),
+ anykerns);
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "anchor_pairs1" ),
+ sf->anchor!=NULL);
+}
+
+void FontViewMenu_ActivateView(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int anychars = FVAnyCharSelected(fv);
+ int i;
+ BDFFont *bdf;
+ int pos;
+ SplineFont *sf = fv->b.sf;
+ EncMap *map = fv->b.map;
+ GtkWidget *menu = gtk_menu_item_get_submenu(menuitem);
+ GList *kids, *next;
+ static int sizes[] = { 24, 36, 48, 72, 96, 0 };
+ char buffer[60];
+
+ /* First remove anything we might have added previously */
+ for ( kids = GTK_MENU_SHELL(menu)->children; kids!=NULL; kids = next ) {
+ GtkWidget *w = kids->data;
+ next = kids->next;
+ if ( strcmp(gtk_widget_get_name(w),"temporary")==0 )
+ gtk_container_remove(GTK_CONTAINER(menu),w);
+ }
+
+ /* Then add any pre-built bitmap sizes */
+ if ( sf->bitmaps!=NULL ) {
+ GtkWidget *w;
+
+ w = gtk_separator_menu_item_new();
+ gtk_widget_show(w);
+ gtk_widget_set_name(w,"temporary");
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu),w);
+
+ for ( bdf = sf->bitmaps; bdf!=NULL; bdf=bdf->next ) {
+ if ( BDFDepth(bdf)==1 )
+ sprintf( buffer, _("%d pixel bitmap"), bdf->pixelsize );
+ else
+ sprintf( buffer, _("%d@%d pixel bitmap"),
+ bdf->pixelsize, BDFDepth(bdf) );
+ w = gtk_check_menu_item_new_with_label( buffer );
+ gtk_widget_show(w);
+ gtk_widget_set_name(w,"temporary");
+ gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(w), bdf==fv->show );
+ g_signal_connect ( G_OBJECT( w ), "activate",
+ G_CALLBACK (FontViewMenu_ShowBitmap),
+ bdf);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu),w);
+ }
+ }
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "next_glyph1" ),
+ anychars>=0 && anychars<map->enccount-1 );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "prev_glyph1" ),
+ anychars>0 );
+ if ( anychars<0 ) pos = map->enccount;
+ else for ( pos = anychars+1; pos<map->enccount &&
+ (map->map[pos]==-1 || !SCWorthOutputting(sf->glyphs[map->map[pos]]));
+ ++pos );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "next_defined_glyph1" ),
+ pos!=map->enccount );
+ for ( pos=anychars-1; pos>=0 &&
+ (map->map[pos]==-1 || !SCWorthOutputting(sf->glyphs[map->map[pos]]));
+ --pos );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "prev_defined_glyph1" ),
+ pos>=0 );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "show_v_metrics1" ),
+ fv->b.sf->hasvmetrics );
+
+ for ( i=0; sizes[i]!=0; ++i ) {
+ char buffer[80];
+ sprintf( buffer, "_%d_pixel_outline1", sizes[i]);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
+ lookup_widget( GTK_WIDGET(menuitem), buffer )),
+ (fv->show!=NULL && fv->show==fv->filled && fv->show->pixelsize==sizes[i]));
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), buffer ),
+ !fv->b.sf->onlybitmaps || fv->show==fv->filled );
+ }
+
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
+ lookup_widget( GTK_WIDGET(menuitem), "anti_alias1" )),
+ (fv->show!=NULL && fv->show->clut!=NULL));
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "anti_alias1" ),
+ !fv->b.sf->onlybitmaps || fv->show==fv->filled );
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
+ lookup_widget( GTK_WIDGET(menuitem), "fit_to_em1" )),
+ (fv->show!=NULL && !fv->show->bbsized));
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "fit_to_em1" ),
+ !fv->b.sf->onlybitmaps || fv->show==fv->filled );
+}
+
+void FontViewMenu_ActivateMetrics(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int i;
+ int anychars = FVAnyCharSelected(fv);
+ char *argnames[] = { "center_in_width1", "thirds_in_width1", "set_width1",
+ "set_lbearing1", "set_rbearing1", "set_vertical_advance1", NULL };
+ char *vnames[] = { "vkern_by_classes1", "vkern_from_hkern1",
+ "remove_all_vkern_pairs1", NULL };
+
+ for ( i=0; argnames[i]!=NULL; ++i )
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), argnames[i] ),
+ anychars!=-1 );
+ if ( !fv->b.sf->hasvmetrics )
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "set_vertical_advance1" ),
+ false );
+ for ( i=0; vnames[i]!=NULL; ++i )
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), vnames[i] ),
+ fv->b.sf->hasvmetrics );
+}
+
+void FontViewMenu_ActivateCID(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int j;
+ SplineFont *sub, *cidmaster = fv->b.cidmaster;
+ GtkWidget *menu = gtk_menu_item_get_submenu(menuitem);
+ GList *kids, *next;
+
+ /* First remove anything we might have added previously */
+ for ( kids = GTK_MENU_SHELL(menu)->children; kids!=NULL; kids = next ) {
+ GtkWidget *w = kids->data;
+ next = kids->next;
+ if ( strcmp(gtk_widget_get_name(w),"temporary")==0 )
+ gtk_container_remove(GTK_CONTAINER(menu),w);
+ }
+
+ /* Then add any sub-fonts */
+ if ( cidmaster!=NULL ) {
+ GtkWidget *w;
+
+ w = gtk_separator_menu_item_new();
+ gtk_widget_show(w);
+ gtk_widget_set_name(w,"temporary");
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu),w);
+
+ for ( j = 0; j<cidmaster->subfontcnt; ++j ) {
+ sub = cidmaster->subfonts[j];
+ w = gtk_check_menu_item_new_with_label( sub->fontname );
+ gtk_widget_show(w);
+ gtk_widget_set_name(w,"temporary");
+ gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(w), sub==fv->b.sf );
+ g_signal_connect ( G_OBJECT( w ), "activate",
+ G_CALLBACK (FontViewMenu_ShowSubFont),
+ sub);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu),w);
+ }
+ }
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "convert_to_cid1" ),
+ cidmaster==NULL && fv->b.sf->mm==NULL );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "convert_by_cmap1" ),
+ cidmaster==NULL && fv->b.sf->mm==NULL );
+
+ /* OpenType allows at most 255 subfonts (PS allows more, but why go to the effort to make safe font check that? */
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "insert_font1" ),
+ cidmaster!=NULL && cidmaster->subfontcnt<255 );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "insert_empty_font1" ),
+ cidmaster!=NULL && cidmaster->subfontcnt<255 );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "remove_font1" ),
+ cidmaster!=NULL && cidmaster->subfontcnt>1 );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "flatten1" ),
+ cidmaster!=NULL );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "flatten_by_cmap1" ),
+ cidmaster!=NULL );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "cid_font_info1" ),
+ cidmaster!=NULL );
+}
+
+void FontViewMenu_ActivateMM(GtkMenuItem *menuitem, gpointer user_data) {
+ FontView *fv = FV_From_MI(menuitem);
+ int j;
+ MMSet *mm = fv->b.sf->mm;
+ SplineFont *sub;
+ GtkWidget *menu = gtk_menu_item_get_submenu(menuitem);
+ GList *kids, *next;
+
+ /* First remove anything we might have added previously */
+ for ( kids = GTK_MENU_SHELL(menu)->children; kids!=NULL; kids = next ) {
+ GtkWidget *w = kids->data;
+ next = kids->next;
+ if ( strcmp(gtk_widget_get_name(w),"temporary")==0 )
+ gtk_container_remove(GTK_CONTAINER(menu),w);
+ }
+
+ /* Then add any sub-fonts */
+ if ( mm!=NULL ) {
+ GtkWidget *w;
+
+ w = gtk_separator_menu_item_new();
+ gtk_widget_show(w);
+ gtk_widget_set_name(w,"temporary");
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu),w);
+
+ for ( j = 0; j<mm->instance_count+1; ++j ) {
+ if ( j==0 )
+ sub = mm->normal;
+ else
+ sub = mm->instances[j-1];
+ w = gtk_check_menu_item_new_with_label( sub->fontname );
+ gtk_widget_show(w);
+ gtk_widget_set_name(w,"temporary");
+ gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(w), sub==fv->b.sf );
+ g_signal_connect ( G_OBJECT( w ), "activate",
+ G_CALLBACK (FontViewMenu_ShowSubFont),
+ sub);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu),w);
+ }
+ }
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "mm_validity_check1" ),
+ mm!=NULL );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "mm_info1" ),
+ mm!=NULL );
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "blend_to_new_font1" ),
+ mm!=NULL );
+
+ gtk_widget_set_sensitive(lookup_widget( GTK_WIDGET(menuitem), "mm_change_def_weights1" ),
+ mm!=NULL && !mm->apple );
+}
+
+static int FeatureTrans(FontView *fv, int enc) {
+ SplineChar *sc;
+ PST *pst;
+ char *pt;
+ int gid;
+
+ if ( enc<0 || enc>=fv->b.map->enccount || (gid = fv->b.map->map[enc])==-1 )
+return( -1 );
+ if ( fv->cur_subtable==NULL )
+return( gid );
+
+ sc = fv->b.sf->glyphs[gid];
+ if ( sc==NULL )
+return( -1 );
+ for ( pst = sc->possub; pst!=NULL; pst=pst->next ) {
+ if (( pst->type == pst_substitution || pst->type == pst_alternate ) &&
+ pst->subtable == fv->cur_subtable )
+ break;
+ }
+ if ( pst==NULL )
+return( -1 );
+ pt = strchr(pst->u.subs.variant,' ');
+ if ( pt!=NULL )
+ *pt = '\0';
+ gid = SFFindExistingSlot(fv->b.sf, -1, pst->u.subs.variant );
+ if ( pt!=NULL )
+ *pt = ' ';
+return( gid );
+}
+
+void FVRefreshChar(FontView *fv,int gid) {
+ BDFChar *bdfc;
+ int i, j, enc;
+ MetricsView *mv;
+ uint32 clut[256];
+ GdkGCValues values;
+ GdkGC *gc = fv->v->style->bg_gc[fv->v->state];
+
+ gdk_gc_get_values(gc,&values);
+
+ /* Can happen in scripts */ /* Can happen if we do an AutoHint when generating a tiny font for freetype context */
+ if ( fv->v==NULL || fv->colcnt==0 || fv->b.sf->glyphs[gid]== NULL )
+return;
+
+ FVBDFCInitClut(fv,fv->show, clut);
+
+ for ( fv=(FontView *) fv->b.sf->fv; fv!=NULL; fv = (FontView *) fv->b.nextsame ) {
+ for ( mv=fv->b.sf->metrics; mv!=NULL; mv=mv->next )
+ MVRefreshChar(mv,fv->b.sf->glyphs[gid]);
+ if ( fv->show==fv->filled )
+ bdfc = BDFPieceMealCheck(fv->show,gid);
+ else
+ bdfc = fv->show->glyphs[gid];
+ /* A glyph may be encoded in several places, all need updating */
+ for ( enc = 0; enc<fv->b.map->enccount; ++enc ) if ( fv->b.map->map[enc]==gid ) {
+ i = enc / fv->colcnt;
+ j = enc - i*fv->colcnt;
+ i -= fv->rowoff;
+ if ( i>=0 && i<fv->rowcnt ) {
+ GdkRectangle box;
+ if ( bdfc==NULL )
+ continue;
+ FVBDFCToSlot(fv,fv->show,bdfc,clut);
+
+ box.x = j*fv->cbw+1; box.width = fv->cbw-1;
+ box.y = i*fv->cbh+fv->lab_height+1; box.height = fv->cbw;
+ gdk_draw_rectangle(GDK_DRAWABLE(fv->v->window),gc,TRUE,
+ box.x, box.y, box.width, box.height);
+ gdk_pixbuf_render_to_drawable(fv->char_slot,GDK_DRAWABLE(fv->v->window),
+ gc,0,0,
+ box.x+(fv->cbw-2-fv->magnify*(bdfc->xmax-bdfc->xmin+1))/2,
+ box.y,
+ gdk_pixbuf_get_width(fv->char_slot),gdk_pixbuf_get_height(fv->char_slot),
+ FALSE, 0,0 );
+ if ( fv->b.selected[enc] ) {
+ gdk_gc_set_function(gc,GDK_XOR);
+ gdk_draw_rectangle(GDK_DRAWABLE(fv->v->window), gc, TRUE,
+ box.x, box.y, box.width, box.height);
+ gdk_gc_set_values(gc,&values, GDK_GC_FUNCTION );
+ }
+ }
+ }
+ }
+}
+
+void FVRegenChar(FontView *fv,SplineChar *sc) {
+ struct splinecharlist *dlist;
+ MetricsView *mv;
+
+ if ( fv->v==NULL ) /* Can happen in scripts */
+return;
+
+ /* sc->changedsincelasthinted = true;*/ /* Why was this here? */
+ if ( sc->orig_pos>=fv->filled->glyphcnt )
+ IError("Character out of bounds in bitmap font %d>=%d", sc->orig_pos, fv->filled->glyphcnt );
+ else
+ BDFCharFree(fv->filled->glyphs[sc->orig_pos]);
+ fv->filled->glyphs[sc->orig_pos] = NULL;
+ /* FVRefreshChar does NOT do this for us */
+ for ( mv=fv->b.sf->metrics; mv!=NULL; mv=mv->next )
+ MVRegenChar(mv,sc);
+
+ FVRefreshChar(fv,sc->orig_pos);
+#if HANYANG
+ if ( sc->compositionunit && fv->b.sf->rules!=NULL )
+ Disp_RefreshChar(fv->b.sf,sc);
+#endif
+
+ for ( dlist=sc->dependents; dlist!=NULL; dlist=dlist->next )
+ FVRegenChar(fv,dlist->sc);
+}
+
+SplineChar *SCBuildDummy(SplineChar *dummy,SplineFont *sf,EncMap *map,int i) {
+ static char namebuf[100];
+#ifdef FONTFORGE_CONFIG_TYPE3
+ static Layer layers[2];
+#endif
+
+ memset(dummy,'\0',sizeof(*dummy));
+ dummy->color = COLOR_DEFAULT;
+ dummy->layer_cnt = 2;
+#ifdef FONTFORGE_CONFIG_TYPE3
+ dummy->layers = layers;
+#endif
+ if ( sf->cidmaster!=NULL ) {
+ /* CID fonts don't have encodings, instead we must look up the cid */
+ if ( sf->cidmaster->loading_cid_map )
+ dummy->unicodeenc = -1;
+ else
+ dummy->unicodeenc = CID2NameUni(FindCidMap(sf->cidmaster->cidregistry,sf->cidmaster->ordering,sf->cidmaster->supplement,sf->cidmaster),
+ i,namebuf,sizeof(namebuf));
+ } else
+ dummy->unicodeenc = UniFromEnc(i,map->enc);
+
+ if ( sf->cidmaster!=NULL )
+ dummy->name = namebuf;
+ else if ( map->enc->psnames!=NULL && i<map->enc->char_cnt &&
+ map->enc->psnames[i]!=NULL )
+ dummy->name = map->enc->psnames[i];
+ else if ( dummy->unicodeenc==-1 )
+ dummy->name = NULL;
+ else
+ dummy->name = (char *) StdGlyphName(namebuf,dummy->unicodeenc,sf->uni_interp,sf->for_new_glyphs);
+ if ( dummy->name==NULL ) {
+ /*if ( dummy->unicodeenc!=-1 || i<256 )
+ dummy->name = ".notdef";
+ else*/ {
+ int j;
+ sprintf( namebuf, "NameMe.%d", i);
+ j=0;
+ while ( SFFindExistingSlot(sf,-1,namebuf)!=-1 )
+ sprintf( namebuf, "NameMe.%d.%d", i, ++j);
+ dummy->name = namebuf;
+ }
+ }
+ dummy->width = dummy->vwidth = sf->ascent+sf->descent;
+ if ( dummy->unicodeenc>0 && dummy->unicodeenc<0x10000 &&
+ iscombining(dummy->unicodeenc)) {
+ /* Mark characters should be 0 width */
+ dummy->width = 0;
+ /* Except in monospaced fonts on windows, where they should be the */
+ /* same width as everything else */
+ }
+ /* Actually, in a monospace font, all glyphs should be the same width */
+ /* whether mark or not */
+ if ( sf->pfminfo.panose_set && sf->pfminfo.panose[3]==9 &&
+ sf->glyphcnt>0 ) {
+ for ( i=sf->glyphcnt-1; i>=0; --i )
+ if ( SCWorthOutputting(sf->glyphs[i])) {
+ dummy->width = sf->glyphs[i]->width;
+ break;
+ }
+ }
+ dummy->parent = sf;
+ dummy->orig_pos = 0xffff;
+return( dummy );
+}
+
+static SplineChar *_SFMakeChar(SplineFont *sf,EncMap *map,int enc) {
+ SplineChar dummy, *sc;
+ SplineFont *ssf;
+ int j, real_uni, gid;
+ extern const int cns14pua[], amspua[];
+
+ if ( enc>=map->enccount )
+ gid = -1;
+ else
+ gid = map->map[enc];
+ if ( sf->subfontcnt!=0 && gid!=-1 ) {
+ ssf = NULL;
+ for ( j=0; j<sf->subfontcnt; ++j )
+ if ( gid<sf->subfonts[j]->glyphcnt ) {
+ ssf = sf->subfonts[j];
+ if ( ssf->glyphs[gid]!=NULL ) {
+return( ssf->glyphs[gid] );
+ }
+ }
+ sf = ssf;
+ }
+
+ if ( gid==-1 || (sc = sf->glyphs[gid])==NULL ) {
+ if (( map->enc->is_unicodebmp || map->enc->is_unicodefull ) &&
+ ( enc>=0xe000 && enc<=0xf8ff ) &&
+ ( sf->uni_interp==ui_ams || sf->uni_interp==ui_trad_chinese ) &&
+ ( real_uni = (sf->uni_interp==ui_ams ? amspua : cns14pua)[enc-0xe000])!=0 ) {
+ if ( real_uni<map->enccount ) {
+ SplineChar *sc;
+ /* if necessary, create the real unicode code point */
+ /* and then make us be a duplicate of it */
+ sc = _SFMakeChar(sf,map,real_uni);
+ map->map[enc] = gid = sc->orig_pos;
+ SCCharChangedUpdate(sc);
+return( sc );
+ }
+ }
+
+ SCBuildDummy(&dummy,sf,map,enc);
+ if ((sc = SFGetChar(sf,dummy.unicodeenc,dummy.name))!=NULL ) {
+ map->map[enc] = sc->orig_pos;
+return( sc );
+ }
+ sc = SplineCharCreate();
+ sc->unicodeenc = dummy.unicodeenc;
+ sc->name = copy(dummy.name);
+ sc->width = dummy.width;
+ sc->parent = sf;
+ sc->orig_pos = 0xffff;
+ /*SCLigDefault(sc);*/
+ SFAddGlyphAndEncode(sf,sc,map,enc);
+ }
+return( sc );
+}
+
+SplineChar *SFMakeChar(SplineFont *sf,EncMap *map, int enc) {
+ int gid;
+
+ if ( enc==-1 )
+return( NULL );
+ if ( enc>=map->enccount )
+ gid = -1;
+ else
+ gid = map->map[enc];
+ if ( sf->mm!=NULL && (gid==-1 || sf->glyphs[gid]==NULL) ) {
+ int j;
+ _SFMakeChar(sf->mm->normal,map,enc);
+ for ( j=0; j<sf->mm->instance_count; ++j )
+ _SFMakeChar(sf->mm->instances[j],map,enc);
+ }
+return( _SFMakeChar(sf,map,enc));
+}
+
+#if !defined(FONTFORGE_CONFIG_NO_WINDOWING_UI)
+static void AddSubPST(SplineChar *sc,struct lookup_subtable *sub,char *variant) {
+ PST *pst;
+
+ pst = chunkalloc(sizeof(PST));
+ pst->type = pst_substitution;
+ pst->subtable = sub;
+ pst->u.alt.components = copy(variant);
+ pst->next = sc->possub;
+ sc->possub = pst;
+}
+
+SplineChar *FVMakeChar(FontView *fv,int enc) {
+ SplineFont *sf = fv->b.sf;
+ SplineChar *base_sc = SFMakeChar(sf,fv->b.map,enc), *feat_sc = NULL;
+ int feat_gid = FeatureTrans(fv,enc);
+
+ if ( fv->cur_subtable==NULL )
+return( base_sc );
+
+ if ( feat_gid==-1 ) {
+ int uni = -1;
+ FeatureScriptLangList *fl = fv->cur_subtable->lookup->features;
+
+ if ( base_sc->unicodeenc>=0x600 && base_sc->unicodeenc<=0x6ff &&
+ fl!=NULL &&
+ (fl->featuretag == CHR('i','n','i','t') ||
+ fl->featuretag == CHR('m','e','d','i') ||
+ fl->featuretag == CHR('f','i','n','a') ||
+ fl->featuretag == CHR('i','s','o','l')) ) {
+ uni = fl->featuretag == CHR('i','n','i','t') ? ArabicForms[base_sc->unicodeenc-0x600].initial :
+ fl->featuretag == CHR('m','e','d','i') ? ArabicForms[base_sc->unicodeenc-0x600].medial :
+ fl->featuretag == CHR('f','i','n','a') ? ArabicForms[base_sc->unicodeenc-0x600].final :
+ fl->featuretag == CHR('i','s','o','l') ? ArabicForms[base_sc->unicodeenc-0x600].isolated :
+ -1;
+ feat_sc = SFGetChar(sf,uni,NULL);
+ if ( feat_sc!=NULL )
+return( feat_sc );
+ }
+ feat_sc = SplineCharCreate();
+ feat_sc->parent = sf;
+ feat_sc->unicodeenc = uni;
+ if ( uni!=-1 ) {
+ feat_sc->name = galloc(8);
+ feat_sc->unicodeenc = uni;
+ sprintf( feat_sc->name,"uni%04X", uni );
+ } else if ( fv->cur_subtable->suffix!=NULL ) {
+ feat_sc->name = galloc(strlen(base_sc->name)+strlen(fv->cur_subtable->suffix)+2);
+ sprintf( feat_sc->name, "%s.%s", base_sc->name, fv->cur_subtable->suffix );
+ } else if ( fl==NULL ) {
+ feat_sc->name = strconcat(base_sc->name,".unknown");
+ } else if ( fl->ismac ) {
+ /* mac feature/setting */
+ feat_sc->name = galloc(strlen(base_sc->name)+14);
+ sprintf( feat_sc->name,"%s.m%d_%d", base_sc->name,
+ (int) (fl->featuretag>>16),
+ (int) ((fl->featuretag)&0xffff) );
+ } else {
+ /* OpenType feature tag */
+ feat_sc->name = galloc(strlen(base_sc->name)+6);
+ sprintf( feat_sc->name,"%s.%c%c%c%c", base_sc->name,
+ (int) (fl->featuretag>>24),
+ (int) ((fl->featuretag>>16)&0xff),
+ (int) ((fl->featuretag>>8)&0xff),
+ (int) ((fl->featuretag)&0xff) );
+ }
+ SFAddGlyphAndEncode(sf,feat_sc,fv->b.map,fv->b.map->enccount);
+ AddSubPST(base_sc,fv->cur_subtable,feat_sc->name);
+return( feat_sc );
+ } else
+return( base_sc );
+}
+#else
+SplineChar *FVMakeChar(FontView *fv,int enc) {
+ SplineFont *sf = fv->b.sf;
+return( SFMakeChar(sf,fv->b.map,enc) );
+}
+#endif
+
+static GdkPixbuf *gdk_pixbuf_rotate(GdkPixbuf *unrot) {
+ int orig_width = gdk_pixbuf_get_width(unrot);
+ int orig_height = gdk_pixbuf_get_height(unrot);
+ int orig_rowstride = gdk_pixbuf_get_rowstride(unrot);
+ gchar *orig_pixels = gdk_pixbuf_get_pixels(unrot);
+ GdkPixbuf *rot = gdk_pixbuf_new(GDK_COLORSPACE_RGB,false,8,orig_height,orig_width);
+ int new_rowstride;
+ gchar *new_pixels;
+ int i,j;
+ int n = gdk_pixbuf_get_n_channels(unrot);
+
+ if ( rot==NULL )
+return( NULL );
+
+ new_rowstride = gdk_pixbuf_get_rowstride(rot);
+ new_pixels = gdk_pixbuf_get_pixels(rot);
+ for ( i=0; i<orig_height; ++i ) for ( j=0; j<orig_width; ++j ) {
+ gchar *orig_p = &orig_pixels[(i*orig_rowstride+j)*n];
+ gchar *new_p = &new_pixels[(j*new_rowstride+i)*3];
+ new_p[0] = orig_p[0];
+ new_p[1] = orig_p[1];
+ new_p[2] = orig_p[2];
+ }
+return( rot );
+}
+
+static GdkPixbuf *UniGetRotatedGlyph(FontView *fv, SplineChar *sc,int uni) {
+ SplineFont *sf = fv->b.sf;
+ int cid=-1;
+ static GdkPixmap *pixmap=NULL;
+ char buf[20], *pt;
+ GdkPixbuf *unrot, *rot;
+ SplineFont *cm = sf->cidmaster;
+ PangoRectangle pos;
+
+ if ( uni!=-1 )
+ /* Do nothing */;
+ else if ( sscanf(sc->name,"vertuni%x", (unsigned *) &uni)==1 )
+ /* All done */;
+ else if ( cm!=NULL &&
+ ((cid=CIDFromName(sc->name,cm))!=-1 ||
+ sscanf( sc->name, "cid-%d", &cid)==1 || /* Obsolete names */
+ sscanf( sc->name, "vertcid_%d", &cid)==1 ||
+ sscanf( sc->name, "cid_%d", &cid)==1 )) {
+ uni = CID2Uni(FindCidMap(cm->cidregistry,cm->ordering,cm->supplement,cm),
+ cid);
+ }
+ /*if ( uni&0x10000 ) uni -= 0x10000; *//* Bug in some old cidmap files */
+ if ( uni<0 || uni>0x10ffff )
+return( NULL );
+
+ if ( pixmap==NULL ) {
+ pixmap = gdk_pixmap_new(fv->v->window,2*fv->lab_height,2*fv->lab_height,-1);
+ if ( pixmap==NULL )
+return( NULL );
+ }
+ gdk_draw_rectangle(GDK_DRAWABLE(pixmap),fv->v->style->bg_gc[fv->v->state],
+ true, 0,0, 2*fv->lab_height,2*fv->lab_height);
+ pt = buf;
+ pt = utf8_idpb(pt,uni);
+ *pt = '\0';
+ pango_layout_set_text( fv->vlayout, buf, -1);
+ gdk_draw_layout( GDK_DRAWABLE(pixmap), fv->v->style->fg_gc[GTK_STATE_NORMAL],
+ 0, 0, fv->vlayout );
+ pango_layout_index_to_pos(fv->vlayout,0,&pos);
+ unrot = gdk_pixbuf_get_from_drawable(NULL,GDK_DRAWABLE(pixmap),NULL,
+ 0,0, 0,0, pos.width/1000,pos.height/1000);
+ if ( unrot==NULL )
+return( NULL );
+
+ rot = gdk_pixbuf_rotate(unrot);
+ g_object_unref(G_OBJECT(unrot));
+return( rot );
+}
+
+/* Mathmatical Alphanumeric Symbols in the 1d400-1d7ff range are styled */
+/* variants on latin, greek, and digits */
+#define _uni_bold 0x1
+#define _uni_italic 0x2
+#define _uni_script (1<<2)
+#define _uni_fraktur (2<<2)
+#define _uni_doublestruck (3<<2)
+#define _uni_sans (4<<2)
+#define _uni_mono (5<<2)
+#define _uni_fontmax (6<<2)
+#define _uni_latin 0
+#define _uni_greek 1
+#define _uni_digit 2
+
+static int latinmap[] = {
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+ '\0'
+};
+static int greekmap[] = {
+ 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, 0x399, 0x39a,
+ 0x39b, 0x39c, 0x39d, 0x39e, 0x39f, 0x3a0, 0x3a1, 0x3f4, 0x3a3, 0x3a4,
+ 0x3a5, 0x3a6, 0x3a7, 0x3a8, 0x3a9, 0x2207,
+ 0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7, 0x3b8, 0x3b9, 0x3ba,
+ 0x3bb, 0x3bc, 0x3bd, 0x3be, 0x3bf, 0x3c0, 0x3c1, 0x3c2, 0x3c3, 0x3c4,
+ 0x3c5, 0x3c6, 0x3c7, 0x3c8, 0x3c9,
+ 0x2202, 0x3f5, 0x3d1, 0x3f0, 0x3d5, 0x3f1, 0x3d6,
+ 0
+};
+static int digitmap[] = { '0', '1', '2', '3', '4', '5', '6','7','8','9', '\0' };
+static int *maps[] = { latinmap, greekmap, digitmap };
+
+static struct { int start, last; int styles; int charset; } mathmap[] = {
+ { 0x1d400, 0x1d433, _uni_bold, _uni_latin },
+ { 0x1d434, 0x1d467, _uni_italic, _uni_latin },
+ { 0x1d468, 0x1d49b, _uni_bold|_uni_italic, _uni_latin },
+ { 0x1d49c, 0x1d4cf, _uni_script, _uni_latin },
+ { 0x1d4d0, 0x1d503, _uni_script|_uni_bold, _uni_latin },
+ { 0x1d504, 0x1d537, _uni_fraktur, _uni_latin },
+ { 0x1d538, 0x1d56b, _uni_doublestruck, _uni_latin },
+ { 0x1d56c, 0x1d59f, _uni_fraktur|_uni_bold, _uni_latin },
+ { 0x1d5a0, 0x1d5d3, _uni_sans, _uni_latin },
+ { 0x1d5d4, 0x1d607, _uni_sans|_uni_bold, _uni_latin },
+ { 0x1d608, 0x1d63b, _uni_sans|_uni_italic, _uni_latin },
+ { 0x1d63c, 0x1d66f, _uni_sans|_uni_bold|_uni_italic, _uni_latin },
+ { 0x1d670, 0x1d6a3, _uni_mono, _uni_latin },
+ { 0x1d6a8, 0x1d6e1, _uni_bold, _uni_greek },
+ { 0x1d6e2, 0x1d71b, _uni_italic, _uni_greek },
+ { 0x1d71c, 0x1d755, _uni_bold|_uni_italic, _uni_greek },
+ { 0x1d756, 0x1d78f, _uni_sans|_uni_bold, _uni_greek },
+ { 0x1d790, 0x1d7c9, _uni_sans|_uni_bold|_uni_italic, _uni_greek },
+ { 0x1d7ce, 0x1d7d7, _uni_bold, _uni_digit },
+ { 0x1d7d8, 0x1d7e1, _uni_doublestruck, _uni_digit },
+ { 0x1d7e2, 0x1d7eb, _uni_sans, _uni_digit },
+ { 0x1d7ec, 0x1d7f5, _uni_sans|_uni_bold, _uni_digit },
+ { 0x1d7f6, 0x1d7ff, _uni_mono, _uni_digit },
+ { 0, 0 }
+};
+
+static PangoFontDescription *FVCheckFont(FontView *fv,int type) {
+ PangoFontDescription *pfd;
+ PangoContext *context;
+ int family = type>>2;
+ char *fontnames;
+
+#if 0 /* How do I do this in gtk???? */
+ static char *resourcenames[] = { "FontView.SerifFamily", "FontView.ScriptFamily",
+ "FontView.FrakturFamily", "FontView.DoubleStruckFamily",
+ "FontView.SansFamily", "FontView.MonoFamily", NULL };
+#endif
+ static char *defaultfontnames[] = {
+ "times,serif,caslon,clearlyu,unifont",
+ "script,formalscript,clearlyu,unifont",
+ "fraktur,clearlyu,unifont",
+ "doublestruck,clearlyu,unifont",
+ "helvetica,caliban,sansserif,sans,clearlyu,unifont",
+ "courier,monospace,clearlyu,unifont",
+ NULL
+ };
+
+ if ( fv->fontset[type]==NULL ) {
+#if 0
+ fontnames = GResourceFindString(resourcenames[family]);
+#else
+ fontnames = NULL;
+#endif
+ if ( fontnames==NULL )
+ fontnames = defaultfontnames[family];
+
+ pfd = pango_font_description_new();
+ pango_font_description_set_family(pfd,fontnames);
+ if ( type&_uni_bold )
+ pango_font_description_set_weight(pfd,700);
+ if ( type&_uni_italic )
+ pango_font_description_set_style(pfd,PANGO_STYLE_ITALIC);
+ context = gtk_widget_get_pango_context( fv->v );
+ pango_font_description_merge(pfd,fv->fontset[0],false);
+ fv->fontset[type] = pfd;
+ /*g_object_ref( G_OBJECT( fv->fontset[type] ));*/ /* font descriptions aren't objects */
+ }
+return( fv->fontset[type] );
+}
+
+extern unichar_t adobes_pua_alts[0x200][3];
+
+static void do_Adobe_Pua(char *buf,int sob,int uni) {
+ int i, j;
+ char *pt = buf;
+
+ for ( i=j=0; pt-buf<sob-4 && i<3; ++i ) {
+ int ch = adobes_pua_alts[uni-0xf600][i];
+ if ( ch==0 )
+ break;
+ if ( ch>=0xf600 && ch<=0xf7ff && adobes_pua_alts[ch-0xf600]!=0 ) {
+ do_Adobe_Pua(pt,sob-(pt-buf),ch);
+ while ( *pt!='\0' ) ++pt;
+ } else
+ pt = utf8_idpb(pt,ch);
+ }
+ *pt = 0;
+}
+
+static void gdk_gc_set_fg(GdkGC *gc,Color fg) {
+ GdkColor col;
+
+ col.red = ((fg>>16)&0xff)*0x101;
+ col.green = ((fg>>8 )&0xff)*0x101;
+ col.blue = ((fg )&0xff)*0x101;
+ col.pixel = fg;
+ gdk_gc_set_foreground(gc,&col);
+}
+
+gboolean FontViewView_Expose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) {
+ FontView *fv = FV_From_Widget(widget);
+ int i, j, width, gid;
+ int changed;
+ SplineChar dummy;
+ int styles, laststyles=0;
+ GdkPixbuf *rotated=NULL;
+ int em = fv->b.sf->ascent+fv->b.sf->descent;
+ int yorg = fv->magnify*(fv->show->ascent-fv->b.sf->vertical_origin*fv->show->pixelsize/em);
+ GdkRectangle r, full, box;
+ GdkGCValues values;
+ GdkGC *gc = fv->gc;
+ GdkColor col, *gdk_def_fg = &widget->style->fg[widget->state];
+ Color bg, def_fg = COLOR_CREATE( (gdk_def_fg->red>>8), (gdk_def_fg->green>>8), (gdk_def_fg->blue>>8));
+ uint32 clut[256];
+
+ full.x = full.y = 0; full.width = full.height = 5000;
+ gdk_gc_get_values(gc,&values);
+ FVBDFCInitClut(fv,fv->show,clut);
+
+ for ( i=0; i<=fv->rowcnt; ++i ) {
+ gdk_draw_line(GDK_DRAWABLE(widget->window),widget->style->fg_gc[GTK_STATE_NORMAL],0,i*fv->cbh,fv->width,i*fv->cbh);
+ gdk_draw_line(GDK_DRAWABLE(widget->window),widget->style->fg_gc[GTK_STATE_INSENSITIVE],0,i*fv->cbh+fv->lab_height,fv->width,i*fv->cbh+fv->lab_height);
+ }
+ for ( i=0; i<=fv->colcnt; ++i )
+ gdk_draw_line(GDK_DRAWABLE(widget->window),widget->style->fg_gc[GTK_STATE_NORMAL],
+ i*fv->cbw,0,i*fv->cbw,fv->height);
+ for ( i=event->area.y/fv->cbh; i<=fv->rowcnt &&
+ (event->area.y+event->area.height+fv->cbh-1)/fv->cbh; ++i ) for ( j=0; j<fv->colcnt; ++j ) {
+ int index = (i+fv->rowoff)*fv->colcnt+j;
+ int feat_gid;
+ SplineChar *sc;
+ styles = 0;
+ if ( index < fv->b.map->enccount && index!=-1 ) {
+ char utf8_buf[60];
+ Color fg;
+ extern const int amspua[];
+ int uni;
+ struct cidmap *cidmap = NULL;
+ sc = (gid=fv->b.map->map[index])!=-1 ? fv->b.sf->glyphs[gid]: NULL;
+
+ if ( fv->b.cidmaster!=NULL )
+ cidmap = FindCidMap(fv->b.cidmaster->cidregistry,fv->b.cidmaster->ordering,fv->b.cidmaster->supplement,fv->b.cidmaster);
+
+ if ( ( fv->b.map->enc==&custom && index<256 ) ||
+ ( fv->b.map->enc!=&custom && index<fv->b.map->enc->char_cnt ) ||
+ ( cidmap!=NULL && index<MaxCID(cidmap) ))
+ fg = def_fg;
+ else
+ fg = 0x505050;
+ if ( sc==NULL )
+ sc = SCBuildDummy(&dummy,fv->b.sf,fv->b.map,index);
+ uni = sc->unicodeenc;
+ memset(utf8_buf,0,10);
+ if ( fv->b.sf->uni_interp==ui_ams && uni>=0xe000 && uni<=0xf8ff &&
+ amspua[uni-0xe000]!=0 )
+ uni = amspua[uni-0xe000];
+ switch ( fv->glyphlabel ) {
+ case gl_name:
+ strncpy(utf8_buf,sc->name,sizeof(utf8_buf)-1);
+ styles = _uni_sans;
+ break;
+ case gl_unicode:
+ if ( sc->unicodeenc!=-1 )
+ sprintf(utf8_buf,"%04x",sc->unicodeenc);
+ else
+ strcpy(utf8_buf,"?");
+ styles = _uni_sans;
+ break;
+ case gl_encoding:
+ if ( fv->b.map->enc->only_1byte ||
+ (fv->b.map->enc->has_1byte && index<256))
+ sprintf(utf8_buf,"%02x",index);
+ else
+ sprintf(utf8_buf,"%04x",index);
+ styles = _uni_sans;
+ break;
+ case gl_glyph:
+ if ( uni==0xad )
+ utf8_buf[0] = '-';
+ else if ( fv->b.sf->uni_interp==ui_adobe && uni>=0xf600 && uni<=0xf7ff &&
+ adobes_pua_alts[uni-0xf600]!=0 ) {
+ do_Adobe_Pua(utf8_buf,sizeof(utf8_buf),uni);
+ } else if ( uni>=0x1d400 && uni<=0x1d7ff ) {
+ int i;
+ for ( i=0; mathmap[i].start!=0; ++i ) {
+ if ( uni<=mathmap[i].last ) {
+ char *pt = utf8_buf;
+ pt = utf8_idpb(pt,maps[mathmap[i].charset][uni-mathmap[i].start]);
+ *pt = '\0';
+ styles = mathmap[i].styles;
+ break;
+ }
+ }
+ } else if ( uni>=0xe0020 && uni<=0xe007e ) {
+ utf8_buf[0] = uni-0xe0000; /* A map of Ascii for language names */
+#if HANYANG
+ } else if ( sc->compositionunit ) {
+ if ( sc->jamo<19 )
+ buf[0] = 0x1100+sc->jamo;
+ else if ( sc->jamo<19+21 )
+ buf[0] = 0x1161 + sc->jamo-19;
+ else /* Leave a hole for the blank char */
+ buf[0] = 0x11a8 + sc->jamo-(19+21+1);
+#endif
+ } else if ( uni>0 && uni<unicode4_size ) {
+ char *pt = utf8_buf;
+ pt = utf8_idpb(pt,uni);
+ *pt = '\0';
+ } else {
+ char *pt = strchr(sc->name,'.');
+ char *upt = utf8_buf;
+ utf8_buf[0] = '?';
+ fg = 0xff0000;
+ if ( pt!=NULL ) {
+ int i, n = pt-sc->name;
+ char *end;
+ SplineFont *cm = fv->b.sf->cidmaster;
+ if ( n==7 && sc->name[0]=='u' && sc->name[1]=='n' && sc->name[2]=='i' &&
+ (i=strtol(sc->name+3,&end,16), end-sc->name==7))
+ upt = utf8_idpb(upt,i);
+ else if ( n>=5 && n<=7 && sc->name[0]=='u' &&
+ (i=strtol(sc->name+1,&end,16), end-sc->name==n))
+ upt = utf8_idpb(upt,i);
+ else if ( cm!=NULL && (i=CIDFromName(sc->name,cm))!=-1 ) {
+ int uni;
+ uni = CID2Uni(FindCidMap(cm->cidregistry,cm->ordering,cm->supplement,cm),
+ i);
+ if ( uni!=-1 )
+ upt = utf8_idpb(upt,i);
+ } else {
+ int uni;
+ *pt = '\0';
+ uni = UniFromName(sc->name,fv->b.sf->uni_interp,fv->b.map->enc);
+ if ( uni!=-1 )
+ upt = utf8_idpb(upt,uni);
+ *pt = '.';
+ }
+ if ( strstr(pt,".vert")!=NULL )
+ rotated = UniGetRotatedGlyph(fv,sc,utf8_buf[0]!='?'?utf8_buf[0]:-1);
+ if ( pt!=utf8_buf ) {
+ *pt = '\0';
+ fg = def_fg;
+ if ( strstr(pt,".italic")!=NULL )
+ styles = _uni_italic|_uni_mono;
+ }
+ } else if ( strncmp(sc->name,"hwuni",5)==0 ) {
+ int uni=-1;
+ char *pt = utf8_buf;
+ sscanf(sc->name,"hwuni%x", (unsigned *) &uni );
+ if ( uni!=-1 ) {
+ pt = utf8_idpb(pt,uni);
+ *pt = '\0';
+ }
+ } else if ( strncmp(sc->name,"italicuni",9)==0 ) {
+ int uni=-1;
+ char *pt = utf8_buf;
+ sscanf(sc->name,"italicuni%x", (unsigned *) &uni );
+ if ( uni!=-1 ) {
+ pt = utf8_idpb(pt,uni);
+ *pt = '\0';
+ styles=_uni_italic|_uni_mono;
+ }
+ fg = def_fg;
+ } else if ( strncmp(sc->name,"vertcid_",8)==0 ||
+ strncmp(sc->name,"vertuni",7)==0 ) {
+ rotated = UniGetRotatedGlyph(fv,sc,-1);
+ }
+ }
+ break;
+ }
+ bg = COLOR_DEFAULT;
+ r.x = j*fv->cbw+1; r.width = fv->cbw-1;
+ r.y = i*fv->cbh+1; r.height = fv->lab_height-1;
+ if ( sc->layers[ly_back].splines!=NULL || sc->layers[ly_back].images!=NULL ||
+ sc->color!=COLOR_DEFAULT ) {
+ bg = sc->color!=COLOR_DEFAULT?sc->color:0x808080;
+ col.pixel = bg;
+ col.red = ((bg>>16)&0xff)*0x101;
+ col.green = ((bg>>8 )&0xff)*0x101;
+ col.blue = ((bg )&0xff)*0x101;
+ gdk_gc_set_foreground(gc, &col);
+ gdk_draw_rectangle(fv->v->window,gc,TRUE,
+ r.x,r.y, r.width,r.height);
+ gdk_gc_set_values(gc,&values, GDK_GC_FOREGROUND );
+ }
+ if ( (!fv->b.sf->order2 && sc->changedsincelasthinted ) ||
+ ( fv->b.sf->order2 && sc->layers[ly_fore].splines!=NULL &&
+ sc->ttf_instrs_len<=0 ) ||
+ ( fv->b.sf->order2 && sc->instructions_out_of_date ) ) {
+ GdkColor hintcol;
+ memset(&hintcol,0,sizeof(hintcol));
+ if ( fv->b.sf->order2 && sc->instructions_out_of_date && sc->ttf_instrs_len>0 ) {
+ hintcol.red = 0xffff;
+ hintcol.pixel = 0xff0000;
+ } else {
+ hintcol.blue = 0xffff;
+ hintcol.pixel = 0x0000ff;
+ }
+ gdk_gc_set_foreground(gc, &hintcol);
+ gdk_draw_line(fv->v->window,gc,r.x,r.y,r.x,r.y+r.height-1);
+ gdk_draw_line(fv->v->window,gc,r.x+1,r.y,r.x+1,r.y+r.height-1);
+ gdk_draw_line(fv->v->window,gc,r.x+2,r.y,r.x+2,r.y+r.height-1);
+ gdk_draw_line(fv->v->window,gc,r.x+r.width-1,r.y,r.x+r.width-1,r.y+r.height-1);
+ gdk_draw_line(fv->v->window,gc,r.x+r.width-2,r.y,r.x+r.width-2,r.y+r.height-1);
+ gdk_draw_line(fv->v->window,gc,r.x+r.width-3,r.y,r.x+r.width-3,r.y+r.height-1);
+ gdk_gc_set_values(gc,&values, GDK_GC_FOREGROUND );
+ }
+ if ( rotated!=NULL ) {
+ gdk_pixbuf_render_to_drawable(rotated,GDK_DRAWABLE(fv->v->window),gc,0,0,
+ j*fv->cbw+2,i*fv->cbh+2,
+ gdk_pixbuf_get_width(rotated),gdk_pixbuf_get_height(rotated),
+ FALSE, 0,0 );
+ g_object_unref(G_OBJECT(rotated));
+ rotated = NULL;
+ } else {
+ int index;
+ PangoRectangle pos;
+ if ( styles!=laststyles )
+ pango_layout_set_font_description(fv->vlayout,FVCheckFont(fv,styles));
+ laststyles = styles;
+ pango_layout_set_text( fv->vlayout, utf8_buf, -1);
+ index = utf8_strlen(utf8_buf)-1;
+ pango_layout_index_to_pos(fv->vlayout,index,&pos);
+ width = (pos.x+pos.width)/1000;
+#if 0
+ if ( width==0 ) {
+ utf8_buf[0] = 0xe0 | (0xfffd>>12);
+ utf8_buf[1] = 0x80 | ((0xfffd>>6)&0x3f);
+ utf8_buf[2] = 0x80 | (0xfffd&0x3f);
+ utf8_buf[3] = 0;
+ pango_layout_set_text( fv->vlayout, utf8_buf, -1);
+ pango_layout_index_to_pos(fv->vlayout,0,&pos);
+ width = (pos.x+pos.width)/1000;
+ }
+#endif
+ if ( width >= fv->cbw-1 ) {
+ gdk_gc_set_clip_rectangle(gc,&r);
+ width = fv->cbw-1;
+ }
+ gdk_draw_layout( GDK_DRAWABLE(widget->window), gc,
+ j*fv->cbw+(fv->cbw-1-width)/2, i*fv->cbh+1,
+ fv->vlayout );
+ if ( width >= fv->cbw-1 )
+ gdk_gc_set_clip_rectangle(gc,&full);
+ laststyles = styles;
+ }
+ changed = sc->changed;
+ if ( fv->b.sf->onlybitmaps )
+ changed = gid==-1 || fv->show->glyphs[gid]==NULL? false : fv->show->glyphs[gid]->changed;
+ if ( changed ) {
+ GdkRectangle r;
+ r.x = j*fv->cbw+1; r.width = fv->cbw-1;
+ r.y = i*fv->cbh+1; r.height = fv->lab_height-1;
+ if ( bg!=COLOR_DEFAULT ) {
+ col.red = ((bg>>16)&0xff)*0x101;
+ col.green = ((bg>>8 )&0xff)*0x101;
+ col.blue = ((bg )&0xff)*0x101;
+ col.pixel = bg;
+ } else
+ col = values.background;
+ /* Bug!!! This only works on RealColor */
+ col.red ^= values.foreground.red;
+ col.green ^= values.foreground.green;
+ col.blue ^= values.foreground.blue;
+ col.pixel ^= values.foreground.pixel;
+ /* End bug */
+ gdk_gc_set_function(gc,GDK_XOR);
+ gdk_gc_set_foreground(gc, &col);
+ gdk_draw_rectangle(fv->v->window, gc, TRUE,
+ r.x, r.y, r.width, r.height);
+ gdk_gc_set_values(gc,&values,
+ GDK_GC_FOREGROUND | GDK_GC_FUNCTION );
+ }
+ }
+
+ feat_gid = FeatureTrans(fv,index);
+ sc = feat_gid!=-1 ? fv->b.sf->glyphs[feat_gid]: NULL;
+ if ( !SCWorthOutputting(sc) ) {
+ int x = j*fv->cbw+1, xend = x+fv->cbw-2;
+ int y = i*fv->cbh+fv->lab_height+1, yend = y+fv->cbw-1;
+ col.red = 0xdddd; col.green = col.blue = 0x8000; col.pixel = 0xdd8080;
+ gdk_gc_set_foreground(gc, &col);
+ gdk_draw_line(fv->v->window,gc,x,y,xend,yend);
+ gdk_draw_line(fv->v->window,gc,x,yend,xend,y);
+ gdk_gc_set_values(gc,&values, GDK_GC_FOREGROUND );
+ }
+ if ( sc!=NULL ) {
+ BDFChar *bdfc;
+
+ if ( fv->show!=NULL && fv->show->piecemeal &&
+ feat_gid!=-1 &&
+ (feat_gid>=fv->show->glyphcnt || fv->show->glyphs[feat_gid]==NULL) &&
+ fv->b.sf->glyphs[feat_gid]!=NULL )
+ BDFPieceMeal(fv->show,feat_gid);
+
+ if ( fv->show!=NULL && feat_gid!=-1 &&
+ feat_gid < fv->show->glyphcnt &&
+ fv->show->glyphs[feat_gid]==NULL &&
+ SCWorthOutputting(fv->b.sf->glyphs[feat_gid]) ) {
+ /* If we have an outline but no bitmap for this slot */
+ box.x = j*fv->cbw+1; box.width = fv->cbw-2;
+ box.y = i*fv->cbh+fv->lab_height+2; box.height = box.width+1;
+ col.red = 0xffff; col.green = col.blue = 0x8000; col.pixel = 0xdd8080;
+ gdk_gc_set_foreground(gc, &col);
+ gdk_draw_rectangle(GDK_DRAWABLE(widget->window),gc,false,box.x,box.y,box.width,box.height);
+ ++box.x; ++box.y; box.width -= 2; box.height -= 2;
+ gdk_draw_rectangle(GDK_DRAWABLE(widget->window),gc,false,box.x,box.y,box.width,box.height);
+ gdk_gc_set_values(gc,&values, GDK_GC_FOREGROUND );
+/* When reencoding a font we can find times where index>=show->charcnt */
+ } else if ( fv->show!=NULL && feat_gid<fv->show->glyphcnt && feat_gid!=-1 &&
+ fv->show->glyphs[feat_gid]!=NULL ) {
+ bdfc = fv->show->glyphs[feat_gid];
+ FVBDFCToSlot(fv,fv->show,bdfc,clut);
+ gdk_pixbuf_render_to_drawable(fv->char_slot,GDK_DRAWABLE(fv->v->window),
+ gc,0,0,
+ j*fv->cbw+1+(fv->cbw-2-fv->magnify*(bdfc->xmax-bdfc->xmin+1))/2,
+ i*fv->cbh+fv->lab_height+1,
+ gdk_pixbuf_get_width(fv->char_slot),gdk_pixbuf_get_height(fv->char_slot),
+ FALSE, 0,0 );
+ if ( fv->showhmetrics ) {
+ int x1, x0 = j*fv->cbw+1+(fv->cbw-2-fv->magnify*(bdfc->xmax-bdfc->xmin+1))/2- bdfc->xmin*fv->magnify;
+ /* Draw advance width & horizontal origin */
+ if ( fv->showhmetrics&fvm_origin ) {
+ gdk_gc_set_fg(gc,METRICS_ORIGIN);
+ gdk_draw_line(widget->window,gc,x0,i*fv->cbh+fv->lab_height+yorg-3,x0,
+ i*fv->cbh+fv->lab_height+yorg+2);
+ }
+ x1 = x0 + bdfc->width;
+ if ( fv->showhmetrics&fvm_advanceat ) {
+ gdk_gc_set_fg(gc,METRICS_ADVANCE);
+ gdk_draw_line(widget->window,gc,x1,i*fv->cbh+fv->lab_height+1,x1,
+ (i+1)*fv->cbh-1);
+ }
+ if ( fv->showhmetrics&fvm_advanceto ) {
+ gdk_gc_set_fg(gc,METRICS_ADVANCE);
+ gdk_draw_line(widget->window,gc,x0,(i+1)*fv->cbh-2,x1,
+ (i+1)*fv->cbh-2);
+ }
+ gdk_gc_set_values(gc,&values, GDK_GC_FOREGROUND );
+ }
+ if ( fv->showvmetrics ) {
+ int x0 = j*fv->cbw+1+(fv->cbw-2-fv->magnify*(bdfc->xmax-bdfc->xmin+1))/2
+ - bdfc->xmin*fv->magnify
+ + fv->magnify*fv->show->pixelsize/2;
+ int y0 = i*fv->cbh+fv->lab_height+yorg;
+ int yvw = y0 + fv->magnify*sc->vwidth*fv->show->pixelsize/em;
+ if ( fv->showvmetrics&fvm_baseline ) {
+ gdk_gc_set_fg(gc,METRICS_BASELINE);
+ gdk_draw_line(widget->window,gc,x0,i*fv->cbh+fv->lab_height+1,x0,
+ (i+1)*fv->cbh-1);
+ }
+ if ( fv->showvmetrics&fvm_advanceat ) {
+ gdk_gc_set_fg(gc,METRICS_ADVANCE);
+ gdk_draw_line(widget->window,gc,j*fv->cbw,yvw,(j+1)*fv->cbw,
+ yvw);
+ }
+ if ( fv->showvmetrics&fvm_advanceto ) {
+ gdk_gc_set_fg(gc,METRICS_ADVANCE);
+ gdk_draw_line(widget->window,gc,j*fv->cbw+2,y0,j*fv->cbw+2,
+ yvw);
+ }
+ if ( fv->showvmetrics&fvm_origin ) {
+ gdk_gc_set_fg(gc,METRICS_ORIGIN);
+ gdk_draw_line(widget->window,gc,x0-3,i*fv->cbh+fv->lab_height+yorg,x0+2,i*fv->cbh+fv->lab_height+yorg);
+ }
+ gdk_gc_set_values(gc,&values, GDK_GC_FOREGROUND );
+ }
+ }
+ }
+ if ( index<fv->b.map->enccount && fv->b.selected[index] ) {
+ box.x = j*fv->cbw+1; box.width = fv->cbw-1;
+ box.y = i*fv->cbh+fv->lab_height+1; box.height = fv->cbw;
+ gdk_gc_set_function(gc,GDK_XOR);
+ gdk_gc_set_fg(gc, bg);
+ gdk_draw_rectangle(widget->window, gc, TRUE,
+ box.x, box.y, box.width, box.height);
+ gdk_gc_set_values(gc,&values,
+ GDK_GC_FOREGROUND | GDK_GC_FUNCTION );
+ }
+ }
+ if ( fv->showhmetrics&fvm_baseline ) {
+ for ( i=0; i<=fv->rowcnt; ++i ) {
+ gdk_gc_set_fg(gc,METRICS_BASELINE);
+ gdk_draw_line(widget->window,gc,0,i*fv->cbh+fv->lab_height+fv->show->ascent+1,fv->width,i*fv->cbh+fv->lab_height+fv->show->ascent+1);
+ }
+ gdk_gc_set_values(gc,&values, GDK_GC_FOREGROUND );
+ }
+return( true );
+}
+
+static char *chosung[] = { "G", "GG", "N", "D", "DD", "L", "M", "B", "BB", "S", "SS", "", "J", "JJ", "C", "K", "T", "P", "H", NULL };
+static char *jungsung[] = { "A", "AE", "YA", "YAE", "EO", "E", "YEO", "YE", "O", "WA", "WAE", "OE", "YO", "U", "WEO", "WE", "WI", "YU", "EU", "YI", "I", NULL };
+static char *jongsung[] = { "", "G", "GG", "GS", "N", "NJ", "NH", "D", "L", "LG", "LM", "LB", "LS", "LT", "LP", "LH", "M", "B", "BS", "S", "SS", "NG", "J", "C", "K", "T", "P", "H", NULL };
+
+gboolean FontView_StatusExpose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) {
+ FontView *fv = FV_From_Widget(widget);
+ char buffer[550], *pt, temp[200];
+ SplineChar *sc, dummy;
+ SplineFont *sf = fv->b.sf;
+ EncMap *map = fv->b.map;
+ int gid;
+ int uni;
+ int state = GTK_STATE_NORMAL;
+ int len, tlen;
+ PangoRectangle pos;
+
+ if ( fv->end_pos>=map->enccount || fv->pressed_pos>=map->enccount ||
+ fv->end_pos<0 || fv->pressed_pos<0 )
+ fv->end_pos = fv->pressed_pos = -1; /* Can happen after reencoding */
+ if ( fv->end_pos == -1 )
+return( true );
+
+ if ( map->remap!=NULL ) {
+ int localenc = fv->end_pos;
+ struct remap *remap = map->remap;
+ while ( remap->infont!=-1 ) {
+ if ( localenc>=remap->infont && localenc<=remap->infont+(remap->lastenc-remap->firstenc) ) {
+ localenc += remap->firstenc-remap->infont;
+ break;
+ }
+ ++remap;
+ }
+ sprintf( buffer, "%-5d (0x%04x) ", localenc, localenc );
+ } else if ( map->enc->only_1byte ||
+ (map->enc->has_1byte && fv->end_pos<256))
+ sprintf( buffer, "%-3d (0x%02x) ", fv->end_pos, fv->end_pos );
+ else
+ sprintf( buffer, "%-5d (0x%04x) ", fv->end_pos, fv->end_pos );
+ sc = (gid=fv->b.map->map[fv->end_pos])!=-1 ? sf->glyphs[gid] : NULL;
+ SCBuildDummy(&dummy,sf,fv->b.map,fv->end_pos);
+ if ( sc==NULL ) sc = &dummy;
+ uni = dummy.unicodeenc!=-1 ? dummy.unicodeenc : sc->unicodeenc;
+ if ( uni!=-1 )
+ sprintf( buffer+strlen(buffer), "U+%04X", uni );
+ else
+ sprintf( buffer+strlen(buffer), "U+????" );
+ sprintf( buffer+strlen(buffer), " %.*s", (int) (sizeof(buffer)-strlen(buffer)-1),
+ sc->name );
+
+ strcat(buffer," ");
+ len = strlen(buffer);
+
+ if ( uni==-1 && (pt=strchr(sc->name,'.'))!=NULL && pt-sc->name<30 ) {
+ strncpy(temp,sc->name,pt-sc->name);
+ temp[(pt-sc->name)] = '\0';
+ uni = UniFromName(temp,fv->b.sf->uni_interp,map->enc);
+ if ( uni!=-1 ) {
+ sprintf( buffer+strlen(buffer), "U+%04X ", uni );
+ }
+ state = GTK_STATE_INSENSITIVE;
+ }
+ if ( uni!=-1 && uni<0x110000 && _UnicodeNameAnnot!=NULL &&
+ _UnicodeNameAnnot[uni>>16][(uni>>8)&0xff][uni&0xff].name!=NULL ) {
+ strncat(buffer, _UnicodeNameAnnot[uni>>16][(uni>>8)&0xff][uni&0xff].name, 80);
+ } else if ( uni>=0xAC00 && uni<=0xD7A3 ) {
+ sprintf( buffer+strlen(buffer), "Hangul Syllable %s%s%s",
+ chosung[(uni-0xAC00)/(21*28)],
+ jungsung[(uni-0xAC00)/28%21],
+ jongsung[(uni-0xAC00)%28] );
+ } else if ( uni!=-1 ) {
+ strncat(buffer, UnicodeRange(uni),80);
+ }
+
+ pango_layout_set_text( fv->statuslayout, buffer, len);
+ gdk_draw_layout( GDK_DRAWABLE(fv->status->window), fv->status->style->fg_gc[GTK_STATE_NORMAL],
+ 10, 0, fv->statuslayout );
+ pango_layout_index_to_pos(fv->statuslayout,len-1,&pos);
+ tlen = (pos.x+pos.width)/1000;
+ pango_layout_set_text( fv->statuslayout, buffer+len, -1);
+ gdk_draw_layout( GDK_DRAWABLE(fv->status->window), fv->status->style->fg_gc[state],
+ 10+tlen, 0, fv->statuslayout );
+return( true );
+}
+
+static void FontView_TextEntry(GtkWidget *widget, gchar *text, FontView *fv) {
+ SplineFont *sf = fv->b.sf;
+ int enc, i;
+ int ch = utf8_ildb((const char **) &text);
+
+ enc = EncFromUni(ch,fv->b.map->enc);
+ if ( enc==-1 ) {
+ for ( i=0; i<sf->glyphcnt; ++i ) {
+ if ( sf->glyphs[i]!=NULL )
+ if ( sf->glyphs[i]->unicodeenc==ch )
+ break;
+ }
+ if ( i!=-1 )
+ enc = fv->b.map->backmap[i];
+ }
+ if ( enc<fv->b.map->enccount && enc!=-1 )
+ FVChangeChar(fv,enc);
+}
+
+gboolean FontView_Char(GtkWidget *widget, GdkEventKey *event, gpointer user_data) {
+ int pos, gid;
+ FontView *fv = FV_From_Widget(widget);
+
+ if ( gtk_im_context_filter_keypress(fv->imc,event))
+return( true );
+
+#if !defined(_NO_FFSCRIPT) || !defined(_NO_PYTHON)
+ if ( isdigit(event->keyval) && (event->state&GDK_CONTROL_MASK) &&
+ (event->state&GDK_MOD1_MASK) ) {
+ /* The Script menu isn't always up to date, so we might get one of */
+ /* the shortcuts here */
+ int index = event->keyval-'1';
+ if ( index<0 ) index = 9;
+ if ( script_filenames[index]!=NULL )
+ ExecuteScriptFile((FontViewBase *) fv,NULL,script_filenames[index]);
+#endif
+ } else if ( event->keyval == GDK_Left ||
+ event->keyval == GDK_Tab ||
+ /*event->keyval == GDK_BackTab ||*/
+ event->keyval == GDK_Up ||
+ event->keyval == GDK_Right ||
+ event->keyval == GDK_Down ||
+ event->keyval == GDK_KP_Left ||
+ event->keyval == GDK_KP_Up ||
+ event->keyval == GDK_KP_Right ||
+ event->keyval == GDK_KP_Down ||
+ event->keyval == GDK_Home ||
+ event->keyval == GDK_KP_Home ||
+ event->keyval == GDK_End ||
+ event->keyval == GDK_KP_End ||
+ event->keyval == GDK_Page_Up ||
+ event->keyval == GDK_KP_Page_Up ||
+ event->keyval == GDK_Prior ||
+ event->keyval == GDK_Page_Down ||
+ event->keyval == GDK_KP_Page_Down ||
+ event->keyval == GDK_Next ) {
+ int end_pos = fv->end_pos;
+ /* We move the currently selected char. If there is none, then pick */
+ /* something on the screen */
+ if ( end_pos==-1 )
+ end_pos = (fv->rowoff+fv->rowcnt/2)*fv->colcnt;
+ switch ( event->keyval ) {
+ case GDK_Tab:
+ pos = end_pos;
+ do {
+ if ( event->state&GDK_SHIFT_MASK )
+ --pos;
+ else
+ ++pos;
+ if ( pos>=fv->b.map->enccount ) pos = 0;
+ else if ( pos<0 ) pos = fv->b.map->enccount-1;
+ } while ( pos!=end_pos &&
+ ((gid=fv->b.map->map[pos])==-1 || !SCWorthOutputting(fv->b.sf->glyphs[gid])));
+ if ( pos==end_pos ) ++pos;
+ if ( pos>=fv->b.map->enccount ) pos = 0;
+ break;
+#if 0
+ case GDK_BackTab:
+ pos = end_pos;
+ do {
+ --pos;
+ if ( pos<0 ) pos = fv->b.map->enccount-1;
+ } while ( pos!=end_pos &&
+ ((gid=fv->b.map->map[pos])==-1 || !SCWorthOutputting(fv->b.sf->glyphs[gid])));
+ if ( pos==end_pos ) --pos;
+ if ( pos<0 ) pos = 0;
+ break;
+#endif
+ case GDK_Left: case GDK_KP_Left:
+ pos = end_pos-1;
+ break;
+ case GDK_Right: case GDK_KP_Right:
+ pos = end_pos+1;
+ break;
+ case GDK_Up: case GDK_KP_Up:
+ pos = end_pos-fv->colcnt;
+ break;
+ case GDK_Down: case GDK_KP_Down:
+ pos = end_pos+fv->colcnt;
+ break;
+ case GDK_End: case GDK_KP_End:
+ pos = fv->b.map->enccount;
+ break;
+ case GDK_Home: case GDK_KP_Home:
+ pos = 0;
+ if ( fv->b.sf->top_enc!=-1 && fv->b.sf->top_enc<fv->b.map->enccount )
+ pos = fv->b.sf->top_enc;
+ else {
+ pos = SFFindSlot(fv->b.sf,fv->b.map,'A',NULL);
+ if ( pos==-1 ) pos = 0;
+ }
+ break;
+ case GDK_Page_Up: case GDK_KP_Page_Up:
+#if GDK_Prior!=GDK_Page_Up
+ case GDK_Prior:
+#endif
+ pos = (fv->rowoff-fv->rowcnt+1)*fv->colcnt;
+ break;
+ case GDK_Page_Down: case GDK_KP_Page_Down:
+#if GDK_Next!=GDK_Page_Down
+ case GDK_Next:
+#endif
+ pos = (fv->rowoff+fv->rowcnt+1)*fv->colcnt;
+ break;
+ }
+ if ( pos<0 ) pos = 0;
+ if ( pos>=fv->b.map->enccount ) pos = fv->b.map->enccount-1;
+ if ( (event->state&GDK_SHIFT_MASK) && event->keyval!=GDK_Tab /*&& event->keyval!=GDK_BackTab*/ ) {
+ FVReselect(fv,pos);
+ } else {
+ FVDeselectAll(fv);
+ fv->b.selected[pos] = true;
+ fv->pressed_pos = pos;
+ fv->sel_index = 1;
+ gtk_widget_queue_draw(fv->v);
+ }
+ fv->end_pos = pos;
+ FVShowInfo(fv);
+ FVScrollToChar(fv,pos);
+ } else if ( event->keyval == GDK_Help ) {
+ FontViewMenu_ContextualHelp(NULL,NULL); /* Menu does F1 */
+ } else if ( event->string[0]>=' ' && event->string[1]=='\0' ) {
+ /* Should never happen. TextEntry should always be called by the IMC */
+ FontView_TextEntry(GTK_WIDGET(fv->imc),event->string,fv);
+ } else
+return( false );
+
+return( true );
+}
+
+static void annot_strncat(char *start, const char *from, int len) {
+ char *to = start;
+ register unichar_t ch;
+
+ to += strlen(to);
+ while ( (ch = *(unsigned char *) from++) != '\0' && to-start<len-4 ) {
+ if ( from[-2]=='\t' ) {
+ if ( ch=='*' ) ch = 0x2022;
+ else if ( ch=='x' ) ch = 0x2192;
+ else if ( ch==':' ) ch = 0x224d;
+ else if ( ch=='#' ) ch = 0x2245;
+ } else if ( ch=='\t' ) {
+ *(to++) = ' ';
+ ch = ' ';
+ }
+ to = utf8_idpb(to,ch);
+ }
+ *to = 0;
+}
+
+void SCPreparePopup(GtkTooltips *tip,GtkWidget *v,SplineChar *sc,struct remap *remap, int localenc,
+ int actualuni) {
+ char space[1610];
+ int upos=-1;
+ int done = false;
+
+ /* If a glyph is multiply mapped then the built-in unicode enc may not be */
+ /* the actual one used to access the glyph */
+ if ( remap!=NULL ) {
+ while ( remap->infont!=-1 ) {
+ if ( localenc>=remap->infont && localenc<=remap->infont+(remap->lastenc-remap->firstenc) ) {
+ localenc += remap->firstenc-remap->infont;
+ break;
+ }
+ ++remap;
+ }
+ }
+
+ if ( actualuni!=-1 )
+ upos = actualuni;
+ else if ( sc->unicodeenc!=-1 )
+ upos = sc->unicodeenc;
+#if HANYANG
+ else if ( sc->compositionunit ) {
+ if ( sc->jamo<19 )
+ upos = 0x1100+sc->jamo;
+ else if ( sc->jamo<19+21 )
+ upos = 0x1161 + sc->jamo-19;
+ else /* Leave a hole for the blank char */
+ upos = 0x11a8 + sc->jamo-(19+21+1);
+ }
+#endif
+ else {
+#if defined( _NO_SNPRINTF ) || defined( __VMS )
+ sprintf( space, "%u 0x%x U+???? \"%.25s\" ", localenc, localenc, sc->name==NULL?"":sc->name );
+#else
+ snprintf( space, sizeof(space), "%u 0x%x U+???? \"%.25s\" ", localenc, localenc, sc->name==NULL?"":sc->name );
+#endif
+ done = true;
+ }
+ if ( done )
+ /* Do Nothing */;
+ else if ( upos<0x110000 && _UnicodeNameAnnot!=NULL &&
+ _UnicodeNameAnnot[upos>>16][(upos>>8)&0xff][upos&0xff].name!=NULL ) {
+#if defined( _NO_SNPRINTF ) || defined( __VMS )
+ sprintf( space, "%u 0x%x U+%04x \"%.25s\"", localenc, localenc, upos, sc->name==NULL?"":sc->name,
+ _UnicodeNameAnnot[upos>>16][(upos>>8)&0xff][upos&0xff].name);
+#else
+ snprintf( space, sizeof(space), "%u 0x%x U+%04x \"%.25s\" %.100s", localenc, localenc, upos, sc->name==NULL?"":sc->name,
+ _UnicodeNameAnnot[upos>>16][(upos>>8)&0xff][upos&0xff].name);
+#endif
+ } else if ( upos>=0xAC00 && upos<=0xD7A3 ) {
+#if defined( _NO_SNPRINTF ) || defined( __VMS )
+ sprintf( space, "%u 0x%x U+%04x \"%.25s\" Hangul Syllable %s%s%s",
+ localenc, localenc, upos, sc->name==NULL?"":sc->name,
+ chosung[(upos-0xAC00)/(21*28)],
+ jungsung[(upos-0xAC00)/28%21],
+ jongsung[(upos-0xAC00)%28] );
+#else
+ snprintf( space, sizeof(space), "%u 0x%x U+%04x \"%.25s\" Hangul Syllable %s%s%s",
+ localenc, localenc, upos, sc->name==NULL?"":sc->name,
+ chosung[(upos-0xAC00)/(21*28)],
+ jungsung[(upos-0xAC00)/28%21],
+ jongsung[(upos-0xAC00)%28] );
+#endif
+ } else {
+#if defined( _NO_SNPRINTF ) || defined( __VMS )
+ sprintf( space, "%u 0x%x U+%04x \"%.25s\" %.50s", localenc, localenc, upos, sc->name==NULL?"":sc->name,
+ UnicodeRange(upos));
+#else
+ snprintf( space, sizeof(space), "%u 0x%x U+%04x \"%.25s\" %.50s", localenc, localenc, upos, sc->name==NULL?"":sc->name,
+ UnicodeRange(upos));
+#endif
+ }
+ if ( upos>=0 && upos<0x110000 && _UnicodeNameAnnot!=NULL &&
+ _UnicodeNameAnnot[upos>>16][(upos>>8)&0xff][upos&0xff].annot!=NULL ) {
+ int left = sizeof(space)/sizeof(space[0]) - strlen(space)-1;
+ if ( left>4 ) {
+ strcat(space,"\n");
+ annot_strncat(space,_UnicodeNameAnnot[upos>>16][(upos>>8)&0xff][upos&0xff].annot,left-2);
+ }
+ }
+ if ( sc->comment!=NULL ) {
+ int left = sizeof(space)/sizeof(space[0]) - strlen(space)-1;
+ if ( left>4 ) {
+ strcat(space,"\n\n");
+ strncpy(space+strlen(space),sc->comment,left-2);
+ }
+ }
+ gtk_tooltips_set_tip(GTK_TOOLTIPS(tip),v,space,NULL);
+}
+
+static gboolean FV_PressedScrollCheck(void *_fv) {
+ FontView *fv = _fv;
+ gint x,y;
+ GdkModifierType mask;
+
+ (void) gdk_window_get_pointer(fv->v->window,&x,&y,&mask);
+
+ if ( y<0 || y >= fv->height ) {
+ real dy = 0;
+ GtkAdjustment *sb;
+ if ( y<0 )
+ dy = -1;
+ else if ( y>=fv->height )
+ dy = 1;
+ if ( fv->rowoff+dy<0 )
+ dy = 0;
+ else if ( fv->rowoff+dy+fv->rowcnt > fv->rowltot )
+ dy = 0;
+ fv->rowoff += dy;
+ if ( dy!=0 ) {
+ sb = gtk_range_get_adjustment(GTK_RANGE(fv->vsb));
+ sb->value += dy;
+ gtk_range_set_adjustment(GTK_RANGE(fv->vsb),sb);
+ gdk_window_scroll(GDK_WINDOW(fv->v->window),0,dy*fv->cbh);
+ }
+ }
+return( true );
+}
+
+gboolean FontViewView_Mouse(GtkWidget *widget,GdkEventButton *event, gpointer user_data) {
+ /* I rely on the fact that the event structures for Button and Motion */
+ /* (the two events we might get here) are the same for x,y and state */
+ FontView *fv = FV_From_Widget(widget);
+ int pos = ((int) event->y/fv->cbh + fv->rowoff)*fv->colcnt + (int) event->x/fv->cbw;
+ int gid;
+ int realpos = pos;
+ SplineChar *sc, dummy;
+ int dopopup = true;
+ extern int OpenCharsInNewWindow;
+
+ if ( pos<0 ) {
+ pos = 0;
+ dopopup = false;
+ } else if ( pos>=fv->b.map->enccount ) {
+ pos = fv->b.map->enccount-1;
+ if ( pos<0 ) /* No glyph slots in font */
+return(true);
+ dopopup = false;
+ }
+
+ sc = (gid=fv->b.map->map[pos])!=-1 ? fv->b.sf->glyphs[gid] : NULL;
+ if ( sc==NULL )
+ sc = SCBuildDummy(&dummy,fv->b.sf,fv->b.map,pos);
+ if ( event->type == GDK_BUTTON_PRESS )
+ fv->click_count = 1;
+ else if ( event->type == GDK_2BUTTON_PRESS )
+ fv->click_count = 2;
+ else if ( event->type == GDK_3BUTTON_PRESS )
+ fv->click_count = 3;
+ if ( event->type == GDK_BUTTON_RELEASE && fv->click_count==2 ) {
+ if ( fv->pressed_timer_src!=-1 ) {
+ g_source_destroy(g_main_context_find_source_by_id(g_main_context_default(), fv->pressed_timer_src));
+ fv->pressed_timer_src = -1;
+ }
+ if ( fv->cur_subtable!=NULL ) {
+ sc = FVMakeChar(fv,pos);
+ pos = fv->b.map->backmap[sc->orig_pos];
+ }
+ if ( sc==&dummy ) {
+ sc = SFMakeChar(fv->b.sf,fv->b.map,pos);
+ gid = fv->b.map->map[pos];
+ }
+ if ( fv->show==fv->filled ) {
+ SplineFont *sf = fv->b.sf;
+ gid = -1;
+ if ( !OpenCharsInNewWindow )
+ for ( gid=sf->glyphcnt-1; gid>=0; --gid )
+ if ( sf->glyphs[gid]!=NULL && sf->glyphs[gid]->views!=NULL )
+ break;
+ if ( gid!=-1 ) {
+ CharView *cv = (CharView *) sf->glyphs[gid]->views;
+ CVChangeSC(cv,sc);
+ gdk_window_show(cv->gw->window); /* Raises it too! */
+ } else
+ CharViewCreate(sc,fv,pos);
+ } else {
+ BDFFont *bdf = fv->show;
+ BDFChar *bc =BDFMakeGID(bdf,gid);
+ gid = -1;
+ if ( !OpenCharsInNewWindow )
+ for ( gid=bdf->glyphcnt-1; gid>=0; --gid )
+ if ( bdf->glyphs[gid]!=NULL && bdf->glyphs[gid]->views!=NULL )
+ break;
+ if ( gid!=-1 ) {
+ BitmapView *bv = bdf->glyphs[gid]->views;
+ BVChangeBC(bv,bc,true);
+ gdk_window_show(bv->gw->window); /* Raises it too! */
+ } else
+ BitmapViewCreate(bc,bdf,fv,pos);
+ }
+ }
+ if ( event->type >= GDK_BUTTON_PRESS && event->type <= GDK_3BUTTON_PRESS ) {
+ /* Drag & Drop end stuff!!!! */
+ fv->drag_and_drop = false;
+ if ( !(event->state&GDK_SHIFT_MASK) && event->type==GDK_BUTTON_PRESS ) {
+ if ( !fv->b.selected[pos] )
+ FVDeselectAll(fv);
+ else if ( event->button!=3 ) {
+ /* Drag & Drop start stuff!!! */
+ fv->drag_and_drop = fv->has_dd_no_cursor = true;
+ fv->any_dd_events_sent = false;
+ }
+ }
+ fv->pressed_pos = fv->end_pos = pos;
+ FVShowInfo(fv);
+ if ( !fv->drag_and_drop ) {
+ if ( !(event->state&GDK_SHIFT_MASK))
+ fv->sel_index = 1;
+ else if ( fv->sel_index<255 )
+ ++fv->sel_index;
+ if ( fv->pressed_timer_src!=-1 ) {
+ g_source_destroy(g_main_context_find_source_by_id(g_main_context_default(), fv->pressed_timer_src));
+ fv->pressed_timer_src = -1;
+ } else if ( event->state&GDK_SHIFT_MASK ) {
+ fv->b.selected[pos] = fv->b.selected[pos] ? 0 : fv->sel_index;
+ gtk_widget_queue_draw(fv->v);
+ } else if ( !fv->b.selected[pos] ) {
+ fv->b.selected[pos] = fv->sel_index;
+ gtk_widget_queue_draw(fv->v);
+ }
+ if ( event->button==3 ) {
+ static GtkWidget *popup;
+ if ( popup == NULL )
+ popup = create_FontViewPopupMenu();
+ g_object_set_data( G_OBJECT(popup), "ffdata", fv);
+ gtk_menu_popup( GTK_MENU(popup), NULL,NULL,NULL,NULL,
+ event->button, event->time);
+ } else
+ fv->pressed_timer_src = g_timeout_add(100,FV_PressedScrollCheck,fv);
+ }
+ } else if ( fv->drag_and_drop ) {
+ /* Drag and drop stuff */
+ } else if ( fv->pressed_timer_src!=-1 ) {
+ int showit = realpos!=fv->end_pos;
+ FVReselect(fv,realpos);
+ if ( showit )
+ FVShowInfo(fv);
+ if ( event->type==GDK_BUTTON_RELEASE ) {
+ g_source_destroy(g_main_context_find_source_by_id(g_main_context_default(), fv->pressed_timer_src));
+ fv->pressed_timer_src = -1;
+ }
+ }
+ if ( dopopup ) {
+ int uni = sc==&dummy?dummy.unicodeenc: UniFromEnc(pos,fv->b.map->enc);
+ if ( uni==-1 )
+ uni = sc->unicodeenc; /* For custom encodings */
+ if ( fv->last_popup_uni!=uni ) {
+ SCPreparePopup(fv->popupinfo,fv->v,sc,fv->b.map->remap,pos,uni);
+ fv->last_popup_uni = uni;
+ }
+ } else {
+ /* If I disable a tooltip it stays off, even after a reenable, unless */
+ /* the user enters the window again. Which is annoying and none obvious*/
+ /* gtk_tooltips_disable(GTK_TOOLTIPS(fv->popupinfo));*/
+ gtk_tooltips_set_tip(fv->popupinfo,fv->v,_("Not in font"),NULL);
+
+ fv->last_popup_uni = -1;
+ }
+ if ( event->type==GDK_BUTTON_RELEASE )
+ SVAttachFV(fv,2);
+return( true );
+}
+
+gboolean FontViewView_Resize(GtkWidget *widget, GdkEventConfigure *event,
+ gpointer user_data) {
+ FontView *fv = (FontView *) g_object_get_data(G_OBJECT(widget),"ffdata");
+ extern int default_fv_row_count, default_fv_col_count;
+ int topchar;
+ int cc,rc;
+ GtkAdjustment *sb;
+
+ if ( fv->colcnt!=0 )
+ topchar = fv->rowoff*fv->colcnt;
+ else if ( fv->b.sf->top_enc!=-1 && fv->b.sf->top_enc<fv->b.map->enccount )
+ topchar = fv->b.sf->top_enc;
+ else {
+ /* Position on 'A' if it exists */
+ topchar = SFFindSlot(fv->b.sf,fv->b.map,'A',NULL);
+ if ( topchar==-1 ) {
+ for ( topchar=0; topchar<fv->b.map->enccount; ++topchar )
+ if ( fv->b.map->map[topchar]!=-1 && fv->b.sf->glyphs[fv->b.map->map[topchar]]!=NULL )
+ break;
+ if ( topchar==fv->b.map->enccount )
+ topchar = 0;
+ }
+ }
+
+ cc = (fv->v->allocation.width+fv->cbw/2)/fv->cbw;
+ rc = (fv->v->allocation.height+fv->cbh/2)/fv->cbh;
+ if ( cc<=0 ) cc = 1;
+ if ( rc<=0 ) rc = 1;
+
+ fv->width = fv->v->allocation.width; fv->height = fv->v->allocation.height;
+ fv->colcnt = cc;
+ fv->rowcnt = rc;
+ fv->rowltot = (fv->b.map->enccount+fv->colcnt-1)/fv->colcnt;
+
+ sb = gtk_range_get_adjustment(GTK_RANGE(fv->vsb));
+ sb->lower = 0; sb->upper = fv->rowltot; sb->page_size = fv->rowcnt;
+ sb->step_increment = 1; sb->page_increment = fv->rowcnt;
+
+ fv->rowoff = topchar/fv->colcnt;
+ if ( fv->rowoff>=fv->rowltot-fv->rowcnt )
+ fv->rowoff = fv->rowltot-fv->rowcnt;
+ if ( fv->rowoff<0 ) fv->rowoff =0;
+ sb->value = fv->rowoff;
+ gtk_range_set_adjustment(GTK_RANGE(fv->vsb),sb);
+
+ default_fv_row_count = fv->rowcnt;
+ default_fv_col_count = fv->colcnt;
+ SavePrefs(true);
+return( true );
+}
+
+static gboolean FV_ResizeCheck(void *_fv) {
+ FontView *fv = _fv;
+ int width_off, height_off;
+ int r,c;
+
+ fv->resize_timer_src = -1;
+ width_off = fv->gw->allocation.width - (fv->v->allocation.width);
+ height_off = fv->gw->allocation.height - (fv->v->allocation.height);
+ if ( fv->v->allocation.width%fv->cbw!=1 || fv->v->allocation.height%fv->cbh!=1 ) {
+ GtkRequisition desired;
+
+ r = (fv->v->allocation.height+(fv->cbh/2))/fv->cbh;
+ c = (fv->v->allocation.width+(fv->cbw/2))/fv->cbw;
+ gtk_widget_size_request(fv->gw,&desired);
+ if ( (desired.width-width_off-1)/fv->cbw > c )
+ c = (desired.width-width_off-1)/fv->cbw;
+ if ( (desired.height-height_off-1)/fv->cbh > r )
+ r = (desired.height-height_off-1)/fv->cbh;
+ gtk_widget_set_size_request(fv->v,
+ c*fv->cbw+1,
+ r*fv->cbh+1);
+ /* The "set size request" will not force the window to shrink */
+ /* so do a resize */
+ gtk_window_resize(GTK_WINDOW(fv->gw),1,1);
+ } else {
+ /* If we don't do this, then they can't make the window smaller */
+ /* (but, as noted above, this doesn't cause the window to get smaller)*/
+ gtk_widget_set_size_request(fv->v, 0, 0);
+ }
+return 0; /* No further instances of this timer */
+}
+
+gboolean FontView_Resize(GtkWidget *widget, GdkEventConfigure *event,
+ gpointer user_data) {
+ FontView *fv = (FontView *) g_object_get_data( G_OBJECT(widget), "ffdata" );
+ /* When the WM does "smooth resizing" we should wait before doing our */
+ /* size adjustment until the user has stopped moving things aroung */
+ /* So add a little delay, and if we get another resize before the delay */
+ /* expires, kill the old, and restart our wait. That seems to deal with */
+ /* smooth resizing */
+ if ( fv->resize_timer_src!=-1 )
+ g_source_destroy(g_main_context_find_source_by_id(g_main_context_default(), fv->resize_timer_src));
+
+ fv->resize_timer_src = g_timeout_add(200,FV_ResizeCheck,fv);
+
+ if ( fv->gc==NULL ) { /* Can't create a gc until the window exists */
+ fv->gc = gdk_gc_new( fv->v->window );
+ gdk_gc_copy(fv->gc,fv->v->style->fg_gc[fv->v->state]);
+ }
+
+ /* If we return TRUE here, then gtk will NOT do it's own size adjusting */
+return 0;
+}
+
+void FontView_Realize(GtkWidget *widget, gpointer user_data) {
+ FontView *fv = (FontView *) g_object_get_data( G_OBJECT(widget), "ffdata" );
+
+ if ( fv->gc==NULL ) { /* Can't create a gc until the window exists */
+ GdkGC *gc = fv->gw->style->fg_gc[fv->gw->state];
+ GdkGCValues values;
+ gdk_gc_get_values(gc,&values);
+ default_background = COLOR_CREATE(
+ ((values.background.red &0xff00)>>8),
+ ((values.background.green&0xff00)>>8),
+ ((values.background.blue &0xff00)>>8));
+
+ /* This is a "best guess" which isn't always right */
+ /* About 2005 X11 added visuals which supported alpha mode */
+ /* They did this by redefining the behavior of a 32 bit visual */
+ /* which used to mean 24bit colour and 8 bits padding, but now */
+ /* means 24bit color and 8 bits alpha channel. No way for the */
+ /* client to distinquish that I know of. So this check may fail*/
+ /* on an old SGI machine */
+ display_has_alpha = gdk_visual_get_best_depth() == 32;
+
+ fv->gc = gdk_gc_new( fv->gw->window );
+ gdk_gc_copy(fv->gc,fv->gw->style->fg_gc[fv->gw->state]);
+ }
+}
+
+void FVDelay(FontView *fv,int (*func)(FontView *)) {
+ (void) g_timeout_add(200,(int (*)(gpointer))func,fv);
+}
+
+void FontView_VScroll(GtkRange *vsb, gpointer user_data) {
+ GtkAdjustment *sb;
+ FontView *fv = FV_From_Widget(vsb);
+ int newpos;
+
+ sb = gtk_range_get_adjustment(GTK_RANGE(vsb));
+ newpos = rint(sb->value);
+ if ( newpos!=fv->rowoff) {
+ int diff = newpos-fv->rowoff;
+ fv->rowoff = newpos;
+ gdk_window_scroll(GDK_WINDOW(fv->v->window),0,-diff*fv->cbh);
+ }
+}
+
+static void FontView_ReformatOne(FontView *fv) {
+ GtkAdjustment *sb;
+
+ if ( fv->v==NULL || fv->colcnt==0 ) /* Can happen in scripts */
+return;
+
+ gdk_window_set_cursor(fv->v->window,ct_watch);
+ fv->rowltot = (fv->b.map->enccount+fv->colcnt-1)/fv->colcnt;
+ if ( fv->rowoff>fv->rowltot-fv->rowcnt ) {
+ fv->rowoff = fv->rowltot-fv->rowcnt;
+ if ( fv->rowoff<0 ) fv->rowoff =0;
+ }
+ sb = gtk_range_get_adjustment(GTK_RANGE(fv->vsb));
+ sb->lower = 0; sb->upper = fv->rowltot; sb->page_size = fv->rowcnt;
+ sb->step_increment = 1; sb->page_increment = fv->rowcnt;
+ sb->value = fv->rowoff;
+ gtk_range_set_adjustment(GTK_RANGE(fv->vsb),sb);
+ gtk_widget_queue_draw(fv->v);
+ gdk_window_set_cursor(fv->v->window,ct_pointer);
+}
+
+static void FontView_ReformatAll(SplineFont *sf) {
+ BDFFont *new, *old;
+ FontView *fvs, *fv;
+ MetricsView *mvs;
+ extern int use_freetype_to_rasterize_fv;
+
+ if ( ((FontView *) sf->fv)->v==NULL || ((FontView *) sf->fv)->colcnt==0 ) /* Can happen in scripts */
+return;
+
+ for ( fvs=(FontView *) sf->fv; fvs!=NULL; fvs=(FontView *) fvs->b.nextsame )
+ fvs->touched = false;
+ while ( 1 ) {
+ for ( fv=(FontView *) sf->fv; fv!=NULL && fv->touched; fv=(FontView *) fv->b.nextsame );
+ if ( fv==NULL )
+ break;
+ old = fv->filled;
+ /* In CID fonts fv->b.sf may not be same as sf */
+ new = SplineFontPieceMeal(fv->b.sf,fv->filled->pixelsize,
+ (fv->antialias?pf_antialias:0)|(fv->bbsized?pf_bbsized:0)|
+ (use_freetype_to_rasterize_fv && !sf->strokedfont && !sf->multilayer?pf_ft_nohints:0),
+ NULL);
+ for ( fvs=fv; fvs!=NULL; fvs=(FontView *) fvs->b.nextsame )
+ if ( fvs->filled == old ) {
+ fvs->filled = new;
+ if ( fvs->show == old )
+ fvs->show = new;
+ fvs->touched = true;
+ }
+ BDFFontFree(old);
+ }
+ for ( fv=(FontView *) sf->fv; fv!=NULL; fv=(FontView *) fv->b.nextsame ) {
+ GtkAdjustment *sb;
+ gdk_window_set_cursor(fv->v->window,ct_watch);
+ fv->rowltot = (fv->b.map->enccount+fv->colcnt-1)/fv->colcnt;
+ if ( fv->rowoff>fv->rowltot-fv->rowcnt ) {
+ fv->rowoff = fv->rowltot-fv->rowcnt;
+ if ( fv->rowoff<0 ) fv->rowoff =0;
+ }
+ sb = gtk_range_get_adjustment(GTK_RANGE(fv->vsb));
+ sb->lower = 0; sb->upper = fv->rowltot; sb->page_size = fv->rowcnt;
+ sb->step_increment = 1; sb->page_increment = fv->rowcnt;
+ sb->value = fv->rowoff;
+ gtk_range_set_adjustment(GTK_RANGE(fv->vsb),sb);
+ gtk_widget_queue_draw(fv->v);
+ gdk_window_set_cursor(fv->v->window,ct_pointer);
+ }
+ for ( mvs=sf->metrics; mvs!=NULL; mvs=mvs->next ) if ( mvs->bdf==NULL ) {
+ BDFFontFree(mvs->show);
+ mvs->show = SplineFontPieceMeal(sf,mvs->pixelsize,mvs->antialias?pf_antialias:0,NULL);
+ gtk_widget_queue_draw(mvs->gw);
+ }
+}
+
+static void FontViewOpenKids(FontView *fv) {
+ int k, i;
+ SplineFont *sf = fv->b.sf, *_sf;
+
+ if ( sf->cidmaster!=NULL )
+ sf = sf->cidmaster;
+
+ k=0;
+ do {
+ _sf = sf->subfontcnt==0 ? sf : sf->subfonts[k];
+ for ( i=0; i<_sf->glyphcnt; ++i )
+ if ( _sf->glyphs[i]!=NULL && _sf->glyphs[i]->wasopen ) {
+ _sf->glyphs[i]->wasopen = false;
+ CharViewCreate(_sf->glyphs[i],fv,-1);
+ }
+ ++k;
+ } while ( k<sf->subfontcnt );
+}
+
+static FontView *__FontViewCreate(SplineFont *sf) {
+ FontView *fv = gcalloc(1,sizeof(FontView));
+ int i;
+ int ps = sf->display_size<0 ? -sf->display_size :
+ sf->display_size==0 ? default_fv_font_size : sf->display_size;
+
+ if ( ps>200 ) ps = 128;
+
+ fv->b.nextsame = sf->fv;
+ sf->fv = (FontViewBase *) fv;
+ fv->b.next = (FontViewBase *) fv_list;
+ fv_list = fv;
+ if ( sf->mm!=NULL ) {
+ sf->mm->normal->fv = (FontViewBase *) fv;
+ for ( i = 0; i<sf->mm->instance_count; ++i )
+ sf->mm->instances[i]->fv = (FontViewBase *) fv;
+ }
+ if ( sf->subfontcnt==0 ) {
+ fv->b.sf = sf;
+ if ( fv->b.nextsame!=NULL ) {
+ fv->b.map = EncMapCopy(fv->b.nextsame->map);
+ fv->b.normal = fv->b.nextsame->normal==NULL ? NULL : EncMapCopy(fv->b.nextsame->normal);
+ } else if ( sf->compacted ) {
+ fv->b.normal = sf->map;
+ fv->b.map = CompactEncMap(EncMapCopy(sf->map),sf);
+ } else {
+ fv->b.map = sf->map;
+ fv->b.normal = NULL;
+ }
+ } else {
+ fv->b.cidmaster = sf;
+ for ( i=0; i<sf->subfontcnt; ++i )
+ sf->subfonts[i]->fv = (FontViewBase *) fv;
+ for ( i=0; i<sf->subfontcnt; ++i ) /* Search for a subfont that contains more than ".notdef" (most significant in .gai fonts) */
+ if ( sf->subfonts[i]->glyphcnt>1 ) {
+ fv->b.sf = sf->subfonts[i];
+ break;
+ }
+ if ( fv->b.sf==NULL )
+ fv->b.sf = sf->subfonts[0];
+ sf = fv->b.sf;
+ if ( fv->b.nextsame==NULL ) EncMapFree(sf->map);
+ fv->b.map = EncMap1to1(sf->glyphcnt);
+ }
+ fv->b.selected = gcalloc(fv->b.map->enccount,sizeof(char));
+ fv->user_requested_magnify = -1;
+ fv->magnify = (ps<=9)? 3 : (ps<20) ? 2 : 1;
+ fv->cbw = (ps*fv->magnify)+1;
+ fv->cbh = (ps*fv->magnify)+1+fv->lab_height+1;
+ fv->antialias = sf->display_antialias;
+ fv->bbsized = sf->display_bbsized;
+ fv->glyphlabel = default_fv_glyphlabel;
+
+ fv->resize_timer_src = -1;
+ fv->pressed_timer_src = -1;
+
+ fv->end_pos = -1;
+#ifndef _NO_PYTHON
+ PyFF_InitFontHook((FontViewBase *) fv);
+#endif
+return( fv );
+}
+
+static void FontViewInit(void) {
+}
+
+static FontView *FontView_Create(SplineFont *sf) {
+ FontView *fv = __FontViewCreate(sf);
+ static int done = false;
+ PangoContext *context;
+ PangoFont *font;
+ PangoFontMetrics *fm;
+ int as, ds;
+ BDFFont *bdf;
+ extern int use_freetype_to_rasterize_fv;
+
+ if ( !done ) { FontViewInit(); done=true;}
+
+ fv->gw = create_FontView();
+ fv->fontset = gcalloc(_uni_fontmax,sizeof(PangoFont *));
+ g_object_set_data (G_OBJECT (fv->gw), "ffdata", fv );
+ fv->v = lookup_widget( fv->gw,"view" );
+ fv->status = lookup_widget( fv->gw,"status" );
+ fv->vsb = lookup_widget( fv->gw,"vscrollbar2" );
+ context = gtk_widget_get_pango_context( fv->status );
+ font = pango_context_load_font( context, pango_context_get_font_description(context));
+ fm = pango_font_get_metrics(font,NULL);
+ as = pango_font_metrics_get_ascent(fm);
+ ds = pango_font_metrics_get_descent(fm);
+ fv->infoh = (as+ds)/1024;
+ gtk_widget_set_size_request(fv->status,0,fv->infoh);
+ gtk_widget_set_size_request(fv->v,sf->desired_col_cnt*fv->cbw+1,sf->desired_row_cnt*fv->cbh+1);
+
+ context = gtk_widget_get_pango_context( fv->v );
+ fv->fontset[0] = pango_context_get_font_description(context);
+ /*g_object_ref(G_OBJECT(fv->fontset[0]));*/ /* Not an object, so can't incr its ref */
+ font = pango_context_load_font( context, fv->fontset[0]);
+ fm = pango_font_get_metrics(font,NULL);
+ as = pango_font_metrics_get_ascent(fm);
+ ds = pango_font_metrics_get_descent(fm);
+ fv->lab_height = (as+ds)/1024;
+ fv->lab_as = as/1024;
+
+ g_object_set_data( G_OBJECT(fv->gw), "ffdata", fv );
+ g_object_set_data( G_OBJECT(fv->v) , "ffdata", fv );
+
+/* Python menu!!!!! */
+ fv->showhmetrics = default_fv_showhmetrics;
+ fv->showvmetrics = default_fv_showvmetrics && sf->hasvmetrics;
+ if ( fv->b.nextsame!=NULL ) {
+ fv->filled = ((FontView *) fv->b.nextsame)->filled;
+ bdf = ((FontView *) fv->b.nextsame)->show;
+ } else {
+ bdf = SplineFontPieceMeal(fv->b.sf,sf->display_size<0?-sf->display_size:default_fv_font_size,
+ (fv->antialias?pf_antialias:0)|(fv->bbsized?pf_bbsized:0)|
+ (use_freetype_to_rasterize_fv && !sf->strokedfont && !sf->multilayer?pf_ft_nohints:0),
+ NULL);
+ fv->filled = bdf;
+ if ( sf->display_size>0 ) {
+ for ( bdf=sf->bitmaps; bdf!=NULL && bdf->pixelsize!=sf->display_size ;
+ bdf=bdf->next );
+ if ( bdf==NULL )
+ bdf = fv->filled;
+ }
+ if ( sf->onlybitmaps && bdf==fv->filled && sf->bitmaps!=NULL )
+ bdf = sf->bitmaps;
+ }
+ fv->cbw = -1;
+ FVChangeDisplayFont(fv,bdf);
+
+ fv->popupinfo = /*lookup_widget( fv->gw, "tooltips")*/ gtk_tooltips_new();
+ gtk_tooltips_set_tip( GTK_TOOLTIPS(fv->popupinfo), fv->v, "", NULL );
+ /*gtk_tooltips_disable( GTK_TOOLTIPS(fv->popupinfo));*/
+
+ fv->imc = gtk_im_multicontext_new();
+ gtk_im_context_set_use_preedit(fv->imc,FALSE); /* Context should draw in its own window */
+ gtk_im_context_set_client_window(fv->imc,fv->gw->window);
+ g_signal_connect(G_OBJECT(fv->imc),"commit", G_CALLBACK(FontView_TextEntry), fv );
+
+ fv->vlayout = gtk_widget_create_pango_layout( fv->v, NULL );
+ fv->statuslayout = gtk_widget_create_pango_layout( fv->status, NULL );
+#ifdef _NO_PYTHON
+ /* Hide the tools menu if no python */
+ gtk_widget_hide(lookup_widget( GTK_WIDGET(fv->gw), "tools3" ));
+#endif
+#if defined(_NO_PYTHON) && defined(_NO_FFSCRIPT)
+ gtk_widget_hide(lookup_widget( GTK_WIDGET(fv->gw), "execute_script1" ));
+#endif
+#if defined(_NO_FFSCRIPT)
+ gtk_widget_hide(lookup_widget( GTK_WIDGET(fv->gw), "script_menu1" ));
+#endif
+#ifndef FONTFORGE_CONFIG_TILEPATH
+ gtk_widget_hide(lookup_widget( GTK_WIDGET(fv->gw), "tilepath1" ));
+#endif
+#ifndef FONTFORGE_CONFIG_PASTEAFTER
+ gtk_widget_hide(lookup_widget( GTK_WIDGET(fv->gw), "paste_after1" ));
+#endif
+
+ FVSetTitle( (FontViewBase *) fv);
+
+ gtk_widget_show(fv->gw);
+ FontViewOpenKids(fv);
+return( fv );
+}
+
+static FontView *FontView_Append(FontView *fv) {
+ /* Normally fontviews get added to the fv list when their windows are */
+ /* created. but we don't create any windows here, so... */
+ FontView *test;
+
+ if ( fv_list==NULL ) fv_list = fv;
+ else {
+ for ( test = fv_list; test->b.next!=NULL; test=(FontView *) test->b.next );
+ test->b.next = (FontViewBase *) fv;
+ }
+return( fv );
+}
+
+FontView *FontNew(void) {
+return( FontView_Create(SplineFontNew()));
+}
+
+static void FontView_Free(FontView *fv) {
+ int i;
+ FontView *prev;
+ FontView *fvs;
+
+ if ( fv->b.sf == NULL ) /* Happens when usurping a font to put it into an MM */
+ BDFFontFree(fv->filled);
+ else if ( fv->b.nextsame==NULL && fv->b.sf->fv==(FontViewBase *) fv ) {
+ EncMapFree(fv->b.map);
+ SplineFontFree(fv->b.cidmaster?fv->b.cidmaster:fv->b.sf);
+ BDFFontFree(fv->filled);
+ } else {
+ EncMapFree(fv->b.map);
+ for ( fvs=(FontView *) fv->b.sf->fv, i=0 ; fvs!=NULL; fvs = (FontView *) fvs->b.nextsame )
+ if ( fvs->filled==fv->filled ) ++i;
+ if ( i==1 )
+ BDFFontFree(fv->filled);
+ if ( fv->b.sf->fv==(FontViewBase *) fv ) {
+ if ( fv->b.cidmaster==NULL )
+ fv->b.sf->fv = fv->b.nextsame;
+ else {
+ fv->b.cidmaster->fv = fv->b.nextsame;
+ for ( i=0; i<fv->b.cidmaster->subfontcnt; ++i )
+ fv->b.cidmaster->subfonts[i]->fv = fv->b.nextsame;
+ }
+ } else {
+ for ( prev = (FontView *) fv->b.sf->fv; prev->b.nextsame!=(FontViewBase *)fv;
+ prev=(FontView *) prev->b.nextsame );
+ prev->b.nextsame = fv->b.nextsame;
+ }
+ }
+ free(fv->b.selected);
+ for ( i=0; i<_uni_fontmax; ++i )
+ if ( fv->fontset[i]!=NULL )
+ g_object_unref(G_OBJECT(fv->fontset[i]));
+ free(fv->fontset);
+ if ( fv->imc!=NULL ) {
+ g_object_unref((GObject *) fv->vlayout );
+ g_object_unref((GObject *) fv->statuslayout );
+ g_object_unref((GObject *) fv->char_slot);
+ g_object_unref((GObject *) fv->imc);
+ g_object_unref((GObject *) fv->popupinfo);
+ }
+#ifndef _NO_FFSCRIPT
+ DictionaryFree(fv->b.fontvars);
+ free(fv->b.fontvars);
+#endif
+#ifndef _NO_PYTHON
+ PyFF_FreeFV((FontViewBase *) fv);
+#else
+ { GtkWidget *w;
+ w = lookup_widget(fv->gw,"tools1");
+ if ( w!=NULL )
+ gtk_widget_set_sensitive(w,false);
+ }
+#endif
+ free(fv);
+}
+
+static int FontViewWinInfo(FontView *fv, int *cc, int *rc) {
+ if ( fv==NULL || fv->colcnt==0 || fv->rowcnt==0 ) {
+ *cc = 16; *rc = 4;
+return( -1 );
+ }
+
+ *cc = fv->colcnt;
+ *rc = fv->rowcnt;
+
+return( fv->rowoff*fv->colcnt );
+}
+
+static FontViewBase *FVAny(void) { return (FontViewBase *) fv_list; }
+
+static int FontIsActive(SplineFont *sf) {
+ FontView *fv;
+
+ for ( fv=fv_list; fv!=NULL; fv=(FontView *) (fv->b.next) )
+ if ( fv->b.sf == sf )
+return( true );
+
+return( false );
+}
+
+static SplineFont *FontOfFilename(const char *filename) {
+ char buffer[1025];
+ FontView *fv;
+
+ GFileGetAbsoluteName((char *) filename,buffer,sizeof(buffer));
+ for ( fv=fv_list; fv!=NULL ; fv=(FontView *) (fv->b.next) ) {
+ if ( fv->b.sf->filename!=NULL && strcmp(fv->b.sf->filename,buffer)==0 )
+return( fv->b.sf );
+ else if ( fv->b.sf->origname!=NULL && strcmp(fv->b.sf->origname,buffer)==0 )
+return( fv->b.sf );
+ }
+return( NULL );
+}
+
+static void FVExtraEncSlots(FontView *fv, int encmax) {
+ if ( fv->colcnt!=0 ) { /* Ie. scripting vs. UI */
+ GtkAdjustment *sb;
+ fv->rowltot = (encmax+1+fv->colcnt-1)/fv->colcnt;
+ sb = gtk_range_get_adjustment(GTK_RANGE(fv->vsb));
+ sb->upper = fv->rowltot;
+ gtk_range_set_adjustment(GTK_RANGE(fv->vsb),sb);
+ }
+}
+
+static void FV_BiggerGlyphCache(FontView *fv, int encmax) {
+ if ( fv->filled!=NULL )
+ BDFOrigFixup(fv->filled,encmax,fv->b.sf);
+}
+
+static void FontView_Close(FontView *fv) {
+ if ( fv->gw!=NULL )
+ gtk_widget_destroy(fv->gw);
+ else {
+ if ( fv_list==fv )
+ fv_list = (FontView *) fv->b.next;
+ else {
+ FontViewBase *n;
+ for ( n=(FontViewBase *) fv_list; n->next!=(FontViewBase *) fv; n=n->next );
+ n->next = fv->b.next;
+ }
+ FontViewFree((FontViewBase *) fv);
+ }
+}
+
+
+struct fv_interface gtk_fv_interface = {
+ (FontViewBase *(*)(SplineFont *)) FontView_Create,
+ (FontViewBase *(*)(SplineFont *)) __FontViewCreate,
+ (void (*)(FontViewBase *)) FontView_Close,
+ (void (*)(FontViewBase *)) FontView_Free,
+ (void (*)(FontViewBase *)) FontViewSetTitle,
+ FontViewSetTitles,
+ FontViewRefreshAll,
+ (void (*)(FontViewBase *)) FontView_ReformatOne,
+ FontView_ReformatAll,
+ FV_ToggleCharChanged,
+ (int (*)(FontViewBase *, int *, int *)) FontViewWinInfo,
+ FontIsActive,
+ FVAny,
+ (FontViewBase *(*)(FontViewBase *)) FontView_Append,
+ FontOfFilename,
+ (void (*)(FontViewBase *,int)) FVExtraEncSlots,
+ (void (*)(FontViewBase *,int)) FV_BiggerGlyphCache,
+ (void (*)(FontViewBase *,BDFFont *)) FV_ChangeDisplayBitmap,
+ (void (*)(FontViewBase *)) FV_ShowFilled,
+ FV_ReattachCVs,
+ (void (*)(FontViewBase *)) FVDeselectAll,
+ (void (*)(FontViewBase *,int )) FVScrollToGID,
+ (void (*)(FontViewBase *,int )) FV_ChangeGID,
+ SF_CloseAllInstrs
+};
diff --git a/gtkui/gwwvask.c b/gtkui/gwwvask.c
index 4eee442a..d4ed91df 100644
--- a/gtkui/gwwvask.c
+++ b/gtkui/gwwvask.c
@@ -27,6 +27,7 @@
# include <gtk/gtk.h>
# include <gdk/gdkkeysyms.h>
+# include <glib.h>
# include "gwwvask.h"
# include "support.h"
# include <stdarg.h>
@@ -39,6 +40,8 @@
# include <unistd.h>
# include <errno.h>
# include <libintl.h>
+# include <stdint.h>
+# define _(str) gettext(str)
/* A set of extremely simple dlgs.
Post a notice (which vanishes after a bit)
@@ -48,7 +51,15 @@
Ask the user to chose between a list of choices
*/
-static int Finish( gpointer dlg ) {
+static void Finish( gpointer dlg ) {
+ int timer_id;
+ timer_id = (intptr_t) g_object_get_data(G_OBJECT(dlg),"timer");
+ g_source_destroy(g_main_context_find_source_by_id(g_main_context_default(),
+ timer_id));
+ gtk_widget_destroy(dlg);
+}
+
+static int TimerFinish( gpointer dlg ) {
gtk_widget_destroy(dlg);
return( FALSE ); /* End timer */
}
@@ -57,6 +68,7 @@ void gwwv_post_notice(const char *title, const char *msg, ... ) {
char buffer[400];
va_list va;
GtkWidget *dlg, *lab;
+ int timer_id;
va_start(va,msg);
#if defined( _NO_SNPRINTF ) || defined( __VMS )
@@ -74,7 +86,8 @@ void gwwv_post_notice(const char *title, const char *msg, ... ) {
G_CALLBACK(Finish), G_OBJECT(dlg));
g_signal_connect_swapped(G_OBJECT(dlg),"response",
G_CALLBACK(Finish), G_OBJECT(dlg));
- gtk_timeout_add(30*1000,Finish,dlg);
+ timer_id = gtk_timeout_add(30*1000,TimerFinish,dlg);
+ g_object_set_data(G_OBJECT(dlg),"timer",(void *) timer_id);
lab = gtk_label_new_with_mnemonic(buffer);
gtk_widget_show(lab);
@@ -115,7 +128,7 @@ void gwwv_ierror(const char *msg, ... ) {
GtkWidget *dlg, *lab;
va_start(va,msg);
- sprintf(buffer, _("Internal Error: "));
+ strcpy(buffer, _("Internal Error: "));
len = strlen(buffer);
#if defined( _NO_SNPRINTF ) || defined( __VMS )
vsprintf( buffer+len, msg, va);
@@ -250,9 +263,14 @@ char *gwwv_ask_string(const char *title,const char *def,
gtk_widget_destroy(dlg);
return( ret );
}
-
+
+static void select_me(gpointer *data,gpointer *_sel) {
+ char *sel = (char *) _sel;
+ sel[gtk_tree_path_get_indices((GtkTreePath *) data)[0]] = TRUE;
+}
+
static int _gwwv_choose_with_buttons(const char *title,
- const char **choices, int cnt, int def,
+ const char **choices, char *sel, int cnt, int def,
const char *butnames[2], const char *msg, va_list va ) {
char buffer[400];
GtkWidget *dlg, *lab, *list;
@@ -296,14 +314,24 @@ static int _gwwv_choose_with_buttons(const char *title,
NULL));
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW(list),FALSE );
select = gtk_tree_view_get_selection( GTK_TREE_VIEW( list ));
- gtk_tree_selection_set_mode( select, GTK_SELECTION_SINGLE);
- if ( def>=0 ) {
- GtkTreePath *path = gtk_tree_path_new_from_indices(def,-1);
- /* I don't understand this. If I use selection_single, I can't select */
- /* anything. If I use multiple it does what I expect single to do */
- gtk_tree_selection_select_path(select,path);
- gtk_tree_view_set_cursor(GTK_TREE_VIEW(list),path,NULL,FALSE);
- gtk_tree_path_free(path);
+ if ( sel==NULL ) {
+ gtk_tree_selection_set_mode( select, GTK_SELECTION_SINGLE);
+ if ( def>=0 ) {
+ GtkTreePath *path = gtk_tree_path_new_from_indices(def,-1);
+ /* I don't understand this. If I use selection_single, I can't select */
+ /* anything. If I use multiple it does what I expect single to do */
+ gtk_tree_selection_select_path(select,path);
+ gtk_tree_view_set_cursor(GTK_TREE_VIEW(list),path,NULL,FALSE);
+ gtk_tree_path_free(path);
+ }
+ } else {
+ gtk_tree_selection_set_mode( select, GTK_SELECTION_MULTIPLE);
+ for ( i=0; i<cnt; ++i ) if ( sel[i] ) {
+ GtkTreePath *path = gtk_tree_path_new_from_indices(i,-1);
+ gtk_tree_selection_select_path(select,path);
+ gtk_tree_view_set_cursor(GTK_TREE_VIEW(list),path,NULL,FALSE);
+ gtk_tree_path_free(path);
+ }
}
gtk_widget_show(list);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dlg)->vbox),list);
@@ -312,13 +340,19 @@ static int _gwwv_choose_with_buttons(const char *title,
if ( result==GTK_RESPONSE_REJECT || result==GTK_RESPONSE_NONE || result==GTK_RESPONSE_DELETE_EVENT)
ret = -1;
else {
- GList *sel = gtk_tree_selection_get_selected_rows(select,NULL);
+ GList *endsel = gtk_tree_selection_get_selected_rows(select,NULL);
if ( sel==NULL )
ret = -1;
else {
- ret = gtk_tree_path_get_indices(sel->data)[0];
- g_list_foreach( sel, (GFunc) gtk_tree_path_free, NULL);
- g_list_free( sel );
+ if ( sel==NULL ) {
+ ret = gtk_tree_path_get_indices(endsel->data)[0];
+ } else {
+ for ( i=0; i<cnt; ++i ) sel[i] = FALSE;
+ g_list_foreach( endsel, (GFunc) select_me, sel);
+ ret = 0;
+ }
+ g_list_foreach( endsel, (GFunc) gtk_tree_path_free, NULL);
+ g_list_free( endsel );
}
}
gtk_widget_destroy(dlg);
@@ -333,7 +367,7 @@ int gwwv_choose_with_buttons(const char *title,
int ret;
va_start(va,msg);
- ret = _gwwv_choose_with_buttons(title,choices,cnt,def,butnames,msg,va);
+ ret = _gwwv_choose_with_buttons(title,choices,NULL,cnt,def,butnames,msg,va);
va_end(va);
return( ret );
}
@@ -346,7 +380,19 @@ int gwwv_choose(const char *title,
int ret;
va_start(va,msg);
- ret = _gwwv_choose_with_buttons(title,choices,cnt,def,buts,msg,va);
+ ret = _gwwv_choose_with_buttons(title,choices,NULL,cnt,def,buts,msg,va);
+ va_end(va);
+return( ret );
+}
+
+int gwwv_choose_multiple(char *title,
+ const char **choices, char *sel, int cnt, char **buts,
+ const char *msg, ... ) {
+ va_list va;
+ int ret;
+
+ va_start(va,msg);
+ ret = _gwwv_choose_with_buttons(title,choices,sel,cnt,-1,(const char **) buts,msg,va);
va_end(va);
return( ret );
}
@@ -462,19 +508,22 @@ return( gwwv_wild_match(pattern, info->filename, TRUE));
}
static void gwwv_file_def_filters(GtkWidget *dialog, const char *def_name,
- const struct gwwv_filter filters ) {
+ const struct gwwv_filter *filters ) {
GtkFileFilter *filter, *standard;
+ int i;
g_object_set(G_OBJECT(dialog),"show-hidden",TRUE,NULL);
if ( def_name!=NULL ) {
- char *pt = strrchr( def_name,'/');
+ gsize read, written;
+ char *temp = g_filename_from_utf8(def_name,-1,&read,&written,NULL);
+ char *pt = strrchr( temp,'/');
if ( pt!=NULL ) {
- char *dir = strndup(def_name,pt-def_name);
- gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER( dialog ), dir );
+ *pt = '\0';
+ gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER( dialog ), temp );
gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( dialog ), pt+1 );
- free(dir);
} else
- gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( dialog ), def_name );
+ gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( dialog ), temp );
+ free(temp);
}
if ( filters!=NULL ) {
standard = NULL;
@@ -499,9 +548,10 @@ static void gwwv_file_def_filters(GtkWidget *dialog, const char *def_name,
}
char *gwwv_open_filename_mult(const char *title, const char *def_name,
- const struct gwwv_filter filters, int mult ) {
+ const struct gwwv_filter *filters, int mult ) {
GtkWidget *dialog;
char *filename = NULL;
+ gsize read, written;
if ( mult )
dialog = gtk_file_chooser_dialog_new (title,
@@ -522,17 +572,21 @@ char *gwwv_open_filename_mult(const char *title, const char *def_name,
gwwv_file_def_filters(dialog,def_name,filters);
filename = NULL;
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
- filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ if ( gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT ) {
+ char *temp = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ filename = g_filename_to_utf8(temp,-1,&read,&written,NULL);
+ free(temp);
+ }
gtk_widget_destroy (dialog);
return( filename );
}
char *gwwv_save_filename_with_gadget(const char *title, const char *def_name,
- const struct gwwv_filter filters, GtkWidget *extra ) {
+ const struct gwwv_filter *filters, GtkWidget *extra ) {
GtkWidget *dialog;
char *filename = NULL;
+ gsize read, written;
dialog = gtk_file_chooser_dialog_new (title,
NULL,
@@ -545,8 +599,11 @@ char *gwwv_save_filename_with_gadget(const char *title, const char *def_name,
gtk_file_chooser_set_extra_widget( GTK_FILE_CHOOSER( dialog ), extra );
filename = NULL;
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
- filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+ char *temp = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ filename = g_filename_to_utf8(temp,-1,&read,&written,NULL);
+ free(temp);
+ }
gtk_widget_destroy (dialog);
return( filename );
@@ -557,24 +614,25 @@ char *gwwv_open_filename(const char *title, const char *def_name,
struct gwwv_filter filters[3];
if ( filter==NULL )
-return( gwwv_open_filename_mult(title,def_name,NULL,false));
+return( gwwv_open_filename_mult(title,def_name,NULL,FALSE));
memset(filters,0,sizeof(filters));
filters[0].name = _("Default");
- filters[0].wild = filter;
+ filters[0].wild = (char *) filter;
filters[1].name = _("All");
filters[1].wild = "*";
-return( gwwv_open_filename_mult(title,def_name,filters,false));
+return( gwwv_open_filename_mult(title,def_name,filters,FALSE));
}
char *gwwv_saveas_filename(const char *title, const char *def_name,
const char *filter) {
+ struct gwwv_filter filters[3];
if ( filter==NULL )
-return( gwwv_save_filename_mult(title,def_name,NULL,false));
+return( gwwv_save_filename_with_gadget(title,def_name,NULL,FALSE));
memset(filters,0,sizeof(filters));
filters[0].name = _("Default");
- filters[0].wild = filter;
+ filters[0].wild = (char *) filter;
filters[1].name = _("All");
filters[1].wild = "*";
-return( gwwv_save_filename_with_gadget(title,def_name,filters,false));
+return( gwwv_save_filename_with_gadget(title,def_name,filters,FALSE));
}
diff --git a/gtkui/gwwvask.h b/gtkui/gwwvask.h
index 777e8c19..818439a9 100644
--- a/gtkui/gwwvask.h
+++ b/gtkui/gwwvask.h
@@ -4,7 +4,8 @@
extern char *strndup(const char *str, int n);
extern void gwwv_post_notice(const char *title, const char *msg, ... );
-extern void gwwv_error(const char *title, const char *msg, ... );
+extern void gwwv_post_error(const char *title, const char *msg, ... );
+extern void gwwv_ierror(const char *msg, ... );
extern int gwwv_ask(const char *title,const char **butnames, int def,int cancel,
const char *msg, ... );
extern char *gwwv_ask_string(const char *title,const char *def,
@@ -15,6 +16,9 @@ extern int gwwv_choose_with_buttons(const char *title,
extern int gwwv_choose(const char *title,
const char **choices, int cnt, int def,
const char *msg, ... );
+extern int gwwv_choose_multiple(char *title,
+ const char **choices, char *sel, int cnt, char **buts,
+ const char *msg, ... );
extern int gwwv_wild_match(char *pattern, const char *name,int ignorecase);
struct gwwv_filter {
@@ -23,8 +27,9 @@ struct gwwv_filter {
GtkFileFilterFunc filtfunc;
};
-extern char *gwwv_open_filename_mult(const char *title,const char *def_name,const struct gwwv_filter *filters, int mult);
-extern char *gwwv_save_filename_with_gadget(const char *tit,const char *def,const char *filter,GtkWidget *extra)
+extern char *gwwv_open_filename_mult(const char *title,const char *def_name,const struct gwwv_filter *filter, int mult);
+extern char *gwwv_save_filename_with_gadget(const char *title, const char *def_name,
+ const struct gwwv_filter *filters, GtkWidget *extra );
extern char *gwwv_open_filename(const char *title, const char *def_name,
const char *filter);
extern char *gwwv_saveas_filename(const char *title, const char *def_name,
diff --git a/gtkui/gwwvmenubar.c b/gtkui/gwwvmenubar.c
index 0fb9ad8d..aac561b8 100644
--- a/gtkui/gwwvmenubar.c
+++ b/gtkui/gwwvmenubar.c
@@ -97,7 +97,10 @@ static void gww_vmenu_bar_size_allocate (GtkWidget *widget,
width = 0;
for ( i=0, children = vmenu_bar->children; children!=NULL ;
++i, children=children->next ) {
- if ( width+arrow_requisition.width <= total_width )
+ if (!GTK_WIDGET_VISIBLE (children->data))
+ continue;
+ if ( width+arrow_requisition.width <= total_width ||
+ ( children->next==NULL && width <= total_width ))
goodi = i-1;
gtk_widget_size_request (children->data, &child_requisition);
if ( width + child_requisition.width > total_width )
diff --git a/gtkui/interface.h b/gtkui/interface.h
new file mode 100644
index 00000000..9669a31c
--- /dev/null
+++ b/gtkui/interface.h
@@ -0,0 +1,12 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+GtkWidget* create_FontView (void);
+GtkWidget* create_FontForgeSplash (void);
+GtkWidget* create_CharView (void);
+GtkWidget* create_MetricsView (void);
+GtkWidget* create_BitmapView (void);
+GtkWidget* create_FontInfo (void);
+GtkWidget* create_FontViewShowMetrics (void);
+GtkWidget* create_FontViewPopupMenu (void);
diff --git a/gtkui/openfontdlg.c b/gtkui/openfontdlg.c
new file mode 100644
index 00000000..43a0ecae
--- /dev/null
+++ b/gtkui/openfontdlg.c
@@ -0,0 +1,321 @@
+/* Copyright (C) 2008 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "fontforgegtk.h"
+# include <fontforge/gfile.h>
+# include <gtk/gtk.h>
+# include <gdk/gdkkeysyms.h>
+# include "gwwvask.h"
+# include "support.h"
+# include <stdarg.h>
+# include <stdio.h>
+# include <string.h>
+# include <stdlib.h>
+# include <ctype.h>
+# include <sys/stat.h>
+# include <sys/types.h>
+# include <unistd.h>
+# include <errno.h>
+# include <libintl.h>
+
+extern NameList *force_names_when_opening;
+int default_font_filter_index=0;
+struct gwwv_filter *user_font_filters = NULL;
+
+struct gwwv_filter def_font_filters[] = {
+ { N_("All Fonts"), "*.{"
+ "pfa,"
+ "pfb,"
+ "pt3,"
+ "t42,"
+ "sfd,"
+ "ttf,"
+ "bdf,"
+ "otf,"
+ "otb,"
+ "cff,"
+ "cef,"
+ "gai,"
+#ifndef _NO_LIBXML
+ "svg,"
+ "ufo,"
+#endif
+ "pf3,"
+ "ttc,"
+ "gsf,"
+ "cid,"
+ "bin,"
+ "hqx,"
+ "dfont,"
+ "mf,"
+ "ik,"
+ "fon,"
+ "fnt,"
+ "pcf,"
+ "pmf,"
+ "*pk,"
+ "*gf,"
+ "pdb"
+ "}"
+/* With any of these methods of compression */
+ "{.gz,.Z,.bz2,}"},
+ { N_("Outline Fonts"), "*.{"
+ "pfa,"
+ "pfb,"
+ "pt3,"
+ "t42,"
+ "sfd,"
+ "ttf,"
+ "otf,"
+ "cff,"
+ "cef,"
+ "gai,"
+#ifndef _NO_LIBXML
+ "svg,"
+ "ufo,"
+#endif
+ "pf3,"
+ "ttc,"
+ "gsf,"
+ "cid,"
+ "bin,"
+ "hqx,"
+ "dfont,"
+ "mf,"
+ "ik"
+ "}"
+ "{.gz,.Z,.bz2,}"},
+ { N_("Bitmap Fonts"), "*.{"
+ "bdf,"
+ "otb,"
+ "bin,"
+ "hqx,"
+ "fon,"
+ "fnt,"
+ "pcf,"
+ "pmf,"
+ "*pk,"
+ "*gf,"
+ "pdb"
+ "}"
+ "{.gz,.Z,.bz2,}"},
+ {NU_("ΤεΧ Bitmap Fonts"), "*{pk,gf}"},
+ {N_("PostScript"), "*.{pfa,pfb,t42,otf,cef,cff,gai,pf3,pt3,gsf,cid}{.gz,.Z,.bz2,}"},
+ {N_("TrueType"), "*.{ttf,t42,ttc}{.gz,.Z,.bz2,}"},
+ {N_("OpenType"), "*.{ttf,otf}{.gz,.Z,.bz2,}"},
+ {N_("Type1"), "*.{pfa,pfb,gsf,cid}{.gz,.Z,.bz2,}"},
+ {N_("Type2"), "*.{otf,cef,cff,gai}{.gz,.Z,.bz2,}"},
+ {N_("Type3"), "*.{pf3,pt3}{.gz,.Z,.bz2,}"},
+#ifndef _NO_LIBXML
+ {N_("SVG"), "*.svg{.gz,.Z,.bz2,}"},
+#endif
+ {N_("FontForge's SFD"), "*.sfd{.gz,.Z,.bz2,}"},
+ {N_("Backup SFD"), "*.sfd~"},
+ {N_("Extract from PDF"), "*.pdf{.gz,.Z,.bz2,}"},
+ {" ---- ", ""},
+ {N_("All Files"), "*"},
+ NULL };
+
+static gboolean gwwv_file_pattern_matcher(const GtkFileFilterInfo *info,
+ gpointer data) {
+ char *pattern = (char *) data;
+return( gwwv_wild_match(pattern, info->filename, TRUE));
+}
+
+static void find_fonts_callback(GtkFileChooser *dialog, gpointer tooltip) {
+ GtkTooltips *tooltips = (GtkTooltips *) tooltip;
+ GSList *files = gtk_file_chooser_get_filenames(dialog);
+ GSList *test;
+ int len, cnt, i;
+ char ***fonts, *pt, *text;
+
+ if ( files==NULL || (cnt = g_slist_length(files))==0 )
+ gtk_tooltips_set_tip(tooltips,GTK_WIDGET(dialog),"","");
+ else {
+ fonts = gcalloc(cnt,sizeof(char **));
+ cnt = len = 0;
+ for ( test=files; test!=NULL; test=test->next, ++cnt) {
+ fonts[cnt] = GetFontNames((char *) (test->data));
+ if ( fonts[cnt]!=NULL ) {
+ len += 4*strlen((char *) (test->data))+1; /* allow space for utf8 conversion */
+ for ( i=0; fonts[cnt][i]!=NULL; ++i )
+ len += strlen( fonts[cnt][i])+2;
+ }
+ }
+ pt = text = galloc(len+10);
+ cnt = 0;
+ for ( test=files; test!=NULL; test=test->next, ++cnt) {
+ if ( fonts[cnt]!=NULL ) {
+ /* If there is only one file selected, don't bother to name it */
+ if ( cnt!=0 || test->next!=NULL ) {
+ gsize junk;
+ char *temp = g_filename_to_utf8(GFileNameTail( (char *) (test->data) ),
+ -1, &junk, &junk, NULL);
+ strcpy(pt,temp);
+ g_free(temp);
+ pt += strlen(pt);
+ *pt++ = '\n';
+ }
+ for ( i=0; fonts[cnt][i]!=NULL; ++i ) {
+ *pt++ = ' ';
+ strcpy(pt,fonts[cnt][i]);
+ free(fonts[cnt][i]);
+ pt += strlen(pt);
+ *pt ++ = '\n';
+ }
+ free(fonts[cnt]);
+ }
+ }
+ if ( pt>text && pt[-1]=='\n' )
+ pt[-1]='\0';
+ else
+ *pt = '\0';
+ free(fonts);
+ if ( *text=='\0' )
+ gtk_tooltips_set_tip( tooltips, GTK_WIDGET(dialog), "???", NULL );
+ else {
+ gtk_tooltips_set_tip( tooltips, GTK_WIDGET(dialog), text, NULL );
+ }
+ free(text);
+ }
+
+ for ( test=files; test!=NULL; test=test->next)
+ g_free(test->data);
+ g_slist_free(files);
+}
+
+static void RememberCurrentFilter(GtkFileFilter *filter) {
+ int i, k;
+ const char *name;
+
+ if ( filter==NULL )
+return;
+ name = gtk_file_filter_get_name(filter);
+ if ( name==NULL )
+return;
+
+ for ( i=0; def_font_filters[i].name!=NULL; ++i ) {
+ if ( strcmp(name,_(def_font_filters[i].name))== 0 ) {
+ if ( *def_font_filters[i].wild!='\0' )
+ default_font_filter_index = i;
+return;
+ }
+ }
+ if ( user_font_filters!=NULL ) {
+ for ( k=0; user_font_filters[k].name!=NULL; ++i, ++k ) {
+ if ( strcmp(name,_(user_font_filters[k].name))== 0 ) {
+ default_font_filter_index = k;
+return;
+ }
+ }
+ }
+}
+
+char *FVOpenFont(const char *title, const char *def_name, int mult ) {
+ GtkWidget *dialog;
+ char *filename = NULL;
+ GtkFileFilter *filter, *standard, *first;
+ int ans, i,k;
+ GtkTooltips *tips;
+
+ if ( mult )
+ dialog = gtk_file_chooser_dialog_new (title,
+ NULL,
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_NEW, -100,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL);
+ else
+ dialog = gtk_file_chooser_dialog_new (title,
+ NULL,
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL);
+ gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER( dialog ), mult );
+ g_object_set(G_OBJECT(dialog),"show-hidden",TRUE,NULL);
+ if ( def_name!=NULL ) {
+ char *pt = strrchr( def_name,'/');
+ if ( pt!=NULL ) {
+ char *dir = strndup(def_name,pt-def_name);
+ gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER( dialog ), dir );
+ gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( dialog ), pt+1 );
+ free(dir);
+ } else
+ gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( dialog ), def_name );
+ }
+ standard = first = NULL;
+ for ( i=0; def_font_filters[i].name!=NULL; ++i ) {
+ filter = gtk_file_filter_new();
+ /* GTK's gtk_file_filter_add_pattern doesn't handled {} wildcards */
+ /* and I depend on those. So I use my own patern matcher */
+ gtk_file_filter_add_custom( filter,GTK_FILE_FILTER_FILENAME,
+ gwwv_file_pattern_matcher, (gpointer) def_font_filters[i].wild, NULL);
+ gtk_file_filter_set_name( filter,_(def_font_filters[i].name) );
+ gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( dialog ), filter );
+ if ( i==default_font_filter_index )
+ standard = filter;
+ if ( first==NULL )
+ first = filter;
+ }
+ if ( user_font_filters!=NULL ) {
+ for ( k=0; user_font_filters[k].name!=NULL; ++i, ++k ) {
+ filter = gtk_file_filter_new();
+ gtk_file_filter_add_custom( filter,GTK_FILE_FILTER_FILENAME,
+ gwwv_file_pattern_matcher, (gpointer) user_font_filters[k].wild, NULL);
+ gtk_file_filter_set_name( filter,_(user_font_filters[k].name) );
+ gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( dialog ), filter );
+ if ( i==default_font_filter_index )
+ standard = filter;
+ }
+ }
+ if ( standard==NULL )
+ standard = first;
+ if ( standard!=NULL )
+ gtk_file_chooser_set_filter( GTK_FILE_CHOOSER( dialog ), standard );
+
+ /* New Filter button, Recent files list */
+
+ if ( RecentFiles[0]!=NULL ) {
+ }
+
+ g_signal_connect (G_OBJECT(dialog), "selection-changed",
+ G_CALLBACK (find_fonts_callback),
+ (tips = gtk_tooltips_new()) );
+
+ filename = NULL;
+ ans = gtk_dialog_run (GTK_DIALOG (dialog));
+ if ( ans == GTK_RESPONSE_ACCEPT) {
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ RememberCurrentFilter(gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(dialog)));
+ } else if ( ans == -100 )
+ FontNew(); /* And return NULL */
+
+ gtk_widget_destroy (dialog);
+ g_object_unref( G_OBJECT(tips));
+return( filename );
+}
diff --git a/gtkui/prefs.c b/gtkui/prefs.c
new file mode 100644
index 00000000..de3cdc5c
--- /dev/null
+++ b/gtkui/prefs.c
@@ -0,0 +1,1024 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "fontforgegtk.h"
+#include <fontforge/groups.h>
+#include <fontforge/plugins.h>
+#include <fontforge/charset.h>
+#include <fontforge/gfile.h>
+#include <fontforge/ustring.h>
+#include <gdk/gdkkeysyms.h>
+
+#include <sys/types.h>
+#include <dirent.h>
+#include <locale.h>
+#include <time.h>
+#include <sys/time.h>
+#include <stdlib.h>
+
+#include <fontforge/ttf.h>
+
+#if HAVE_LANGINFO_H
+# include <langinfo.h>
+#endif
+
+extern int splash;
+extern int adjustwidth;
+extern int adjustlbearing;
+extern Encoding *default_encoding;
+extern int autohint_before_rasterize;
+extern int autohint_before_generate;
+extern int use_freetype_to_rasterize_fv;
+extern int OpenCharsInNewWindow;
+extern int ItalicConstrained;
+extern int accent_offset;
+extern int GraveAcuteCenterBottom;
+extern int PreferSpacingAccents;
+extern int CharCenterHighest;
+extern int ask_user_for_resolution;
+extern int stop_at_join;
+extern int cv_auto_goto;
+extern int recognizePUA;
+extern float arrowAmount;
+extern float arrowAccelFactor;
+extern float snapdistance;
+extern int snaptoint;
+extern float joinsnap;
+extern char *BDFFoundry;
+extern char *TTFFoundry;
+extern char *xuid;
+extern char *SaveTablesPref;
+extern char *RecentFiles[RECENT_MAX];
+/*struct cvshows CVShows = { 1, 1, 1, 1, 1, 0, 1 };*/ /* in charview */
+/* int default_fv_font_size = 24; */ /* in fontview */
+/* int default_fv_antialias = false */ /* in fontview */
+/* int default_fv_bbsized = false */ /* in fontview */
+extern int default_fv_row_count; /* in fontview */
+extern int default_fv_col_count; /* in fontview */
+extern int default_fv_showhmetrics; /* in fontview */
+extern int default_fv_showvmetrics; /* in fontview */
+extern int default_fv_glyphlabel; /* in fontview */
+extern int save_to_dir; /* in fontview, use sfdir rather than sfd */
+extern int palettes_docked; /* in cvpalettes */
+extern int cvvisible[2], bvvisible[3]; /* in cvpalettes.c */
+extern int maxundoes; /* in cvundoes */
+extern int prefer_cjk_encodings; /* in parsettf */
+extern int onlycopydisplayed, copymetadata, copyttfinstr;
+extern struct cvshows CVShows;
+extern int infowindowdistance; /* in cvruler.c */
+extern int oldformatstate; /* in savefontdlg.c */
+extern int oldbitmapstate; /* in savefontdlg.c */
+extern int old_ttf_flags; /* in savefontdlg.c */
+extern int old_ps_flags; /* in savefontdlg.c */
+extern int old_otf_flags; /* in savefontdlg.c */
+extern int old_validate; /* in savefontdlg.c */
+extern char *oflib_username; /* in savefontdlg.c */
+extern char *oflib_password; /* in savefontdlg.c */
+extern int oldsystem; /* in bitmapdlg.c */
+extern int preferpotrace; /* in autotrace.c */
+extern int autotrace_ask; /* in autotrace.c */
+extern int mf_ask; /* in autotrace.c */
+extern int mf_clearbackgrounds; /* in autotrace.c */
+extern int mf_showerrors; /* in autotrace.c */
+extern char *mf_args; /* in autotrace.c */
+static int glyph_2_name_map=0; /* was in tottf.c, now a flag in savefont options dlg */
+extern int coverageformatsallowed; /* in tottfgpos.c */
+extern int debug_wins; /* in cvdebug.c */
+extern int gridfit_dpi, gridfit_depth; /* in cvgridfit.c */
+extern float gridfit_pointsize; /* in cvgridfit.c */
+extern int hint_diagonal_ends; /* in stemdb.c */
+extern int hint_diagonal_intersections; /* in stemdb.c */
+extern int hint_bounding_boxes; /* in stemdb.c */
+extern int detect_diagonal_stems; /* in stemdb.c */
+extern char *script_menu_names[SCRIPT_MENU_MAX];
+extern char *script_filenames[SCRIPT_MENU_MAX];
+static char *xdefs_filename;
+extern int new_em_size; /* in splineutil2.c */
+extern int new_fonts_are_order2; /* in splineutil2.c */
+extern int loaded_fonts_same_as_new; /* in splineutil2.c */
+extern int use_second_indic_scripts; /* in tottfgpos.c */
+extern char *helpdir; /* in uiutil.c */
+static char *othersubrsfile = NULL;
+extern MacFeat *default_mac_feature_map, /* from macenc.c */
+ *user_mac_feature_map;
+extern int updateflex; /* in charview.c */
+extern int allow_utf8_glyphnames; /* in charinfo.c */
+extern int clear_tt_instructions_when_needed; /* in charview.c */
+extern int ask_user_for_cmap; /* in parsettf.c */
+
+extern int rectelipse, polystar, regular_star; /* from cvpalettes.c */
+extern int center_out[2]; /* from cvpalettes.c */
+extern float rr_radius; /* from cvpalettes.c */
+extern int ps_pointcnt; /* from cvpalettes.c */
+extern float star_percent; /* from cvpalettes.c */
+
+extern NameList *force_names_when_opening;
+extern NameList *force_names_when_saving;
+extern NameList *namelist_for_new_fonts;
+
+extern int default_font_filter_index;
+extern struct gwwv_filter *user_font_filters;
+static int alwaysgenapple=false, alwaysgenopentype=false;
+
+static int pointless;
+
+ /* These first three must match the values in macenc.c */
+#define CID_Features 101
+#define CID_FeatureDel 103
+#define CID_FeatureEdit 105
+
+#define CID_Mapping 102
+#define CID_MappingDel 104
+#define CID_MappingEdit 106
+
+#define CID_ScriptMNameBase 200
+#define CID_ScriptMFileBase (200+SCRIPT_MENU_MAX)
+#define CID_ScriptMBrowseBase (200+2*SCRIPT_MENU_MAX)
+
+#define CID_PrefsBase 1000
+#define CID_PrefsOffset 100
+#define CID_PrefsBrowseOffset (CID_PrefsOffset/2)
+
+/* ************************************************************************** */
+/* ***************************** mac data ***************************** */
+/* ************************************************************************** */
+
+extern struct macsettingname macfeat_otftag[], *user_macfeat_otftag;
+
+static void UserSettingsFree(void) {
+
+ free( user_macfeat_otftag );
+ user_macfeat_otftag = NULL;
+}
+
+static int UserSettingsDiffer(void) {
+ int i,j;
+
+ if ( user_macfeat_otftag==NULL )
+return( false );
+
+ for ( i=0; user_macfeat_otftag[i].otf_tag!=0; ++i );
+ for ( j=0; macfeat_otftag[j].otf_tag!=0; ++j );
+ if ( i!=j )
+return( true );
+ for ( i=0; user_macfeat_otftag[i].otf_tag!=0; ++i ) {
+ for ( j=0; macfeat_otftag[j].otf_tag!=0; ++j ) {
+ if ( macfeat_otftag[j].mac_feature_type ==
+ user_macfeat_otftag[i].mac_feature_type &&
+ macfeat_otftag[j].mac_feature_setting ==
+ user_macfeat_otftag[i].mac_feature_setting &&
+ macfeat_otftag[j].otf_tag ==
+ user_macfeat_otftag[i].otf_tag )
+ break;
+ }
+ if ( macfeat_otftag[j].otf_tag==0 )
+return( true );
+ }
+return( false );
+}
+
+/**************************************************************************** */
+
+
+/* don't use mnemonics 'C' or 'O' (Cancel & OK) */
+enum pref_types { pr_int, pr_real, pr_bool, pr_enum, pr_encoding, pr_string,
+ pr_file, pr_namelist };
+struct enums { char *name; int value; };
+
+struct enums fvsize_enums[] = { {NULL} };
+
+static struct prefs_list {
+ char *name;
+ /* In the prefs file the untranslated name will always be used, but */
+ /* in the UI that name may be translated. */
+ enum pref_types type;
+ void *val;
+ void *(*get)(void);
+ void (*set)(void *);
+ char mn;
+ struct enums *enums;
+ unsigned int dontdisplay: 1;
+ char *popup;
+} general_list[] = {
+ { N_("ResourceFile"), pr_file, &xdefs_filename, NULL, NULL, 'R', NULL, 0, N_("When FontForge starts up, it loads display related resources from a\nproperty on the screen. Sometimes it is useful to be able to store\nthese resources in a file. These resources are only read at start\nup, so changing this has no effect until the next time you start\nFontForge.") },
+ { N_("HelpDir"), pr_file, &helpdir, NULL, NULL, 'H', NULL, 0, N_("The directory on your local system in which FontForge will search for help\nfiles. If a file is not found there, then FontForge will look for it on the net.") },
+ { N_("OtherSubrsFile"), pr_file, &othersubrsfile, NULL, NULL, 'O', NULL, 0, N_("If you wish to replace Adobe's OtherSubrs array (for Type1 fonts)\nwith an array of your own, set this to point to a file containing\na list of up to 14 PostScript subroutines. Each subroutine must\nbe preceded by a line starting with '%%%%' (any text before the\nfirst '%%%%' line will be treated as an initial copyright notice).\nThe first three subroutines are for flex hints, the next for hint\nsubstitution (this MUST be present), the 14th (or 13 as the\nnumbering actually starts with 0) is for counter hints.\nThe subroutines should not be enclosed in a [ ] pair.") },
+ { N_("FreeTypeInFontView"), pr_bool, &use_freetype_to_rasterize_fv, NULL, NULL, 'O', NULL, 0, N_("Use the FreeType rasterizer (when available)\nto rasterize glyphs in the font view.\nThis generally results in better quality.") },
+ { N_("AutoHint"), pr_bool, &autohint_before_rasterize, NULL, NULL, 'A', NULL, 0, N_("AutoHint before rasterizing") },
+ { N_("SplashScreen"), pr_bool, &splash, NULL, NULL, 'S', NULL, 0, N_("Show splash screen on start-up") },
+ { NULL }
+},
+ new_list[] = {
+ { N_("NewCharset"), pr_encoding, &default_encoding, NULL, NULL, 'N', NULL, 0, N_("Default encoding for\nnew fonts") },
+ { N_("NewEmSize"), pr_int, &new_em_size, NULL, NULL, 'S', NULL, 0, N_("The default size of the Em-Square in a newly created font.") },
+ { N_("NewFontsQuadratic"), pr_bool, &new_fonts_are_order2, NULL, NULL, 'Q', NULL, 0, N_("Whether new fonts should contain splines of quadratic (truetype)\nor cubic (postscript & opentype).") },
+ { N_("LoadedFontsAsNew"), pr_bool, &loaded_fonts_same_as_new, NULL, NULL, 'L', NULL, 0, N_("Whether fonts loaded from the disk should retain their splines\nwith the original order (quadratic or cubic), or whether the\nsplines should be converted to the default order for new fonts\n(see NewFontsQuadratic).") },
+ { NULL }
+},
+ open_list[] = {
+ { N_("PreferCJKEncodings"), pr_bool, &prefer_cjk_encodings, NULL, NULL, 'C', NULL, 0, N_("When loading a truetype or opentype font which has both a unicode\nand a CJK encoding table, use this flag to specify which\nshould be loaded for the font.") },
+ { N_("AskUserForCMap"), pr_bool, &ask_user_for_cmap, NULL, NULL, 'O', NULL, 0, N_("When loading a font in sfnt format (TrueType, OpenType, etc.),\nask the user to specify which cmap to use initially.") },
+ { N_("PreserveTables"), pr_string, &SaveTablesPref, NULL, NULL, 'P', NULL, 0, N_("Enter a list of 4 letter table tags, separated by commas.\nFontForge will make a binary copy of these tables when it\nloads a True/OpenType font, and will output them (unchanged)\nwhen it generates the font. Do not include table tags which\nFontForge thinks it understands.") },
+ { NULL }
+},
+ navigation_list[] = {
+ { N_("GlyphAutoGoto"), pr_bool, &cv_auto_goto, NULL, NULL, '\0', NULL, 0, N_("Typing a normal character in the glyph view window changes the window to look at that character") },
+ { N_("OpenCharsInNewWindow"), pr_bool, &OpenCharsInNewWindow, NULL, NULL, '\0', NULL, 0, N_("When double clicking on a character in the font view\nopen that character in a new window, otherwise\nreuse an existing one.") },
+ { NULL }
+},
+ editing_list[] = {
+ { N_("ItalicConstrained"), pr_bool, &ItalicConstrained, NULL, NULL, '\0', NULL, 0, N_("In the Outline View, the Shift key constrains motion to be parallel to the ItalicAngle rather than constraining it to be vertical.") },
+ { N_("ArrowMoveSize"), pr_real, &arrowAmount, NULL, NULL, '\0', NULL, 0, N_("The number of em-units by which an arrow key will move a selected point") },
+ { N_("ArrowAccelFactor"), pr_real, &arrowAccelFactor, NULL, NULL, '\0', NULL, 0, N_("Holding down the Alt (or Meta) key will speed up arrow key motion by this factor") },
+ { N_("SnapDistance"), pr_real, &snapdistance, NULL, NULL, '\0', NULL, 0, N_("When the mouse pointer is within this many pixels\nof one of the various interesting features (baseline,\nwidth, grid splines, etc.) the pointer will snap\nto that feature.") },
+ { N_("SnapToInt"), pr_bool, &snaptoint, NULL, NULL, '\0', NULL, 0, N_("When the user clicks in the editing window, round the location to the nearest integers.") },
+ { N_("JoinSnap"), pr_real, &joinsnap, NULL, NULL, '\0', NULL, 0, N_("The Edit->Join command will join points which are this close together\nA value of 0 means they must be coincident") },
+ { N_("StopAtJoin"), pr_bool, &stop_at_join, NULL, NULL, '\0', NULL, 0, N_("When dragging points in the outline view a join may occur\n(two open contours may connect at their endpoints). When\nthis is On a join will cause FontForge to stop moving the\nselection (as if the user had released the mouse button).\nThis is handy if your fingers are inclined to wiggle a bit.") },
+ { N_("CopyMetaData"), pr_bool, &copymetadata, NULL, NULL, '\0', NULL, 0, N_("When copying glyphs from the font view, also copy the\nglyphs' metadata (name, encoding, comment, etc).") },
+ { N_("UndoDepth"), pr_int, &maxundoes, NULL, NULL, '\0', NULL, 0, N_("The maximum number of Undoes/Redoes stored in a glyph") },
+ { N_("UpdateFlex"), pr_bool, &updateflex, NULL, NULL, '\0', NULL, 0, N_("Figure out flex hints after every change") },
+ { NULL }
+},
+ sync_list[] = {
+ { N_("AutoWidthSync"), pr_bool, &adjustwidth, NULL, NULL, '\0', NULL, 0, N_("Changing the width of a glyph\nchanges the widths of all accented\nglyphs based on it.") },
+ { N_("AutoLBearingSync"), pr_bool, &adjustlbearing, NULL, NULL, '\0', NULL, 0, N_("Changing the left side bearing\nof a glyph adjusts the lbearing\nof other references in all accented\nglyphs based on it.") },
+ { NULL }
+},
+ tt_list[] = {
+ { N_("ClearInstrsBigChanges"), pr_bool, &clear_tt_instructions_when_needed, NULL, NULL, 'C', NULL, 0, N_("Instructions in a TrueType font refer to\npoints by number, so if you edit a glyph\nin such a way that some points have different\nnumbers (add points, remove them, etc.) then\nthe instructions will be applied to the wrong\npoints with disasterous results.\n Normally FontForge will remove the instructions\nif it detects that the points have been renumbered\nin order to avoid the above problem. You may turn\nthis behavior off -- but be careful!") },
+ { N_("CopyTTFInstrs"), pr_bool, &copyttfinstr, NULL, NULL, '\0', NULL, 0, N_("When copying glyphs from the font view, also copy the\nglyphs' metadata (name, encoding, comment, etc).") },
+ { NULL }
+},
+ accent_list[] = {
+ { N_("AccentOffsetPercent"), pr_int, &accent_offset, NULL, NULL, '\0', NULL, 0, N_("The percentage of an em by which an accent is offset from its base glyph in Build Accent") },
+ { N_("AccentCenterLowest"), pr_bool, &GraveAcuteCenterBottom, NULL, NULL, '\0', NULL, 0, N_("When placing grave and acute accents above letters, should\nFontForge center them based on their full width, or\nshould it just center based on the lowest point\nof the accent.") },
+ { N_("CharCenterHighest"), pr_bool, &CharCenterHighest, NULL, NULL, '\0', NULL, 0, N_("When centering an accent over a glyph, should the accent\nbe centered on the highest point(s) of the glyph,\nor the middle of the glyph?") },
+ { N_("PreferSpacingAccents"), pr_bool, &PreferSpacingAccents, NULL, NULL, '\0', NULL, 0, N_("Use spacing accents (Unicode: 02C0-02FF) rather than\ncombining accents (Unicode: 0300-036F) when\nbuilding accented glyphs.") },
+ { NULL }
+},
+ args_list[] = {
+ { N_("PreferPotrace"), pr_bool, &preferpotrace, NULL, NULL, '\0', NULL, 0, N_("FontForge supports two different helper applications to do autotracing\n autotrace and potrace\nIf your system only has one it will use that one, if you have both\nuse this option to tell FontForge which to pick.") },
+ { N_("AutotraceArgs"), pr_string, NULL, GetAutoTraceArgs, SetAutoTraceArgs, '\0', NULL, 0, N_("Extra arguments for configuring the autotrace program\n(either autotrace or potrace)") },
+ { N_("AutotraceAsk"), pr_bool, &autotrace_ask, NULL, NULL, '\0', NULL, 0, N_("Ask the user for autotrace arguments each time autotrace is invoked") },
+ { N_("MfArgs"), pr_string, &mf_args, NULL, NULL, '\0', NULL, 0, N_("Commands to pass to mf (metafont) program, the filename will follow these") },
+ { N_("MfAsk"), pr_bool, &mf_ask, NULL, NULL, '\0', NULL, 0, N_("Ask the user for mf commands each time mf is invoked") },
+ { N_("MfClearBg"), pr_bool, &mf_clearbackgrounds, NULL, NULL, '\0', NULL, 0, N_("FontForge loads large images into the background of each glyph\nprior to autotracing them. You may retain those\nimages to look at after mf processing is complete, or\nremove them to save space") },
+ { N_("MfShowErr"), pr_bool, &mf_showerrors, NULL, NULL, '\0', NULL, 0, N_("MetaFont (mf) generates lots of verbiage to stdout.\nMost of the time I find it an annoyance but it is\nimportant to see if something goes wrong.") },
+ { NULL }
+},
+ fontinfo_list[] = {
+ { N_("FoundryName"), pr_string, &BDFFoundry, NULL, NULL, 'F', NULL, 0, N_("Name used for foundry field in bdf\nfont generation") },
+ { N_("TTFFoundry"), pr_string, &TTFFoundry, NULL, NULL, 'T', NULL, 0, N_("Name used for Vendor ID field in\nttf (OS/2 table) font generation.\nMust be no more than 4 characters") },
+ { N_("NewFontNameList"), pr_namelist, &namelist_for_new_fonts, NULL, NULL, '\0', NULL, 0, N_("FontForge will use this namelist when assigning\nglyph names to code points in a new font.") },
+ { N_("RecognizePUANames"), pr_bool, &recognizePUA, NULL, NULL, 'U', NULL, 0, N_("Once upon a time, Adobe assigned PUA (public use area) encodings\nfor many stylistic variants of characters (small caps, old style\nnumerals, etc.). Adobe no longer believes this to be a good idea,\nand recommends that these encodings be ignored.\n\n The assignments were originally made because most applications\ncould not handle OpenType features for accessing variants. Adobe\nnow believes that all apps that matter can now do so. Applications\nlike Word and OpenOffice still can't handle these features, so\n fontforge's default behavior is to ignore Adobe's current\nrecommendations.\n\nNote: This does not affect figuring out unicode from the font's encoding,\nit just controls determining unicode from a name.") },
+ { N_("UnicodeGlyphNames"), pr_bool, &allow_utf8_glyphnames, NULL, NULL, 'O', NULL, 0, N_("Allow the full unicode character set in glyph names.\nThis does not conform to adobe's glyph name standard.\nSuch names should be for internal use only and\nshould NOT end up in production fonts." ) },
+ { N_("XUID-Base"), pr_string, &xuid, NULL, NULL, 'X', NULL, 0, N_("If specified this should be a space separated list of integers each\nless than 16777216 which uniquely identify your organization\nFontForge will generate a random number for the final component.") },
+ { NULL }
+},
+ generate_list[] = {
+ { N_("AskBDFResolution"), pr_bool, &ask_user_for_resolution, NULL, NULL, 'B', NULL, 0, N_("When generating a set of BDF fonts ask the user\nto specify the screen resolution of the fonts\notherwise FontForge will guess depending on the pixel size.") },
+ { N_("HintForGen"), pr_bool, &autohint_before_generate, NULL, NULL, 'H', NULL, 0, N_("AutoHint changed glyphs before generating a font") },
+ { NULL }
+},
+ hints_list[] = {
+ { N_("HintBoundingBoxes"), pr_bool, &hint_bounding_boxes, NULL, NULL, '\0', NULL, 0, N_("FontForge will place vertical or horizontal hints to describe the bounding boxes of suitable glyphs.") },
+ { N_("HintDiagonalEnds"), pr_bool, &hint_diagonal_ends, NULL, NULL, '\0', NULL, 0, N_("FontForge will place vertical or horizontal hints at the ends of diagonal stems.") },
+ { N_("HintDiagonalInter"), pr_bool, &hint_diagonal_intersections, NULL, NULL, '\0', NULL, 0, N_("FontForge will place vertical or horizontal hints at the intersections of diagonal stems.") },
+ { N_("DetectDiagonalStems"), pr_bool, &detect_diagonal_stems, NULL, NULL, '\0', NULL, 0, N_("FontForge will generate diagonal stem hints, which then can be used by the AutoInstr command.") },
+ { NULL }
+},
+ opentype_list[] = {
+ { N_("UseNewIndicScripts"), pr_bool, &use_second_indic_scripts, NULL, NULL, 'C', NULL, 0, N_("MS has changed (in August 2006) the inner workings of their Indic shaping\nengine, and to disambiguate this change has created a parallel set of script\ntags (generally ending in '2') for Indic writing systems. If you are working\nwith the new system set this flag, if you are working with the old unset it.\n(if you aren't doing Indic work, this flag is irrelevant).") },
+ { NULL }
+},
+/* These are hidden, so will never appear in preference ui, hence, no "N_(" */
+/* They are controled elsewhere AntiAlias is a menu item in the font window's View menu */
+/* etc. */
+ hidden_list[] = {
+ { "AntiAlias", pr_bool, &default_fv_antialias, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultFVShowHmetrics", pr_int, &default_fv_showhmetrics, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultFVShowVmetrics", pr_int, &default_fv_showvmetrics, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultFVSize", pr_int, &default_fv_font_size, NULL, NULL, 'S', NULL, 1 },
+ { "DefaultFVRowCount", pr_int, &default_fv_row_count, NULL, NULL, 'S', NULL, 1 },
+ { "DefaultFVColCount", pr_int, &default_fv_col_count, NULL, NULL, 'S', NULL, 1 },
+ { "DefaultFVGlyphLabel", pr_int, &default_fv_glyphlabel, NULL, NULL, 'S', NULL, 1 },
+ { "SaveToDir", pr_int, &save_to_dir, NULL, NULL, 'S', NULL, 1 },
+ { "OnlyCopyDisplayed", pr_bool, &onlycopydisplayed, NULL, NULL, '\0', NULL, 1 },
+ { "PalettesDocked", pr_bool, &palettes_docked, NULL, NULL, '\0', NULL, 1 },
+ { "CVVisible0", pr_bool, &cvvisible[0], NULL, NULL, '\0', NULL, 1 },
+ { "CVVisible1", pr_bool, &cvvisible[1], NULL, NULL, '\0', NULL, 1 },
+ { "BVVisible0", pr_bool, &bvvisible[0], NULL, NULL, '\0', NULL, 1 },
+ { "BVVisible1", pr_bool, &bvvisible[1], NULL, NULL, '\0', NULL, 1 },
+ { "BVVisible2", pr_bool, &bvvisible[2], NULL, NULL, '\0', NULL, 1 },
+ { "MarkExtrema", pr_int, &CVShows.markextrema, NULL, NULL, '\0', NULL, 1 },
+ { "MarkPointsOfInflect", pr_int, &CVShows.markpoi, NULL, NULL, '\0', NULL, 1 },
+ { "ShowRulers", pr_bool, &CVShows.showrulers, NULL, NULL, '\0', NULL, 1, N_("Display rulers in the Outline Glyph View") },
+ { "ShowCPInfo", pr_int, &CVShows.showcpinfo, NULL, NULL, '\0', NULL, 1 },
+ { "InfoWindowDistance", pr_int, &infowindowdistance, NULL, NULL, '\0', NULL, 1 },
+ { "ShowSideBearings", pr_int, &CVShows.showsidebearings, NULL, NULL, '\0', NULL, 1 },
+ { "ShowPoints", pr_bool, &CVShows.showpoints, NULL, NULL, '\0', NULL, 1 },
+ { "ShowFilled", pr_int, &CVShows.showfilled, NULL, NULL, '\0', NULL, 1 },
+ { "ShowTabs", pr_int, &CVShows.showtabs, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultScreenDpiSystem", pr_int, &oldsystem, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultOutputFormat", pr_int, &oldformatstate, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultBitmapFormat", pr_int, &oldbitmapstate, NULL, NULL, '\0', NULL, 1 },
+ { "SaveValidate", pr_int, &old_validate, NULL, NULL, '\0', NULL, 1 },
+ { "OFLibUsername", pr_string, &oflib_username, NULL, NULL, '\0', NULL, 1 },
+ { "OFLibPassword", pr_string, &oflib_password, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultTTFflags", pr_int, &old_ttf_flags, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultPSflags", pr_int, &old_ps_flags, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultOTFflags", pr_int, &old_otf_flags, NULL, NULL, '\0', NULL, 1 },
+ { "PageWidth", pr_int, &pagewidth, NULL, NULL, '\0', NULL, 1 },
+ { "PageHeight", pr_int, &pageheight, NULL, NULL, '\0', NULL, 1 },
+ { "PrintType", pr_int, &printtype, NULL, NULL, '\0', NULL, 1 },
+ { "PrintCommand", pr_string, &printcommand, NULL, NULL, '\0', NULL, 1 },
+ { "PageLazyPrinter", pr_string, &printlazyprinter, NULL, NULL, '\0', NULL, 1 },
+ { "RegularStar", pr_bool, &regular_star, NULL, NULL, '\0', NULL, 1 },
+ { "PolyStar", pr_bool, &polystar, NULL, NULL, '\0', NULL, 1 },
+ { "RectEllipse", pr_bool, &rectelipse, NULL, NULL, '\0', NULL, 1 },
+ { "RectCenterOut", pr_bool, &center_out[0], NULL, NULL, '\0', NULL, 1 },
+ { "EllipseCenterOut", pr_bool, &center_out[1], NULL, NULL, '\0', NULL, 1 },
+ { "PolyStartPointCnt", pr_int, &ps_pointcnt, NULL, NULL, '\0', NULL, 1 },
+ { "RoundRectRadius", pr_real, &rr_radius, NULL, NULL, '\0', NULL, 1 },
+ { "StarPercent", pr_real, &star_percent, NULL, NULL, '\0', NULL, 1 },
+ { "CoverageFormatsAllowed", pr_int, &coverageformatsallowed, NULL, NULL, '\0', NULL, 1 },
+ { "DebugWins", pr_int, &debug_wins, NULL, NULL, '\0', NULL, 1 },
+ { "GridFitDpi", pr_int, &gridfit_dpi, NULL, NULL, '\0', NULL, 1 },
+ { "GridFitDepth", pr_int, &gridfit_depth, NULL, NULL, '\0', NULL, 1 },
+ { "GridFitPointSize", pr_real, &gridfit_pointsize, NULL, NULL, '\0', NULL, 1 },
+ { "ForceNamesWhenOpening", pr_namelist, &force_names_when_opening, NULL, NULL, '\0', NULL, 1 },
+ { "ForceNamesWhenSaving", pr_namelist, &force_names_when_saving, NULL, NULL, '\0', NULL, 1 },
+ { "DefaultFontFilterIndex", pr_int, &default_font_filter_index, NULL, NULL, '\0', NULL, 1 },
+ { NULL }
+},
+ oldnames[] = {
+ { "DumpGlyphMap", pr_bool, &glyph_2_name_map, NULL, NULL, '\0', NULL, 0, N_("When generating a truetype or opentype font it is occasionally\nuseful to know the mapping between truetype glyph ids and\nglyph names. Setting this option will cause FontForge to\nproduce a file (with extension .g2n) containing those data.") },
+ { "DefaultTTFApple", pr_int, &pointless, NULL, NULL, '\0', NULL, 1 },
+ { "AcuteCenterBottom", pr_bool, &GraveAcuteCenterBottom, NULL, NULL, '\0', NULL, 1, N_("When placing grave and acute accents above letters, should\nFontForge center them based on their full width, or\nshould it just center based on the lowest point\nof the accent.") },
+ { "AlwaysGenApple", pr_bool, &alwaysgenapple, NULL, NULL, 'A', NULL, 0, N_("Apple and MS/Adobe differ about the format of truetype and opentype files.\nThis controls the default setting of the Apple checkbox in the\nFile->Generate Font dialog.\nThe main differences are:\n Bitmap data are stored in different tables\n Scaled composite glyphs are treated differently\n Use of GSUB rather than morx(t)/feat\n Use of GPOS rather than kern/opbd\n Use of GDEF rather than lcar/prop\nIf both this and OpenType are set, both formats are generated") },
+ { "AlwaysGenOpenType", pr_bool, &alwaysgenopentype, NULL, NULL, 'O', NULL, 0, N_("Apple and MS/Adobe differ about the format of truetype and opentype files.\nThis controls the default setting of the OpenType checkbox in the\nFile->Generate Font dialog.\nThe main differences are:\n Bitmap data are stored in different tables\n Scaled composite glyphs are treated differently\n Use of GSUB rather than morx(t)/feat\n Use of GPOS rather than kern/opbd\n Use of GDEF rather than lcar/prop\nIf both this and Apple are set, both formats are generated") },
+ { NULL }
+},
+ *prefs_list[] = { general_list, new_list, open_list, navigation_list, sync_list, editing_list, accent_list, args_list, fontinfo_list, generate_list, tt_list, opentype_list, hints_list, hidden_list, NULL },
+ *load_prefs_list[] = { general_list, new_list, open_list, navigation_list, sync_list, editing_list, accent_list, args_list, fontinfo_list, generate_list, tt_list, opentype_list, hints_list, hidden_list, oldnames, NULL };
+
+struct visible_prefs_list { char *tab_name; int nest; struct prefs_list *pl; } visible_prefs_list[] = {
+ { N_("Generic"), 0, general_list},
+ { N_("New Font"), 0, new_list},
+ { N_("Open Font"), 0, open_list},
+ { N_("Navigation"), 0, navigation_list},
+ { N_("Editing"), 0, editing_list},
+ { N_("Synchronize"), 1, sync_list},
+ { N_("TT"), 1, tt_list},
+ { N_("Accents"), 1, accent_list},
+ { N_("Apps"), 1, args_list},
+ { N_("Font Info"), 0, fontinfo_list},
+ { N_("Generate"), 0, generate_list},
+ { N_("PS Hints"), 1, hints_list},
+ { N_("OpenType"), 1, opentype_list},
+ { 0 }
+ };
+
+#define TOPICS (sizeof(visible_prefs_list)/sizeof(visible_prefs_list[0])-1)
+
+static int PrefsUI_GetPrefs(char *name,Val *val) {
+ int i,j;
+
+ /* Support for obsolete preferences */
+ alwaysgenapple=(old_ttf_flags&ttf_flag_applemode)?1:0;
+ alwaysgenopentype=(old_ttf_flags&ttf_flag_otmode)?1:0;
+
+ for ( i=0; prefs_list[i]!=NULL; ++i ) for ( j=0; prefs_list[i][j].name!=NULL; ++j ) {
+ if ( strcmp(prefs_list[i][j].name,name)==0 ) {
+ struct prefs_list *pf = &prefs_list[i][j];
+ if ( pf->type == pr_bool || pf->type == pr_int ) {
+ val->type = v_int;
+ val->u.ival = *((int *) (pf->val));
+ } else if ( pf->type == pr_string || pf->type == pr_file ) {
+ val->type = v_str;
+ val->u.sval = copy( *((char **) (pf->val)));
+ } else if ( pf->type == pr_encoding ) {
+ val->type = v_str;
+ if ( *((NameList **) (pf->val))==NULL )
+ val->u.sval = copy( "NULL" );
+ else
+ val->u.sval = copy( (*((Encoding **) (pf->val)))->enc_name );
+ } else if ( pf->type == pr_namelist ) {
+ val->type = v_str;
+ val->u.sval = copy( (*((NameList **) (pf->val)))->title );
+ } else if ( pf->type == pr_real ) {
+ val->type = v_real;
+ val->u.fval = *((float *) (pf->val));
+ } else
+return( false );
+
+return( true );
+ }
+ }
+return( false );
+}
+
+static void CheckObsoletePrefs(void) {
+ if ( alwaysgenapple==false ) {
+ old_ttf_flags &= ~ttf_flag_applemode;
+ old_otf_flags &= ~ttf_flag_applemode;
+ } else if ( alwaysgenapple==true ) {
+ old_ttf_flags |= ttf_flag_applemode;
+ old_otf_flags |= ttf_flag_applemode;
+ }
+ if ( alwaysgenopentype==false ) {
+ old_ttf_flags &= ~ttf_flag_otmode;
+ old_otf_flags &= ~ttf_flag_otmode;
+ } else if ( alwaysgenopentype==true ) {
+ old_ttf_flags |= ttf_flag_otmode;
+ old_otf_flags |= ttf_flag_otmode;
+ }
+}
+
+static int PrefsUI_SetPrefs(char *name,Val *val1, Val *val2) {
+ int i,j;
+
+ /* Support for obsolete preferences */
+ alwaysgenapple=-1; alwaysgenopentype=-1;
+
+ for ( i=0; prefs_list[i]!=NULL; ++i ) for ( j=0; prefs_list[i][j].name!=NULL; ++j ) {
+ if ( strcmp(prefs_list[i][j].name,name)==0 ) {
+ struct prefs_list *pf = &prefs_list[i][j];
+ if ( pf->type == pr_bool || pf->type == pr_int ) {
+ if ( (val1->type!=v_int && val1->type!=v_unicode) || val2!=NULL )
+return( -1 );
+ *((int *) (pf->val)) = val1->u.ival;
+ } else if ( pf->type == pr_real ) {
+ if ( val1->type==v_real && val2==NULL )
+ *((float *) (pf->val)) = val1->u.fval;
+ else if ( val1->type!=v_int || (val2!=NULL && val2->type!=v_int ))
+return( -1 );
+ else
+ *((float *) (pf->val)) = (val2==NULL ? val1->u.ival : val1->u.ival / (double) val2->u.ival);
+ } else if ( pf->type == pr_string || pf->type == pr_file ) {
+ if ( val1->type!=v_str || val2!=NULL )
+return( -1 );
+ if ( pf->set ) {
+ pf->set( val1->u.sval );
+ } else {
+ free( *((char **) (pf->val)));
+ *((char **) (pf->val)) = copy( val1->u.sval );
+ }
+ } else if ( pf->type == pr_encoding ) {
+ if ( val2!=NULL )
+return( -1 );
+ else if ( val1->type==v_str && pf->val == &default_encoding) {
+ Encoding *enc = FindOrMakeEncoding(val1->u.sval);
+ if ( enc==NULL )
+return( -1 );
+ *((Encoding **) (pf->val)) = enc;
+ } else
+return( -1 );
+ } else if ( pf->type == pr_namelist ) {
+ if ( val2!=NULL )
+return( -1 );
+ else if ( val1->type==v_str ) {
+ NameList *nl = NameListByName(val1->u.sval);
+ if ( strcmp(val1->u.sval,"NULL")==0 && pf->val != &namelist_for_new_fonts )
+ nl = NULL;
+ else if ( nl==NULL )
+return( -1 );
+ *((NameList **) (pf->val)) = nl;
+ } else
+return( -1 );
+ } else
+return( false );
+
+ CheckObsoletePrefs();
+ SavePrefs(true);
+return( true );
+ }
+ }
+return( false );
+}
+
+static char *getPfaEditPrefs(void) {
+ static char *prefs=NULL;
+ char buffer[1025];
+
+ if ( prefs!=NULL )
+return( prefs );
+ if ( getPfaEditDir(buffer)==NULL )
+return( NULL );
+ sprintf(buffer,"%s/prefs", getPfaEditDir(buffer));
+ prefs = copy(buffer);
+return( prefs );
+}
+
+static char *PrefsUI_getFontForgeShareDir(void) {
+
+#if defined(SHAREDIR)
+return( SHAREDIR "/fontforge" );
+#elif defined(PREFIX)
+return( PREFIX "/share/fontforge" );
+#else
+return( "share/fontforge" );
+#endif
+}
+
+# include <charset.h> /* we still need the charsets & encoding to set local_encoding */
+static int encmatch(const char *enc,int subok) {
+ static struct { char *name; int enc; } encs[] = {
+ { "US-ASCII", e_usascii },
+ { "ASCII", e_usascii },
+ { "ISO646-NO", e_iso646_no },
+ { "ISO646-SE", e_iso646_se },
+ { "LATIN1", e_iso8859_1 },
+ { "ISO-8859-1", e_iso8859_1 },
+ { "ISO-8859-2", e_iso8859_2 },
+ { "ISO-8859-3", e_iso8859_3 },
+ { "ISO-8859-4", e_iso8859_4 },
+ { "ISO-8859-5", e_iso8859_4 },
+ { "ISO-8859-6", e_iso8859_4 },
+ { "ISO-8859-7", e_iso8859_4 },
+ { "ISO-8859-8", e_iso8859_4 },
+ { "ISO-8859-9", e_iso8859_4 },
+ { "ISO-8859-10", e_iso8859_10 },
+ { "ISO-8859-11", e_iso8859_11 },
+ { "ISO-8859-13", e_iso8859_13 },
+ { "ISO-8859-14", e_iso8859_14 },
+ { "ISO-8859-15", e_iso8859_15 },
+ { "ISO_8859-1", e_iso8859_1 },
+ { "ISO_8859-2", e_iso8859_2 },
+ { "ISO_8859-3", e_iso8859_3 },
+ { "ISO_8859-4", e_iso8859_4 },
+ { "ISO_8859-5", e_iso8859_4 },
+ { "ISO_8859-6", e_iso8859_4 },
+ { "ISO_8859-7", e_iso8859_4 },
+ { "ISO_8859-8", e_iso8859_4 },
+ { "ISO_8859-9", e_iso8859_4 },
+ { "ISO_8859-10", e_iso8859_10 },
+ { "ISO_8859-11", e_iso8859_11 },
+ { "ISO_8859-13", e_iso8859_13 },
+ { "ISO_8859-14", e_iso8859_14 },
+ { "ISO_8859-15", e_iso8859_15 },
+ { "ISO8859-1", e_iso8859_1 },
+ { "ISO8859-2", e_iso8859_2 },
+ { "ISO8859-3", e_iso8859_3 },
+ { "ISO8859-4", e_iso8859_4 },
+ { "ISO8859-5", e_iso8859_4 },
+ { "ISO8859-6", e_iso8859_4 },
+ { "ISO8859-7", e_iso8859_4 },
+ { "ISO8859-8", e_iso8859_4 },
+ { "ISO8859-9", e_iso8859_4 },
+ { "ISO8859-10", e_iso8859_10 },
+ { "ISO8859-11", e_iso8859_11 },
+ { "ISO8859-13", e_iso8859_13 },
+ { "ISO8859-14", e_iso8859_14 },
+ { "ISO8859-15", e_iso8859_15 },
+ { "ISO88591", e_iso8859_1 },
+ { "ISO88592", e_iso8859_2 },
+ { "ISO88593", e_iso8859_3 },
+ { "ISO88594", e_iso8859_4 },
+ { "ISO88595", e_iso8859_4 },
+ { "ISO88596", e_iso8859_4 },
+ { "ISO88597", e_iso8859_4 },
+ { "ISO88598", e_iso8859_4 },
+ { "ISO88599", e_iso8859_4 },
+ { "ISO885910", e_iso8859_10 },
+ { "ISO885911", e_iso8859_11 },
+ { "ISO885913", e_iso8859_13 },
+ { "ISO885914", e_iso8859_14 },
+ { "ISO885915", e_iso8859_15 },
+ { "8859_1", e_iso8859_1 },
+ { "8859_2", e_iso8859_2 },
+ { "8859_3", e_iso8859_3 },
+ { "8859_4", e_iso8859_4 },
+ { "8859_5", e_iso8859_4 },
+ { "8859_6", e_iso8859_4 },
+ { "8859_7", e_iso8859_4 },
+ { "8859_8", e_iso8859_4 },
+ { "8859_9", e_iso8859_4 },
+ { "8859_10", e_iso8859_10 },
+ { "8859_11", e_iso8859_11 },
+ { "8859_13", e_iso8859_13 },
+ { "8859_14", e_iso8859_14 },
+ { "8859_15", e_iso8859_15 },
+ { "KOI8-R", e_koi8_r },
+ { "KOI8R", e_koi8_r },
+ { "WINDOWS-1252", e_win },
+ { "CP1252", e_win },
+ { "Big5", e_big5 },
+ { "Big-5", e_big5 },
+ { "BigFive", e_big5 },
+ { "Big-Five", e_big5 },
+ { "Big5HKSCS", e_big5hkscs },
+ { "Big5-HKSCS", e_big5hkscs },
+ { "UTF-8", e_utf8 },
+ { "ISO-10646/UTF-8", e_utf8 },
+ { "ISO_10646/UTF-8", e_utf8 },
+ { "UCS2", e_unicode },
+ { "UCS-2", e_unicode },
+ { "UCS-2-INTERNAL", e_unicode },
+ { "ISO-10646", e_unicode },
+ { "ISO_10646", e_unicode },
+#if 0
+ { "eucJP", e_euc },
+ { "EUC-JP", e_euc },
+ { "ujis", ??? },
+ { "EUC-KR", e_euckorean },
+#endif
+ { NULL }};
+ int i;
+ char buffer[80];
+#if HAVE_ICONV_H
+ static char *last_complaint;
+
+ iconv_t test;
+ free(iconv_local_encoding_name);
+ iconv_local_encoding_name= NULL;
+#endif
+
+ if ( strchr(enc,'@')!=NULL && strlen(enc)<sizeof(buffer)-1 ) {
+ strcpy(buffer,enc);
+ *strchr(buffer,'@') = '\0';
+ enc = buffer;
+ }
+
+ for ( i=0; encs[i].name!=NULL; ++i )
+ if ( strmatch(enc,encs[i].name)==0 )
+return( encs[i].enc );
+
+ if ( subok ) {
+ for ( i=0; encs[i].name!=NULL; ++i )
+ if ( strstrmatch(enc,encs[i].name)!=NULL )
+return( encs[i].enc );
+
+#if HAVE_ICONV_H
+ /* I only try to use iconv if the encoding doesn't match one I support*/
+ /* loading iconv unicode data takes a while */
+ test = iconv_open(enc,FindUnicharName());
+ if ( test==(iconv_t) (-1) || test==NULL ) {
+ if ( last_complaint==NULL || strcmp(last_complaint,enc)!=0 ) {
+ fprintf( stderr, "Neither FontForge nor iconv() supports your encoding (%s) we will pretend\n you asked for latin1 instead.\n", enc );
+ free( last_complaint );
+ last_complaint = copy(enc);
+ }
+ } else {
+ if ( last_complaint==NULL || strcmp(last_complaint,enc)!=0 ) {
+ fprintf( stderr, "FontForge does not support your encoding (%s), it will try to use iconv()\n or it will pretend the local encoding is latin1\n", enc );
+ free( last_complaint );
+ last_complaint = copy(enc);
+ }
+ iconv_local_encoding_name= copy(enc);
+ iconv_close(test);
+ }
+#else
+ fprintf( stderr, "FontForge does not support your encoding (%s), it will pretend the local encoding is latin1\n", enc );
+#endif
+
+return( e_iso8859_1 );
+ }
+return( e_unknown );
+}
+
+static int DefaultEncoding(void) {
+ const char *loc;
+ int enc;
+
+#if HAVE_LANGINFO_H
+ loc = nl_langinfo(CODESET);
+ enc = encmatch(loc,false);
+ if ( enc!=e_unknown )
+return( enc );
+#endif
+ loc = getenv("LC_ALL");
+ if ( loc==NULL ) loc = getenv("LC_CTYPE");
+ /*if ( loc==NULL ) loc = getenv("LC_MESSAGES");*/
+ if ( loc==NULL ) loc = getenv("LANG");
+
+ if ( loc==NULL )
+return( e_iso8859_1 );
+
+ enc = encmatch(loc,false);
+ if ( enc==e_unknown ) {
+ loc = strrchr(loc,'.');
+ if ( loc==NULL )
+return( e_iso8859_1 );
+ enc = encmatch(loc+1,true);
+ }
+ if ( enc==e_unknown )
+return( e_iso8859_1 );
+
+return( enc );
+}
+
+static void DefaultXUID(void) {
+ /* Adobe has assigned PfaEdit a base XUID of 1021. Each new user is going */
+ /* to get a couple of random numbers appended to that, hoping that will */
+ /* make for a fairly safe system. */
+ /* FontForge will use the same scheme */
+ int r1, r2;
+ char buffer[50];
+ struct timeval tv;
+
+ gettimeofday(&tv,NULL);
+ srand(tv.tv_usec);
+ do {
+ r1 = rand()&0x3ff;
+ } while ( r1==0 ); /* I reserve "0" for me! */
+ gettimeofday(&tv,NULL);
+ srandom(tv.tv_usec+1);
+ r2 = random();
+ sprintf( buffer, "1021 %d %d", r1, r2 );
+ free(xuid);
+ xuid = copy(buffer);
+}
+
+static void DefaultHelp(void) {
+ if ( helpdir==NULL ) {
+#ifdef DOCDIR
+ helpdir = copy(DOCDIR "/");
+#elif defined(SHAREDIR)
+ helpdir = copy(SHAREDIR "/doc/fontforge/");
+#else
+ helpdir = copy("/usr/local/share/doc/fontforge/");
+#endif
+ }
+}
+
+static void PrefsUI_SetDefaults(void) {
+
+ DefaultXUID();
+ DefaultHelp();
+ local_encoding = DefaultEncoding();
+}
+
+static void ParseMacMapping(char *pt,struct macsettingname *ms) {
+ char *end;
+
+ ms->mac_feature_type = strtol(pt,&end,10);
+ if ( *end==',' ) ++end;
+ ms->mac_feature_setting = strtol(end,&end,10);
+ if ( *end==' ' ) ++end;
+ ms->otf_tag =
+ ((end[0]&0xff)<<24) |
+ ((end[1]&0xff)<<16) |
+ ((end[2]&0xff)<<8) |
+ (end[3]&0xff);
+}
+
+static void ParseNewMacFeature(FILE *p,char *line) {
+ fseek(p,-(strlen(line)-strlen("MacFeat:")),SEEK_CUR);
+ line[strlen("MacFeat:")] ='\0';
+ default_mac_feature_map = SFDParseMacFeatures(p,line);
+ fseek(p,-strlen(line),SEEK_CUR);
+ if ( user_mac_feature_map!=NULL )
+ MacFeatListFree(user_mac_feature_map);
+ user_mac_feature_map = default_mac_feature_map;
+}
+
+static void PrefsUI_LoadPrefs(void) {
+ char *prefs = getPfaEditPrefs();
+ FILE *p;
+ char line[1100];
+ int i, j, ri=0, mn=0, ms=0, fn=0, ff=0, filt_max=0;
+ int msp=0, msc=0;
+ char *pt;
+ struct prefs_list *pl;
+
+#if !defined(NOPLUGIN)
+ LoadPluginDir(NULL);
+#endif
+ LoadPfaEditEncodings();
+ LoadGroupList();
+
+ if ( prefs!=NULL && (p=fopen(prefs,"r"))!=NULL ) {
+ while ( fgets(line,sizeof(line),p)!=NULL ) {
+ if ( *line=='#' )
+ continue;
+ pt = strchr(line,':');
+ if ( pt==NULL )
+ continue;
+ for ( j=0; load_prefs_list[j]!=NULL; ++j ) {
+ for ( i=0; load_prefs_list[j][i].name!=NULL; ++i )
+ if ( strncmp(line,load_prefs_list[j][i].name,pt-line)==0 )
+ break;
+ if ( load_prefs_list[j][i].name!=NULL )
+ break;
+ }
+ pl = NULL;
+ if ( load_prefs_list[j]!=NULL )
+ pl = &load_prefs_list[j][i];
+ for ( ++pt; *pt=='\t'; ++pt );
+ if ( line[strlen(line)-1]=='\n' )
+ line[strlen(line)-1] = '\0';
+ if ( line[strlen(line)-1]=='\r' )
+ line[strlen(line)-1] = '\0';
+ if ( pl==NULL ) {
+ if ( strncmp(line,"Recent:",strlen("Recent:"))==0 && ri<RECENT_MAX )
+ RecentFiles[ri++] = copy(pt);
+ else if ( strncmp(line,"MenuScript:",strlen("MenuScript:"))==0 && ms<SCRIPT_MENU_MAX )
+ script_filenames[ms++] = copy(pt);
+ else if ( strncmp(line,"MenuName:",strlen("MenuName:"))==0 && mn<SCRIPT_MENU_MAX )
+ script_menu_names[mn++] = copy(pt);
+ else if ( strncmp(line,"FontFilterName:",strlen("FontFilterName:"))==0 ) {
+ if ( fn>=filt_max )
+ user_font_filters = grealloc(user_font_filters,((filt_max+=10)+1)*sizeof( struct gwwv_filter));
+ user_font_filters[fn].filtfunc = NULL;
+ user_font_filters[fn].wild = NULL;
+ user_font_filters[fn++].name = copy(pt);
+ user_font_filters[fn].name = NULL;
+ } else if ( strncmp(line,"FontFilter:",strlen("FontFilter:"))==0 ) {
+ if ( ff<filt_max )
+ user_font_filters[ff++].wild = copy(pt);
+ } else if ( strncmp(line,"MacMapCnt:",strlen("MacSetCnt:"))==0 ) {
+ sscanf( pt, "%d", &msc );
+ msp = 0;
+ user_macfeat_otftag = gcalloc(msc+1,sizeof(struct macsettingname));
+ } else if ( strncmp(line,"MacMapping:",strlen("MacMapping:"))==0 && msp<msc ) {
+ ParseMacMapping(pt,&user_macfeat_otftag[msp++]);
+ } else if ( strncmp(line,"MacFeat:",strlen("MacFeat:"))==0 ) {
+ ParseNewMacFeature(p,line);
+ }
+ continue;
+ }
+ switch ( pl->type ) {
+ case pr_encoding:
+ { Encoding *enc = FindOrMakeEncoding(pt);
+ if ( enc==NULL )
+ enc = FindOrMakeEncoding("ISO8859-1");
+ if ( enc==NULL )
+ enc = &custom;
+ *((Encoding **) (pl->val)) = enc;
+ }
+ break;
+ case pr_namelist:
+ { NameList *nl = NameListByName(pt);
+ if ( strcmp(pt,"NULL")==0 && pl->val != &namelist_for_new_fonts )
+ *((NameList **) (pl->val)) = NULL;
+ else if ( nl!=NULL )
+ *((NameList **) (pl->val)) = nl;
+ }
+ break;
+ case pr_bool: case pr_int:
+ sscanf( pt, "%d", (int *) pl->val );
+ break;
+ case pr_real:
+ sscanf( pt, "%f", (float *) pl->val );
+ break;
+ case pr_string: case pr_file:
+ if ( *pt=='\0' ) pt=NULL;
+ if ( pl->val!=NULL )
+ *((char **) (pl->val)) = copy(pt);
+ else
+ (pl->set)(copy(pt));
+ break;
+ }
+ }
+ fclose(p);
+ }
+#if 0
+ if ( xdefs_filename!=NULL )
+ GResourceAddResourceFile(xdefs_filename,GResourceProgramName);
+#endif
+ if ( othersubrsfile!=NULL && ReadOtherSubrsFile(othersubrsfile)<=0 )
+ fprintf( stderr, "Failed to read OtherSubrs from %s\n", othersubrsfile );
+
+ if ( glyph_2_name_map ) {
+ old_ttf_flags |= ttf_flag_glyphmap;
+ old_otf_flags |= ttf_flag_glyphmap;
+ }
+ LoadNamelistDir(NULL);
+}
+
+static void PrefsUI_SavePrefs(int not_if_script) {
+ char *prefs = getPfaEditPrefs();
+ FILE *p;
+ int i, j;
+ char *temp;
+ struct prefs_list *pl;
+ extern int running_script;
+
+ if ( prefs==NULL )
+return;
+ if ( not_if_script && running_script )
+return;
+
+ if ( (p=fopen(prefs,"w"))==NULL )
+return;
+
+ for ( j=0; prefs_list[j]!=NULL; ++j ) for ( i=0; prefs_list[j][i].name!=NULL; ++i ) {
+ pl = &prefs_list[j][i];
+ switch ( pl->type ) {
+ case pr_encoding:
+ fprintf( p, "%s:\t%s\n", pl->name, (*((Encoding **) (pl->val)))->enc_name );
+ break;
+ case pr_namelist:
+ fprintf( p, "%s:\t%s\n", pl->name, *((NameList **) (pl->val))==NULL ? "NULL" :
+ (*((NameList **) (pl->val)))->title );
+ break;
+ case pr_bool: case pr_int:
+ fprintf( p, "%s:\t%d\n", pl->name, *(int *) (pl->val) );
+ break;
+ case pr_real:
+ fprintf( p, "%s:\t%g\n", pl->name, (double) *(float *) (pl->val) );
+ break;
+ case pr_string: case pr_file:
+ if ( (pl->val)!=NULL )
+ temp = *(char **) (pl->val);
+ else
+ temp = (char *) (pl->get());
+ if ( temp!=NULL )
+ fprintf( p, "%s:\t%s\n", pl->name, temp );
+ if ( (pl->val)==NULL )
+ free(temp);
+ break;
+ }
+ }
+
+ for ( i=0; i<RECENT_MAX && RecentFiles[i]!=NULL; ++i )
+ fprintf( p, "Recent:\t%s\n", RecentFiles[i]);
+ for ( i=0; i<SCRIPT_MENU_MAX && script_filenames[i]!=NULL; ++i ) {
+ fprintf( p, "MenuScript:\t%s\n", script_filenames[i]);
+ fprintf( p, "MenuName:\t%s\n", script_menu_names[i]);
+ }
+ if ( user_font_filters!=NULL ) {
+ for ( i=0; user_font_filters[i].name!=NULL; ++i ) {
+ fprintf( p, "FontFilterName:\t%s\n", user_font_filters[i].name);
+ fprintf( p, "FontFilter:\t%s\n", user_font_filters[i].wild);
+ }
+ }
+ if ( user_macfeat_otftag!=NULL && UserSettingsDiffer()) {
+ for ( i=0; user_macfeat_otftag[i].otf_tag!=0; ++i );
+ fprintf( p, "MacMapCnt: %d\n", i );
+ for ( i=0; user_macfeat_otftag[i].otf_tag!=0; ++i ) {
+ fprintf( p, "MacMapping: %d,%d %c%c%c%c\n",
+ user_macfeat_otftag[i].mac_feature_type,
+ user_macfeat_otftag[i].mac_feature_setting,
+ (int) (user_macfeat_otftag[i].otf_tag>>24),
+ (int) ((user_macfeat_otftag[i].otf_tag>>16)&0xff),
+ (int) ((user_macfeat_otftag[i].otf_tag>>8)&0xff),
+ (int) (user_macfeat_otftag[i].otf_tag&0xff) );
+ }
+ }
+
+ if ( UserFeaturesDiffer())
+ SFDDumpMacFeat(p,default_mac_feature_map);
+
+ fclose(p);
+}
+
+void DoPrefs(void) {
+ gwwv_post_notice("NYI","Preference dlg not yet implemented");
+}
+
+void RecentFilesRemember(char *filename) {
+ int i;
+
+ for ( i=0; i<RECENT_MAX && RecentFiles[i]!=NULL; ++i )
+ if ( strcmp(RecentFiles[i],filename)==0 )
+ break;
+
+ if ( i<RECENT_MAX && RecentFiles[i]!=NULL ) {
+ if ( i!=0 ) {
+ filename = RecentFiles[i];
+ RecentFiles[i] = RecentFiles[0];
+ RecentFiles[0] = filename;
+ }
+ } else {
+ if ( RecentFiles[RECENT_MAX-1]!=NULL )
+ free( RecentFiles[RECENT_MAX-1]);
+ for ( i=RECENT_MAX-1; i>0; --i )
+ RecentFiles[i] = RecentFiles[i-1];
+ RecentFiles[0] = copy(filename);
+ }
+ PrefsUI_SavePrefs(true);
+}
+
+struct prefs_interface gtk_prefs_interface = {
+ PrefsUI_SavePrefs,
+ PrefsUI_LoadPrefs,
+ PrefsUI_GetPrefs,
+ PrefsUI_SetPrefs,
+ PrefsUI_getFontForgeShareDir,
+ PrefsUI_SetDefaults
+};
diff --git a/gtkui/stamp.c b/gtkui/stamp.c
new file mode 100644
index 00000000..1ab89a1d
--- /dev/null
+++ b/gtkui/stamp.c
@@ -0,0 +1,5 @@
+#include <time.h>
+
+const time_t source_modtime = 1199059958L;
+const char *source_modtime_str = "00:12 GMT 31-Dec-2007";
+const char *source_version_str = "20071231";
diff --git a/gtkui/startgtk.c b/gtkui/startgtk.c
new file mode 100644
index 00000000..a99dd54f
--- /dev/null
+++ b/gtkui/startgtk.c
@@ -0,0 +1,696 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "fontforgegtk.h"
+#include <fontforge/gfile.h>
+#include <fontforge/libffstamp.h>
+#include <time.h>
+#include <sys/time.h>
+#include <locale.h>
+#include <unistd.h>
+#include <dynamic.h>
+#ifdef __Mac
+# include <stdlib.h> /* getenv,setenv */
+#endif
+
+int splash = 1; /* A preference item too */
+
+static GtkWidget *splashw;
+
+static void _dousage(void) {
+ printf( "fontforge [options] [fontfiles]\n" );
+ printf( "\t-new\t\t\t (creates a new font)\n" );
+ printf( "\t-last\t\t\t (loads the last sfd file closed)\n" );
+#if HANYANG
+ printf( "\t-newkorean\t\t (creates a new korean font)\n" );
+#endif
+ printf( "\t-recover none|auto|clean (control error recovery)\n" );
+ printf( "\t-nosplash\t\t (no splash screen)\n" );
+ printf( "\t-display display-name\t (sets the X display)\n" );
+ printf( "\t-usage\t\t\t (displays this message, and exits)\n" );
+ printf( "\t-help\t\t\t (displays this message, invokes a browser)\n\t\t\t\t (Using the BROWSER environment variable)\n" );
+ printf( "\t-version\t\t (prints the version of fontforge and exits)\n" );
+ printf( "\t-library-status\t (prints information about optional libraries\n\t\t\t\t and exits)\n" );
+ printf( "\t-lang=py\t\t use python for scripts (may precede -script)\n" );
+ printf( "\t-lang=ff\t\t use fontforge's legacy scripting language\n" );
+ printf( "\t-script scriptfile\t (executes scriptfile)\n" );
+ printf( "\t\tmust be the first option (or follow -lang).\n" );
+ printf( "\t\tAll others passed to scriptfile.\n" );
+ printf( "\t-dry scriptfile\t (syntax checks scriptfile)\n" );
+ printf( "\t\tmust be the first option. All others passed to scriptfile.\n" );
+ printf( "\t-c script-string\t (executes argument as scripting cmds)\n" );
+ printf( "\t\tmust be the first option. All others passed to the script.\n" );
+ printf( "\n" );
+ printf( "FontForge will read postscript (pfa, pfb, ps, cid), opentype (otf),\n" );
+ printf( "\ttruetype (ttf,ttc), macintosh resource fonts (dfont,bin,hqx),\n" );
+ printf( "\tand bdf and pcf fonts. It will also read it's own format --\n" );
+ printf( "\tsfd files.\n" );
+ printf( "If no fontfiles are specified (and -new is not either and there's nothing\n" );
+ printf( "\tto recover) then fontforge will produce an open font dlg.\n" );
+ printf( "If a scriptfile is specified then FontForge will not open the X display\n" );
+ printf( "\tnor will it process any additional arguments. It will execute the\n" );
+ printf( "\tscriptfile and give it any remaining arguments\n" );
+ printf( "If the first argument is an executable filename, and that file's first\n" );
+ printf( "\tline contains \"fontforge\" then it will be treated as a scriptfile.\n\n" );
+ printf( "For more information see:\n\thttp://fontforge.sourceforge.net/\n" );
+ printf( "Send bug reports to:\tfontforge-devel@lists.sourceforge.net\n" );
+}
+
+static void dousage(void) {
+ _dousage();
+exit(0);
+}
+
+static void dohelp(void) {
+ _dousage();
+ help("overview.html");
+exit(0);
+}
+
+static struct library_descriptor {
+ char *libname;
+ char *entry_point;
+ char *description;
+ char *url;
+ int usable;
+ struct library_descriptor *depends_on;
+} libs[] = {
+ {
+#ifdef PYTHON_LIB_NAME
+ #PYTHON_LIB_NAME,
+#else
+ "libpython-", /* a bad name */
+#endif
+ dlsymmod("Py_Main"),
+ "This allows users to write python scripts in fontforge",
+ "http://www.python.org/",
+#ifdef _NO_PYTHON
+ 0
+#else
+ 1
+#endif
+ },
+ { "libspiro", dlsymmod("TaggedSpiroCPsToBezier"), "This allows you to edit with Raph Levien's spiros.", "http://libspiro.sf.net/",
+#ifdef _NO_LIBSPIRO
+ 0
+#else
+ 1
+#endif
+ },
+ { "libz", dlsymmod("deflateEnd"), "This is a prerequisite for reading png files,\n\t and is used for some pdf files.", "http://www.gzip.org/zlib/",
+#ifdef _NO_LIBPNG
+ 0
+#else
+ 1
+#endif
+ },
+ { "libpng", dlsymmod("png_create_read_struct"), "This is one way to read png files.", "http://www.libpng.org/pub/png/libpng.html",
+#ifdef _NO_LIBPNG
+ 0,
+#else
+ 1,
+#endif
+ &libs[1] },
+ { "libpng12", dlsymmod("png_create_read_struct"), "This is another way to read png files.", "http://www.libpng.org/pub/png/libpng.html",
+#ifdef _NO_LIBPNG
+ 0,
+#else
+ 1,
+#endif
+ &libs[1] },
+ { "libjpeg", dlsymmod("jpeg_CreateDecompress"), "This allows fontforge to load jpeg images.", "http://www.ijg.org/",
+#ifdef _NO_LIBPNG
+ 0
+#else
+ 1
+#endif
+ },
+ { "libtiff", dlsymmod("TIFFOpen"), "This allows fontforge to open tiff images.", "http://www.libtiff.org/",
+#ifdef _NO_LIBTIFF
+ 0
+#else
+ 1
+#endif
+ },
+ { "libgif", dlsymmod("DGifOpenFileName"), "This allows fontforge to open gif images.", "http://gnuwin32.sf.net/packages/libungif.htm",
+#ifdef _NO_LIBUNGIF
+ 0
+#else
+ 1
+#endif
+ },
+ { "libungif", dlsymmod("DGifOpenFileName"), "This allows fontforge to open gif images.", "http://gnuwin32.sf.net/packages/libungif.htm",
+#ifdef _NO_LIBUNGIF
+ 0
+#else
+ 1
+#endif
+ },
+ { "libxml2", dlsymmod("xmlParseFile"), "This allows fontforge to load svg files and fonts and ufo fonts.", "http://xmlsoft.org/",
+#ifdef _NO_LIBXML
+ 0
+#else
+ 1
+#endif
+ },
+ { "libuninameslist", dlsymmod("UnicodeNameAnnot"), "This provides fontforge with the names of all (named) unicode characters", "http://libuninameslist.sf.net/",
+#ifdef _NO_LIBUNINAMESLIST
+ 0
+#else
+ 1
+#endif
+ },
+ { "libfreetype", dlsymmod("FT_New_Memory_Face"), "This provides a better rasterizer than the one built in to fontforge", "http://freetype.sf.net/",
+#if _NO_FREETYPE || _NO_MMAP
+ 0
+#else
+ 1
+#endif
+ },
+ { NULL }
+};
+
+static void _dolibrary(void) {
+ int i;
+ char buffer[300];
+ int fail, isfreetype, hasdebugger;
+ DL_CONST void *lib_handle;
+
+ fprintf( stderr, "\n" );
+ for ( i=0; libs[i].libname!=NULL; ++i ) {
+ fail = false;
+ if ( libs[i].depends_on!=NULL ) {
+ sprintf( buffer, "%s%s", libs[i].depends_on->libname, SO_EXT );
+ lib_handle = dlopen(buffer,RTLD_LAZY);
+ if ( lib_handle==NULL )
+ fail = 3;
+ else {
+ if ( dlsymbare(lib_handle,libs[i].depends_on->entry_point)==NULL )
+ fail = 4;
+ }
+ }
+ if ( !fail ) {
+ sprintf( buffer, "%s%s", libs[i].libname, SO_EXT );
+ lib_handle = dlopen(buffer,RTLD_LAZY);
+ if ( lib_handle==NULL )
+ fail = true;
+ else {
+ if ( dlsymbare(lib_handle,libs[i].entry_point)==NULL )
+ fail = 2;
+ }
+ }
+ isfreetype = strcmp(libs[i].libname,"libfreetype")==0;
+ hasdebugger = false;
+ if ( !fail && isfreetype && dlsym(lib_handle,"TT_RunIns")!=NULL )
+ hasdebugger = true;
+ fprintf( stderr, "%-15s - %s\n", libs[i].libname,
+ fail==0 ? "is present and appears functional on your system." :
+ fail==1 ? "is not present on your system." :
+ fail==2 ? "is present on your system but is not functional." :
+ fail==3 ? "a prerequisite library is missing." :
+ "a prerequisite library is not functional." );
+ fprintf( stderr, "\t%s\n", libs[i].description );
+ if ( isfreetype ) {
+ if ( hasdebugger )
+ fprintf( stderr, "\tThis version of freetype includes the byte code interpreter\n\t which means you can use fontforge as a truetype debugger.\n" );
+ else
+ fprintf( stderr, "\tThis version of freetype does notinclude the byte code interpreter\n\t which means you cannot use fontforge as a truetype debugger.\n\t If you want the debugger you must download freetype source,\n\t enable the bytecode interpreter, and then build it.\n" );
+ }
+ if ( fail || (isfreetype && !hasdebugger))
+ fprintf( stderr, "\tYou may download %s from %s .\n", libs[i].libname, libs[i].url );
+ if ( !libs[i].usable )
+ fprintf( stderr, "\tUnfortunately this version of fontforge is not configured to use this\n\t library. You must rebuild from source.\n" );
+ }
+}
+
+static void dolibrary(void) {
+ _dolibrary();
+exit(0);
+}
+
+struct delayed_event {
+ void *data;
+ void (*func)(void *);
+};
+
+
+static void splash_window_tooltip_fun( GtkWidget *splashw ) {
+ static char *foolishness[] = {
+/* GT: These strings are for fun. If they are offensive of incomprehensible */
+/* GT: simply translate them as something dull like: "FontForge" */
+/* GT: Someone said this first quote was a political slogan. If anything, it */
+/* GT: is intended as a satire */
+ N_("A free press discriminates\nagainst the illiterate."),
+ N_("A free press discriminates\nagainst the illiterate."),
+/* GT: The following are mostly misquotations of fairly well-known bits of */
+/* GT: English literature. Trying to translate them literally may miss the */
+/* GT: point. Finding something appropriate in the literature of your own */
+/* GT: language and then twisting it might be closer to the original intent. */
+/* GT: Or just translate them all as "FontForge" and don't worry about them. */
+/* GT: Misquotation of an old latin drinking song */
+ N_("Gaudeamus Ligature!"),
+ N_("Gaudeamus Ligature!"),
+/* GT: Misquotation of the Gospel of John */
+ N_("In the beginning was the letter..."),
+/* GT: Misquotation of The Wind in the Willows */
+ N_("There is nothing, absolutely nothing,\n"
+ "half so much worth doing\n"
+ "as simply messing about with fonts"),
+/* GT: The New Hacker's Dictionary attributes this to XEROX PARC */
+/* GT: A misquotation of "Ontogeny recapitulates phylogeny" */
+ N_("fontology recapitulates file-ogeny")
+ };
+ GtkTooltips *tips;
+
+ tips = gtk_tooltips_new();
+ gtk_tooltips_set_tip( tips, splashw, _(foolishness[rand()%(sizeof(foolishness)/sizeof(foolishness[0]))]), NULL );
+}
+
+gboolean SplashDismiss(GtkWidget *widget, GdkEventButton *event,gpointer user_data) {
+ gtk_widget_hide(widget);
+return( true );
+}
+
+static gboolean Splash_Changes(gpointer foo) {
+ static int splash_cnt=0;
+ GtkWidget *splashw = (GtkWidget *) foo;
+ GtkWidget *ffsplash;
+
+ if ( ++splash_cnt>15 ) {
+ gtk_widget_hide(splashw);
+return( false );
+ }
+ /* Slowly reveal more and more of the splash screen */
+ if ( splash_cnt==2 ) {
+ ffsplash = lookup_widget(splashw,"ffsplash2");
+ if ( ffsplash!=NULL )
+ gtk_widget_show(ffsplash);
+ }
+ if ( splash_cnt==6 ) {
+ ffsplash = lookup_widget(splashw,"ffsplash3");
+ if ( ffsplash!=NULL )
+ gtk_widget_show(ffsplash);
+ }
+return( true );
+}
+
+void ShowAboutScreen(void) {
+ GtkWidget *version, *notices;
+ char buffer[200];
+ extern const char *source_modtime_str;
+ extern const char *source_version_str;
+
+ if ( splashw==NULL ) {
+ splashw = create_FontForgeSplash ();
+ splash_window_tooltip_fun( splashw );
+ }
+ notices = lookup_widget(splashw,"Notices");
+ if ( notices!=NULL )
+ gtk_widget_show(notices);
+ version = lookup_widget(splashw,"Version");
+ if ( version!=NULL ) {
+#ifdef FONTFORGE_CONFIG_TYPE3
+ sprintf( buffer, "Version: %s (%s-ML)", source_modtime_str, source_version_str);
+#else
+ sprintf( buffer, "Version: %s (%s)", source_modtime_str, source_version_str);
+#endif
+ gtk_label_set_text(GTK_LABEL( version ),buffer);
+ }
+ version = lookup_widget(splashw,"LibVersion");
+ if ( version!=NULL ) {
+ sprintf( buffer, "Library Version: %s", library_version_configuration.library_source_modtime_string);
+ gtk_label_set_text(GTK_LABEL( version ),buffer);
+ }
+ gtk_widget_show (splashw);
+}
+
+static int DoDelayedEvents(gpointer data) {
+ struct delayed_event *info = (struct delayed_event *) data;
+
+ if ( info!=NULL ) {
+ (info->func)(info->data);
+ chunkfree(info,sizeof(struct delayed_event));
+ }
+return( FALSE ); /* cancel timer */
+}
+
+void DelayEvent(void (*func)(void *), void *data) {
+ struct delayed_event *info = chunkalloc(sizeof(struct delayed_event));
+
+ info->data = data;
+ info->func = func;
+
+ gtk_timeout_add(100,DoDelayedEvents,info);
+}
+
+static int __DoAutoSaves( gpointer ignored ) {
+ DoAutoSaves();
+return( TRUE ); /* Continue timer */
+}
+
+struct argcontext {
+ int argc;
+ char **argv;
+ int recover;
+};
+
+static int ParseArgs( gpointer data ) {
+ struct argcontext *args = data;
+ int argc = args->argc;
+ char **argv = args->argv;
+ int recover = args->recover;
+ int any, i;
+ int next_recent = 0;
+
+ /* Wait until the UI has started, otherwise people who don't have consoles*/
+ /* open won't get our error messages, and it's an important one */
+ /* Scripting doesn't care about a mismatch, because scripting interpretation */
+ /* all lives in the library, so it doesn't need this check. */
+ check_library_version(&exe_library_version_configuration,true,false);
+
+ any = 0;
+ if ( recover==-1 )
+ CleanAutoRecovery();
+ else if ( recover )
+ any = DoAutoRecovery(recover-1);
+
+ for ( i=1; i<argc; ++i ) {
+ char buffer[1025];
+ char *pt = argv[i];
+
+ if ( pt[0]=='-' && pt[1]=='-' )
+ ++pt;
+ if ( strcmp(pt,"-new")==0 ) {
+ FontNew();
+ any = 1;
+#if HANYANG
+ } else if ( strcmp(pt,"-newkorean")==0 ) {
+ MenuNewComposition(NULL,NULL,NULL);
+ any = 1;
+#endif
+ } else if ( strcmp(pt,"-last")==0 ) {
+ if ( next_recent<RECENT_MAX && RecentFiles[next_recent]!=NULL )
+ if ( ViewPostscriptFont(RecentFiles[next_recent++]))
+ any = 1;
+ } else if ( strcmp(pt,"-nosplash")==0 || strcmp(pt,"-recover=none")==0 ||
+ strcmp(pt,"-recover=clean")==0 || strcmp(pt,"-recover=auto")==0 ||
+ strcmp(pt,"-recover=inquire")==0 )
+ /* Already done, needed to be before display opened */;
+ else if ( strcmp(pt,"-recover")==0 && i<argc-1 )
+ ++i; /* As above, this is already done, but this one takes an */
+ /* argument, so skip that too */
+ else {
+ GFileGetAbsoluteName(argv[i],buffer,sizeof(buffer));
+ if ( GFileIsDir(buffer)) {
+ char *fname;
+ fname = galloc(strlen(buffer)+strlen("glyphs/contents.plist")+1);
+ strcpy(fname,buffer); strcat(fname,"glyphs/contents.plist");
+ if ( GFileExists(fname)) {
+ /* It's probably a Unified Font Object directory */
+ free(fname);
+ if ( ViewPostscriptFont(buffer) )
+ any = 1;
+ } else {
+ strcpy(fname,buffer); strcat(fname,"/font.props");
+ if ( GFileExists(fname)) {
+ /* It's probably a sf dir collection */
+ free(fname);
+ if ( ViewPostscriptFont(buffer) )
+ any = 1;
+ } else {
+ free(fname);
+ if ( buffer[strlen(buffer)-1]!='/' ) {
+ /* If dirname doesn't end in "/" we'll be looking in parent dir */
+ buffer[strlen(buffer)+1]='\0';
+ buffer[strlen(buffer)] = '/';
+ }
+ fname = GetPostscriptFontName(buffer,false);
+ if ( fname!=NULL )
+ ViewPostscriptFont(fname);
+ any = 1; /* Even if we didn't get a font, don't bring up dlg again */
+ free(fname);
+ }
+ }
+ } else if ( ViewPostscriptFont(buffer)!=0 )
+ any = 1;
+ }
+ }
+ if ( !any )
+ Menu_Open(NULL,NULL);
+ if ( fv_list==NULL ) /* Didn't open anything? */
+exit(0);
+
+return( FALSE ); /* Cancel timer */
+}
+
+#if defined(__Mac)
+static int uses_local_x(int argc,char **argv) {
+ int i;
+ char *arg;
+
+ for ( i=1; i<argc; ++i ) {
+ arg = argv[i];
+ if ( *arg=='-' ) {
+ if ( arg[0]=='-' && arg[1]=='-' )
+ ++arg;
+ if ( strcmp(arg,"-display")==0 )
+return( false ); /* we use a different display */
+ if ( strcmp(arg,"-c")==0 )
+return( false ); /* we use a script string, no x display at all */
+ if ( strcmp(arg,"-script")==0 )
+return( false ); /* we use a script, no x display at all */
+ if ( strcmp(arg,"-")==0 )
+return( false ); /* script on stdin */
+ } else {
+ /* Is this argument a script file ? */
+ FILE *temp = fopen(argv[i],"r");
+ char buffer[200];
+ if ( temp==NULL )
+return( true ); /* not a script file, so need local local X */
+ buffer[0] = '\0';
+ fgets(buffer,sizeof(buffer),temp);
+ fclose(temp);
+ if ( buffer[0]=='#' && buffer[1]=='!' &&
+ (strstr(buffer,"pfaedit")!=NULL || strstr(buffer,"fontforge")!=NULL )) {
+return( false ); /* is a script file, so no need for X */
+
+return( true ); /* not a script, so needs X */
+ }
+ }
+ }
+return( true );
+}
+#endif
+
+static char *getLocaleDir(void) {
+
+#ifdef PREFIX
+return( PREFIX "/share/locale" );
+#else
+return( "share/locale" );
+#endif
+}
+
+int main( int argc, char **argv ) {
+ extern const char *source_modtime_str, *source_version_str;
+ const char *load_prefs = getenv("FONTFORGE_LOADPREFS");
+ int i;
+ extern int splash;
+ int recover=1;
+ GtkWidget *notices, *ffsplash;
+ gchar *home_dir, *rc_path;
+ struct argcontext args;
+
+#ifdef FONTFORGE_CONFIG_TYPE3
+ fprintf( stderr, "Copyright (c) 2000-2007 by George Williams.\n Executable based on sources from %s-ML.\n",
+ source_modtime_str );
+#else
+ fprintf( stderr, "Copyright (c) 2000-2007 by George Williams.\n Executable based on sources from %s.\n",
+ source_modtime_str );
+#endif
+ fprintf( stderr, " Library based on sources from %s.\n", library_version_configuration.library_source_modtime_string );
+
+ gtk_set_locale ();
+
+ home_dir = (gchar*) g_get_home_dir();
+ rc_path = g_strdup_printf("%s/.fontforgerc", home_dir);
+ gtk_rc_add_default_file(rc_path);
+ g_free(rc_path);
+
+ gtk_init (&argc, &argv);
+
+#if defined(SHAREDIR)
+ add_pixmap_directory( SHAREDIR "/fontforge" "/pixmaps");
+#elif defined(PREFIX)
+ add_pixmap_directory( PREFIX "/share/fontforge/pixmaps" );
+#else
+ add_pixmap_directory( "./pixmaps" );
+#endif
+
+ bind_textdomain_codeset("FontForge","UTF-8");
+ bindtextdomain("FontForge", getLocaleDir());
+ textdomain("FontForge");
+
+#if defined(__Mac)
+ /* Start X if they haven't already done so. Well... try anyway */
+ /* Must be before we change DYLD_LIBRARY_PATH or X won't start */
+ if ( uses_local_x(argc,argv) && getenv("DISPLAY")==NULL ) {
+ system( "open /Applications/Utilities/X11.app/" );
+ setenv("DISPLAY",":0.0",0);
+ }
+#endif
+
+ FF_SetUiInterface(&gtk_ui_interface);
+ FF_SetPrefsInterface(&gtk_prefs_interface);
+ /*FF_SetSCInterface(&gtk_sc_interface);*/
+ /*FF_SetCVInterface(&gtk_cv_interface);*/
+ /*FF_SetBCInterface(&gtk_bc_interface);*/
+ FF_SetFVInterface(&gtk_fv_interface);
+ /*FF_SetFIInterface(&gtk_fi_interface);*/
+ /*FF_SetMVInterface(&gtk_mv_interface);*/
+ /*FF_SetClipInterface(&gtk_clip_interface);*/
+#ifndef _NO_PYTHON
+ PythonUI_Init();
+#endif
+
+ InitSimpleStuff();
+ if ( load_prefs!=NULL && strcasecmp(load_prefs,"Always")==0 )
+ LoadPrefs();
+ if ( default_encoding==NULL )
+ default_encoding=FindOrMakeEncoding("ISO8859-1");
+ if ( default_encoding==NULL )
+ default_encoding=&custom; /* In case iconv is broken */
+ CheckIsScript(argc,argv); /* Will run the script and exit if it is a script */
+ /* If there is no UI, there is always a script */
+ /* and we will never return from the above */
+ if ( load_prefs==NULL ||
+ (strcasecmp(load_prefs,"Always")!=0 && /* Already loaded */
+ strcasecmp(load_prefs,"Never")!=0 ))
+ LoadPrefs();
+ for ( i=1; i<argc; ++i ) {
+ char *pt = argv[i];
+ if ( pt[0]=='-' && pt[1]=='-' )
+ ++pt;
+
+ if ( strcmp(pt,"-nosplash")==0 )
+ splash = 0;
+ else if ( strcmp(pt,"-recover")==0 && i<argc-1 ) {
+ ++i;
+ if ( strcmp(argv[i],"none")==0 )
+ recover=0;
+ else if ( strcmp(argv[i],"clean")==0 )
+ recover= -1;
+ else if ( strcmp(argv[i],"auto")==0 )
+ recover= 1;
+ else if ( strcmp(argv[i],"inquire")==0 )
+ recover= 2;
+ else {
+ fprintf( stderr, "Invalid argument to -recover, must be none, auto, inquire or clean\n" );
+ dousage();
+ }
+ } else if ( strcmp(pt,"-recover=none")==0 ) {
+ recover = 0;
+ } else if ( strcmp(pt,"-recover=clean")==0 ) {
+ recover = -1;
+ } else if ( strcmp(pt,"-recover=auto")==0 ) {
+ recover = 1;
+ } else if ( strcmp(pt,"-recover=inquire")==0 ) {
+ recover = 2;
+ } else if ( strcmp(pt,"-help")==0 )
+ dohelp();
+ else if ( strcmp(pt,"-usage")==0 )
+ dousage();
+ else if ( strcmp(pt,"-version")==0 )
+ doversion(source_version_str);
+ else if ( strcmp(pt,"-library-status")==0 )
+ dolibrary();
+ }
+
+ InitCursors();
+#ifndef _NO_PYTHON
+ PyFF_ProcessInitFiles();
+#endif
+
+ if ( splash ) {
+ splashw = create_FontForgeSplash ();
+ splash_window_tooltip_fun( splashw );
+ notices = lookup_widget(splashw,"Notices");
+ if ( notices!=NULL )
+ gtk_widget_hide(notices);
+ ffsplash = lookup_widget(splashw,"ffsplash2");
+ if ( ffsplash!=NULL )
+ gtk_widget_hide(ffsplash);
+ ffsplash = lookup_widget(splashw,"ffsplash3");
+ if ( ffsplash!=NULL )
+ gtk_widget_hide(ffsplash);
+ gtk_window_set_position(GTK_WINDOW(splashw),GTK_WIN_POS_CENTER_ALWAYS);
+ gtk_widget_show (splashw);
+ ff_progress_allow_events();
+ gtk_timeout_add(1000,Splash_Changes,splashw);
+ }
+
+ gtk_timeout_add(30*1000,__DoAutoSaves,NULL); /* Check for autosave every 30 seconds */
+
+ args.argc = argc; args.argv = argv; args.recover = recover;
+ gtk_timeout_add(100,ParseArgs,&args);
+ /* Parse arguments within the main loop */
+
+ gtk_main ();
+return( 0 );
+}
+
+struct library_version_configuration exe_library_version_configuration = {
+ 1 /* REPLACE_ME_WITH_MAJOR_VERSION*/,
+ 0 /* REPLACE_ME_WITH_MINOR_VERSION*/,
+ LibFF_ModTime,
+ LibFF_ModTime_Str,
+ LibFF_VersionDate,
+ sizeof(struct library_version_configuration),
+ sizeof(struct splinefont),
+ sizeof(struct splinechar),
+ sizeof(struct fontviewbase),
+ sizeof(struct charviewbase),
+ sizeof(struct cvcontainer),
+
+#ifdef FONTFORGE_CONFIG_DEVICETABLES
+ 1,
+#else
+ 0,
+#endif
+
+#ifdef FONTFORGE_CONFIG_TYPE3
+ 1,
+#else
+ 0,
+#endif
+
+#ifdef _NO_PYTHON
+ 0,
+#else
+ 1,
+#endif
+ 0xff /* Not currently defined */
+};
diff --git a/gtkui/stubs.c b/gtkui/stubs.c
new file mode 100644
index 00000000..b08e2766
--- /dev/null
+++ b/gtkui/stubs.c
@@ -0,0 +1,316 @@
+#include "gwwv.h"
+
+void SFGenerateFont(void) {
+ gwwv_post_notice("NYI","Generate not yet implemented");
+}
+
+void FVImport(void) {
+ gwwv_post_notice("NYI","Import not yet implemented");
+}
+
+void CharViewCreate(void) {
+ gwwv_post_notice("NYI","Outline glyph editor not yet implemented");
+}
+
+void BitmapViewCreatePick(void) {
+ gwwv_post_notice("NYI","Bitmap glyph editor not yet implemented");
+}
+
+void MetricsViewCreate(void) {
+ gwwv_post_notice("NYI","Metrics View not yet implemented");
+}
+
+void PrintDlg(void) {
+ gwwv_post_notice("NYI","Print not yet implemented");
+}
+
+void OutlineDlg(void) {
+ gwwv_post_notice("NYI","OutlineDlg not yet implemented");
+}
+
+void ShadowDlg(void) {
+ gwwv_post_notice("NYI","ShadowDlg not yet implemented");
+}
+
+void SimplifyDlg(void) {
+ gwwv_post_notice("NYI","SimplifyDlg not yet implemented");
+}
+
+void BitmapViewCreate(void) {
+ gwwv_post_notice("NYI","BitmapViewCreate not yet implemented");
+}
+
+void ScriptDlg(void) {
+ gwwv_post_notice("NYI","Script dialog not yet implemented");
+}
+
+void FontMenuFontInfo(void) {
+ gwwv_post_notice("NYI","Font Info dialog not yet implemented");
+}
+
+void SFMathDlg(void) {
+ gwwv_post_notice("NYI","Math Info dialog not yet implemented");
+}
+
+void FindProblems(void) {
+ gwwv_post_notice("NYI","Find Problems dialog not yet implemented");
+}
+
+void SFValidationWindow(void) {
+ gwwv_post_notice("NYI","Validation dialog not yet implemented");
+}
+
+void EmboldenDlg(void) {
+ gwwv_post_notice("NYI","Embolden dialog not yet implemented");
+}
+
+void ObliqueDlg(void) {
+ gwwv_post_notice("NYI","Oblique dialog not yet implemented");
+}
+
+void CondenseExtendDlg(void) {
+ gwwv_post_notice("NYI","Condense/extend dialog not yet implemented");
+}
+
+void FVSelectByPST(void) {
+ gwwv_post_notice("NYI","Select by lookup subtable dialog not yet implemented");
+}
+
+void SVCreate(void) {
+ gwwv_post_notice("NYI","Find/Replace dialog not yet implemented");
+}
+
+void SCCharInfo(void) {
+ gwwv_post_notice("NYI","Glyph Info dialog not yet implemented");
+}
+
+void SFBdfProperties(void) {
+ gwwv_post_notice("NYI","BDF Props dialog not yet implemented");
+}
+
+void FVMassGlyphRename(void) {
+ gwwv_post_notice("NYI","Mass rename not yet implemented");
+}
+
+void SCRefBy(void) {
+ gwwv_post_notice("NYI","SCRefBy dialog not yet implemented");
+}
+
+void SCSubBy(void) {
+ gwwv_post_notice("NYI","SCSubBy dialog not yet implemented");
+}
+
+void TransformDlgCreate(void) {
+ gwwv_post_notice("NYI","Transform dialog not yet implemented");
+}
+
+void PointOfViewDlg(void) {
+ gwwv_post_notice("NYI","PointOfViewDlg not yet implemented");
+}
+
+void NonLinearDlg(void) {
+ gwwv_post_notice("NYI","NonLinearDlg not yet implemented");
+}
+
+void BitmapDlg(void) {
+ gwwv_post_notice("NYI","BitmapDlgg not yet implemented");
+}
+
+void FVStroke(void) {
+ gwwv_post_notice("NYI","FVStroke dialog not yet implemented");
+}
+
+void FVTile(void) {
+ gwwv_post_notice("NYI","FVTile dialog not yet implemented");
+}
+
+void FontCompareDlg(void) {
+ gwwv_post_notice("NYI","FontCompareDlg not yet implemented");
+}
+
+void FVMergeFonts(void) {
+ gwwv_post_notice("NYI","FVMergeFonts not yet implemented");
+}
+
+void FVInterpolateFonts(void) {
+ gwwv_post_notice("NYI","FVInterpolateFonts not yet implemented");
+}
+
+void GotoChar(void) {
+ gwwv_post_notice("NYI","GotoChar not yet implemented");
+}
+
+void SFShowLigatures(void) {
+ gwwv_post_notice("NYI","SFShowLigatures not yet implemented");
+}
+
+void SFShowKernPairs(void) {
+ gwwv_post_notice("NYI","SFShowKernPairs not yet implemented");
+}
+
+void ShowAtt(void) {
+ gwwv_post_notice("NYI","ShowAtt not yet implemented");
+}
+
+void SFNewLookupSubtableOfType(void) {
+ gwwv_post_notice("NYI","SFNewLookupSubtableOfType not yet implemented");
+}
+
+void FVSetWidth(void) {
+ gwwv_post_notice("NYI","FVSetWidth not yet implemented");
+}
+
+void FVAutoWidth(void) {
+ gwwv_post_notice("NYI","FVAutoWidth not yet implemented");
+}
+
+void FVAutoKern(void) {
+ gwwv_post_notice("NYI","FVAutoKern not yet implemented");
+}
+
+void ShowKernClasses(void) {
+ gwwv_post_notice("NYI","ShowKernClasses not yet implemented");
+}
+
+void KernPairD(void) {
+ gwwv_post_notice("NYI","KernPairD not yet implemented");
+}
+
+void SCEditInstructions(void) {
+ gwwv_post_notice("NYI","SCEditInstructions not yet implemented");
+}
+
+void SFEditTable(void) {
+ gwwv_post_notice("NYI","SFEditTable not yet implemented");
+}
+
+void SFHistogram(void) {
+ gwwv_post_notice("NYI","SFHistogram not yet implemented");
+}
+
+void AskUserForCIDMap(void) {
+ gwwv_post_notice("NYI","AskUserForCIDMap not yet implemented");
+}
+
+void FontInfo(void) {
+ gwwv_post_notice("NYI","FontInfo not yet implemented");
+}
+
+void DisplayGroups(void) {
+ gwwv_post_notice("NYI","DisplayGroups not yet implemented");
+}
+
+void DefineGroups(void) {
+ gwwv_post_notice("NYI","DefineGroups not yet implemented");
+}
+
+void MMWizard(void) {
+ gwwv_post_notice("NYI","MMWizard not yet implemented");
+}
+
+void MMChangeBlend(void) {
+ gwwv_post_notice("NYI","MMChangeBlend not yet implemented");
+}
+
+void LoadEncodingFile(void) {
+ gwwv_post_notice("NYI","LoadEncodingFile not yet implemented");
+}
+
+void MakeEncoding(void) {
+ gwwv_post_notice("NYI","MakeEncoding not yet implemented");
+}
+
+void RemoveEncoding(void) {
+ gwwv_post_notice("NYI","RemoveEncoding not yet implemented");
+}
+
+void SCUsedBySubs(void) {
+ gwwv_post_notice("NYI","SCUsedBySubs not yet implemented");
+}
+
+void MVRefreshChar(void) {
+ gwwv_post_notice("NYI","MVRefreshChar not yet implemented");
+}
+
+void MVRegenChar(void) {
+ gwwv_post_notice("NYI","MVRegenChar not yet implemented");
+}
+
+void BVChangeBC(void) {
+ gwwv_post_notice("NYI","BVChangeBC not yet implemented");
+}
+
+void SF_CloseAllInstrs(void) {
+}
+
+
+void PrintWindowClose(void) {
+}
+
+void CharInfoDestroy(void) {
+}
+
+void SVAttachFV(void) {
+}
+
+void FontInfoDestroy(void) {
+}
+
+void ValidationDestroy(void) {
+}
+
+void SVDetachFV(void) {
+}
+
+void GetEncodingMenu(void) {
+}
+
+void KCLD_End(void) {
+}
+
+void CVChangeSC(void) {
+}
+
+void SFFindNearTop(void) {
+}
+
+void SFRestoreNearTop(void) {
+}
+
+int ItalicConstrained;
+float arrowAmount, arrowAccelFactor, snapdistance;
+int stop_at_join, updateflex;
+int clear_tt_instructions_when_needed;
+int ask_user_for_resolution;
+int cvvisible, bvvisible;
+int oldsystem, old_validate;
+char *oflib_username, *oflib_password;
+int regular_star, polystar, rectelipse, center_out, ps_pointcnt, rr_radius, star_percent, debug_wins, gridfit_dpi, gridfit_depth;
+int gridfit_pointsize;
+int default_font_filter_index;
+int cv_auto_goto;
+int palettes_docked;
+int infowindowdistance;
+char *user_font_filters;
+
+
+struct cvshows {
+ int showfore, showback, showgrids, showhhints, showvhints, showdhints;
+ int showpoints, showfilled;
+ int showrulers;
+ int showrounds; /* 0=>no, 1=>auto, 2=>always */
+ int showmdx, showmdy; /* minimum distances x,y */
+ int showhmetrics, showvmetrics; /* show advance width, baseline, etc. */
+ int markextrema;
+ int markpoi; /* Points of inflection */
+ int showblues, showfamilyblues;
+ int showanchor;
+ int showcpinfo;
+ int showtabs; /* with the names of former glyphs */
+ int showsidebearings;
+} CVShows;
+
+struct bvshows {
+ int showfore, showoutline, showgrid;
+ int lastpixelsize;
+} BVShows;
diff --git a/gtkui/support.c b/gtkui/support.c
new file mode 100644
index 00000000..c617b550
--- /dev/null
+++ b/gtkui/support.c
@@ -0,0 +1,172 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+/* Bleah. I'll modify it if I want to */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+
+#include "support.h"
+#include <libintl.h>
+#define _(str) gettext(str)
+
+GtkWidget*
+lookup_widget (GtkWidget *widget,
+ const gchar *widget_name)
+{
+ GtkWidget *parent, *found_widget;
+
+ for (;;)
+ {
+ if (GTK_IS_MENU (widget))
+ parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+ else
+ parent = widget->parent;
+ if (!parent)
+ parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+ if (parent == NULL)
+ break;
+ widget = parent;
+ }
+
+ found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
+ widget_name);
+ if (!found_widget)
+ g_warning ("Widget not found: %s", widget_name);
+ return found_widget;
+}
+
+void *
+lookup_ffdata (GtkWidget *widget)
+{
+ GtkWidget *parent;
+ void *ffdata;
+
+ for (;;)
+ {
+ if (GTK_IS_MENU (widget)) {
+ ffdata = g_object_get_data( G_OBJECT(widget),"ffdata");
+ if ( ffdata!=NULL )
+return( ffdata );
+ parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+ } else
+ parent = widget->parent;
+ if (!parent)
+ parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+ if (parent == NULL)
+ break;
+ widget = parent;
+ }
+
+return( (void *) g_object_get_data (G_OBJECT (widget), "ffdata") );
+}
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory (const gchar *directory)
+{
+ pixmaps_directories = g_list_prepend (pixmaps_directories,
+ g_strdup (directory));
+}
+
+/* This is an internally used function to find pixmap files. */
+static gchar*
+find_pixmap_file (const gchar *filename)
+{
+ GList *elem;
+
+ /* We step through each of the pixmaps directory to find it. */
+ elem = pixmaps_directories;
+ while (elem)
+ {
+ gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+ G_DIR_SEPARATOR_S, filename);
+ if (g_file_test (pathname, G_FILE_TEST_EXISTS))
+ return pathname;
+ g_free (pathname);
+ elem = elem->next;
+ }
+ return NULL;
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap (GtkWidget *widget,
+ const gchar *filename)
+{
+ gchar *pathname = NULL;
+ GtkWidget *pixmap;
+
+ if (!filename || !filename[0])
+ return gtk_image_new ();
+
+ pathname = find_pixmap_file (filename);
+
+ if (!pathname)
+ {
+ g_warning (_("Couldn't find pixmap file: %s"), filename);
+ return gtk_image_new ();
+ }
+
+ pixmap = gtk_image_new_from_file (pathname);
+ g_free (pathname);
+ return pixmap;
+}
+
+/* This is an internally used function to create pixmaps. */
+GdkPixbuf*
+create_pixbuf (const gchar *filename)
+{
+ gchar *pathname = NULL;
+ GdkPixbuf *pixbuf;
+ GError *error = NULL;
+
+ if (!filename || !filename[0])
+ return NULL;
+
+ pathname = find_pixmap_file (filename);
+
+ if (!pathname)
+ {
+ g_warning (_("Couldn't find pixmap file: %s"), filename);
+ return NULL;
+ }
+
+ pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
+ if (!pixbuf)
+ {
+ fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+ pathname, error->message);
+ g_error_free (error);
+ }
+ g_free (pathname);
+ return pixbuf;
+}
+
+/* This is used to set ATK action descriptions. */
+void
+glade_set_atk_action_description (AtkAction *action,
+ const gchar *action_name,
+ const gchar *description)
+{
+ gint n_actions, i;
+
+ n_actions = atk_action_get_n_actions (action);
+ for (i = 0; i < n_actions; i++)
+ {
+ if (!strcmp (atk_action_get_name (action, i), action_name))
+ atk_action_set_description (action, i, description);
+ }
+}
+
diff --git a/gtkui/support.h b/gtkui/support.h
new file mode 100644
index 00000000..3e5a62b0
--- /dev/null
+++ b/gtkui/support.h
@@ -0,0 +1,47 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+/* I can if I want to */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+
+/*
+ * Public Functions.
+ */
+
+/*
+ * This function returns a widget in a component created by Glade.
+ * Call it with the toplevel widget in the component (i.e. a window/dialog),
+ * or alternatively any widget in the component, and the name of the widget
+ * you want returned.
+ */
+GtkWidget* lookup_widget (GtkWidget *widget,
+ const gchar *widget_name);
+void* lookup_ffdata (GtkWidget *widget);
+
+
+/* Use this function to set the directory containing installed pixmaps. */
+void add_pixmap_directory (const gchar *directory);
+
+
+/*
+ * Private Functions.
+ */
+
+/* This is used to create the pixmaps used in the interface. */
+GtkWidget* create_pixmap (GtkWidget *widget,
+ const gchar *filename);
+
+/* This is used to create the pixbufs used in the interface. */
+GdkPixbuf* create_pixbuf (const gchar *filename);
+
+/* This is used to set ATK action descriptions. */
+void glade_set_atk_action_description (AtkAction *action,
+ const gchar *action_name,
+ const gchar *description);
+
diff --git a/gtkui/uiutil.c b/gtkui/uiutil.c
new file mode 100644
index 00000000..3674be1c
--- /dev/null
+++ b/gtkui/uiutil.c
@@ -0,0 +1,637 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "fontforgegtk.h"
+#include <fontforge/gfile.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <fontforge/utype.h>
+#include <fontforge/ustring.h>
+
+#if __CygWin
+#include <unistd.h>
+extern void cygwin_conv_to_full_posix_path(const char *win,char *unx);
+extern void cygwin_conv_to_full_win32_path(const char *unx,char *win);
+#endif
+
+char *helpdir = NULL;
+
+#if __CygWin
+/* Try to find the default browser by looking it up in the windows registry */
+/* The registry is organized as a tree. We are interested in the subtree */
+/* starting at HKEY_CLASSES_ROOT. This contains two different kinds of things*/
+/* Extensions and Programs. First we look up the extension and it refers us */
+/* to a program. So we look up the program, and look up shell->open->command */
+/* in it. The value of command is a path followed by potential arguments */
+/* viz: c:\program files\foobar "%1" */
+
+/* Extensions seem to contain the ".", so ".html" not "html" */
+
+#include <w32api/wtypes.h>
+#include <w32api/winbase.h>
+#include <w32api/winreg.h>
+
+static char *win_program_from_extension(char *exten) {
+ DWORD type, dlen, err;
+ char programindicator[1000];
+ char programpath[1000];
+ HKEY hkey_prog, hkey_shell, hkey_open, hkey_exten, hkey_command;
+ char *pt;
+
+ if ( RegOpenKeyEx(HKEY_CLASSES_ROOT,exten,0,KEY_READ,&hkey_exten)!=ERROR_SUCCESS ) {
+ /*fprintf( stderr, "Failed to find extension \"%s\", did it have a period?\n", exten );*/
+return( NULL );
+ }
+ dlen = sizeof(programindicator);
+ if ( (err=RegQueryValueEx(hkey_exten,"",NULL,&type,(uint8 *)programindicator,&dlen))!=ERROR_SUCCESS ) {
+ LogError( _("Failed to default value of exten \"%s\".\n Error=%ld"), exten, err );
+ RegCloseKey(hkey_exten);
+return( NULL );
+ }
+ RegCloseKey(hkey_exten);
+
+ if ( RegOpenKeyEx(HKEY_CLASSES_ROOT,programindicator,0,KEY_READ,&hkey_prog)!=ERROR_SUCCESS ) {
+ LogError( _("Failed to find program \"%s\"\n"), programindicator );
+return( NULL );
+ }
+ if ( RegOpenKeyEx(hkey_prog,"shell",0,KEY_READ,&hkey_shell)!=ERROR_SUCCESS ) {
+ LogError( _("Failed to find \"%s->shell\"\n"), programindicator );
+ RegCloseKey(hkey_prog);
+return( NULL );
+ }
+ if ( RegOpenKeyEx(hkey_shell,"open",0,KEY_READ,&hkey_open)!=ERROR_SUCCESS ) {
+ LogError( _("Failed to find \"%s->shell->open\"\n"), programindicator );
+ RegCloseKey(hkey_prog); RegCloseKey(hkey_shell);
+return( NULL );
+ }
+ if ( RegOpenKeyEx(hkey_open,"command",0,KEY_READ,&hkey_command)!=ERROR_SUCCESS ) {
+ LogError( _("Failed to find \"%s->shell->open\"\n"), programindicator );
+ RegCloseKey(hkey_prog); RegCloseKey(hkey_shell); RegCloseKey(hkey_command);
+return( NULL );
+ }
+
+ dlen = sizeof(programpath);
+ if ( RegQueryValueEx(hkey_command,"",NULL,&type,(uint8 *)programpath,&dlen)!=ERROR_SUCCESS ) {
+ LogError( _("Failed to find default for \"%s->shell->open->command\"\n"), programindicator );
+ RegCloseKey(hkey_prog); RegCloseKey(hkey_shell); RegCloseKey(hkey_open); RegCloseKey(hkey_command);
+return( NULL );
+ }
+
+ RegCloseKey(hkey_prog); RegCloseKey(hkey_shell); RegCloseKey(hkey_open); RegCloseKey(hkey_command);
+
+ pt = strstr(programpath,"%1");
+ if ( pt!=NULL )
+ pt[1] = 's';
+return( copy(programpath));
+}
+
+static void do_windows_browser(char *fullspec) {
+ char *format, *start, *pt, ch, *temp, *cmd;
+
+ format = win_program_from_extension(".html");
+ if ( format==NULL )
+ format = win_program_from_extension(".htm");
+ if ( format==NULL ) {
+ gwwv_post_error(_("No Browser"),_("Could not find a browser. Set the BROWSER environment variable to point to one"));
+return;
+ }
+
+ if ( format[0]=='"' || format[0]=='\'' ) {
+ start = format+1;
+ pt = strchr(start,format[0]);
+ } else {
+ start = format;
+ pt = strchr(start,' ');
+ }
+ if ( pt==NULL ) pt = start+strlen(start);
+ ch = *pt; *pt='\0';
+
+ temp = galloc(strlen(start)+300+ (ch==0?0:strlen(pt+1)));
+ cygwin_conv_to_full_posix_path(start,temp+1);
+ temp[0]='"'; strcat(temp,"\" ");
+ if ( ch!='\0' )
+ strcat(temp,pt+1);
+ cmd = galloc(strlen(temp)+strlen(fullspec)+8);
+ if ( strstr("%s",temp)!=NULL )
+ sprintf( cmd, temp, fullspec );
+ else {
+ strcpy(cmd,temp);
+ strcat(cmd, " ");
+ strcat(cmd,fullspec);
+ }
+ strcat(cmd," &" );
+ system(cmd);
+ free( cmd ); free( temp ); free( format );
+}
+#endif
+
+static char browser[1025];
+
+static void findbrowser(void) {
+#if __CygWin
+ static char *stdbrowsers[] = { "netscape.exe", "opera.exe", "galeon.exe", "kfmclient.exe",
+ "mozilla.exe", "mosaic.exe", /*"grail",*/
+ "iexplore.exe",
+ /*"lynx.exe",*/
+#else
+/* Both xdg-open and htmlview are not browsers per se, but browser dispatchers*/
+/* which try to figure out what browser the user intents. It seems no one */
+/* uses (understands?) environment variables any more, so BROWSER is a bit */
+/* old-fashioned */
+ static char *stdbrowsers[] = { "xdg-open", "htmlview", "firefox", "mozilla", "opera", "galeon", "kfmclient",
+ "netscape", "mosaic", /*"grail",*/ "lynx",
+#endif
+ NULL };
+ int i;
+ char *path;
+
+ if ( getenv("BROWSER")!=NULL ) {
+ strcpy(browser,getenv("BROWSER"));
+#if __CygWin /* Get rid of any dos style names */
+ if ( isalpha(browser[0]) && browser[1]==':' && browser[2]=='\\' )
+ cygwin_conv_to_full_posix_path(getenv("BROWSER"),browser);
+ else if ( strchr(browser,'/')==NULL ) {
+ if ( strstrmatch(browser,".exe")==NULL )
+ strcat(browser,".exe");
+ if ( (path=_GFile_find_program_dir(browser))!=NULL ) {
+ snprintf(browser,sizeof(browser),"%s/%s", path, getenv("BROWSER"));
+ free(path);
+ }
+ }
+#endif
+ if ( strcmp(browser,"kde")==0 || strcmp(browser,"kfm")==0 ||
+ strcmp(browser,"konqueror")==0 || strcmp(browser,"kfmclient")==0 )
+ strcpy(browser,"kfmclient openURL");
+return;
+ }
+ for ( i=0; stdbrowsers[i]!=NULL; ++i ) {
+ if ( (path=_GFile_find_program_dir(stdbrowsers[i]))!=NULL ) {
+ if ( strcmp(stdbrowsers[i],"kfmclient")==0 )
+ strcpy(browser,"kfmclient openURL");
+ else
+#if __CygWin
+ snprintf(browser,sizeof(browser),"%s/%s", path, stdbrowsers[i]);
+#else
+ strcpy(browser,stdbrowsers[i]);
+#endif
+ free(path);
+return;
+ }
+ }
+#if __Mac
+ strcpy(browser,"open"); /* thanks to riggle */
+#endif
+}
+
+static int SupportedLocale(char *fullspec,char *locale) {
+ static char *supported[] = { "ja", NULL };
+ int i;
+
+ for ( i=0; supported[i]!=NULL; ++i ) {
+ if ( strcmp(locale,supported[i])==0 ) {
+ strcat(fullspec,locale);
+ strcat(fullspec,"/");
+return( true );
+ }
+ }
+return( false );
+}
+
+static void AppendSupportedLocale(char *fullspec) {
+ /* KANOU has provided a japanese translation of the docs */
+ /* Edward Lee is working on traditional chinese */
+ const char *loc = getenv("LC_ALL");
+ char buffer[40], *pt;
+
+ if ( loc==NULL ) loc = getenv("LC_MESSAGES");
+ if ( loc==NULL ) loc = getenv("LANG");
+ if ( loc==NULL )
+return;
+ strncpy(buffer,loc,sizeof(buffer));
+ if ( SupportedLocale(fullspec,buffer))
+return;
+ pt = strchr(buffer,'.');
+ if ( pt!=NULL ) {
+ *pt = '\0';
+ if ( SupportedLocale(fullspec,buffer))
+return;
+ }
+ pt = strchr(buffer,'_');
+ if ( pt!=NULL ) {
+ *pt = '\0';
+ if ( SupportedLocale(fullspec,buffer))
+return;
+ }
+}
+
+void help(char *file) {
+ char fullspec[1024], *temp, *pt;
+
+ if ( browser[0]=='\0' )
+ findbrowser();
+#ifndef __CygWin
+ if ( browser[0]=='\0' ) {
+ gwwv_post_error(_("No Browser"),_("Could not find a browser. Set the BROWSER environment variable to point to one"));
+return;
+ }
+#endif
+
+ if ( strstr(file,"http://")==NULL ) {
+ fullspec[0] = 0;
+ if ( *file!='/' ) {
+ if ( helpdir==NULL || *helpdir=='\0' ) {
+#ifdef DOCDIR
+ strcpy(fullspec,DOCDIR "/");
+#elif defined(SHAREDIR)
+ strcpy(fullspec,SHAREDIR "/doc/fontforge/");
+#else
+ strcpy(fullspec,"/usr/local/share/doc/fontforge/");
+#endif
+ } else
+ strcpy(fullspec,helpdir);
+ }
+ strcat(fullspec,file);
+ if (( pt = strrchr(fullspec,'#') )!=NULL ) *pt ='\0';
+ if ( !GFileReadable( fullspec )) {
+ if ( *file!='/' ) {
+ strcpy(fullspec,"/usr/share/doc/fontforge/");
+ strcat(fullspec,file);
+ if (( pt = strrchr(fullspec,'#') )!=NULL ) *pt ='\0';
+ }
+ }
+ if ( !GFileReadable( fullspec )) {
+ strcpy(fullspec,"http://fontforge.sf.net/");
+ AppendSupportedLocale(fullspec);
+ strcat(fullspec,file);
+ } else if ( pt!=NULL )
+ *pt = '#';
+ } else
+ strcpy(fullspec,file);
+#if __CygWin
+ if ( (strstrmatch(browser,"/cygdrive")!=NULL || browser[0]=='\0') &&
+ strstr(fullspec,":/")==NULL ) {
+ /* It looks as though the browser is a windows application, so we */
+ /* should give it a windows file name */
+ char *pt, *tpt;
+ temp = galloc(1024);
+ cygwin_conv_to_full_win32_path(fullspec,temp);
+ for ( pt = fullspec, tpt = temp; *tpt && pt<fullspec+sizeof(fullspec)-3; *pt++ = *tpt++ )
+ if ( *tpt=='\\' )
+ *pt++ = '\\';
+ *pt = '\0';
+ free(temp);
+ }
+#endif
+#if __Mac
+ if ( strcmp(browser,"open")==0 )
+ /* open doesn't want "file:" prepended */;
+ else
+#endif
+ if ( strstr(fullspec,":/")==NULL ) {
+ char *t1 = galloc(strlen(fullspec)+strlen("file:")+20);
+#if __CygWin
+ sprintf( t1, "file:\\\\\\%s", fullspec );
+#else
+ sprintf( t1, "file:%s", fullspec);
+#endif
+ strcpy(fullspec,t1);
+ free(t1);
+ }
+#if 0 && __Mac
+ /* Starting a Mac application is weird... system() can't do it */
+ /* Thanks to Edward H. Trager giving me an example... */
+ if ( strstr(browser,".app")!=NULL ) {
+ *strstr(browser,".app") = '\0';
+ pt = strrchr(browser,'/');
+ if ( pt==NULL ) pt = browser-1;
+ ++pt;
+ temp = galloc(strlen(pt)+strlen(fullspec) +
+ strlen( "osascript -l AppleScript -e \"Tell application \"\" to getURL \"\"\"" )+
+ 20);
+ /* this doesn't work on Max OS X.0 (osascript does not support -e) */
+ sprintf( temp, "osascript -l AppleScript -e \"Tell application \"%s\" to getURL \"%s\"\"",
+ pt, fullspec);
+ system(temp);
+ ff_post_notice(_("Leave X"),_("A browser is probably running in the native Mac windowing system. You must leave the X environment to view it. Try Cmd-Opt-A"));
+ } else {
+#elif __Mac
+ /* This seems a bit easier... Thanks to riggle */
+ if ( strcmp(browser,"open")==0 ) {
+ temp = galloc(strlen(browser) + strlen(fullspec) + 20);
+ sprintf( temp, "open \"%s\" &", fullspec );
+ system(temp);
+ ff_post_notice(_("Leave X"),_("A browser is probably running in the native Mac windowing system. You must leave the X environment to view it. Try Cmd-Opt-A"));
+ } else {
+#elif __CygWin
+ if ( browser[0]=='\0' ) {
+ do_windows_browser(fullspec);
+ temp = NULL;
+ } else {
+#else
+ {
+#endif
+ temp = galloc(strlen(browser) + strlen(fullspec) + 20);
+ sprintf( temp, strcmp(browser,"kfmclient openURL")==0 ? "%s \"%s\" &" : "\"%s\" \"%s\" &", browser, fullspec );
+ system(temp);
+ }
+ free(temp);
+}
+
+#define MAX_ERR_LINES 200
+static struct errordata {
+ char *errlines[MAX_ERR_LINES];
+ int fh, as;
+ GtkWidget *vsb;
+ GtkWidget *gw, *v;
+ PangoLayout *layout;
+ int cnt, linecnt;
+ int offtop;
+ int showing;
+} errdata;
+
+static void Warning_Hide(void) {
+ gdk_window_hide(errdata.gw->window);
+ errdata.showing = false;
+}
+
+static void Warning_VScroll(GtkRange *vsb, gpointer user_data) {
+ GtkAdjustment *sb;
+
+ sb = gtk_range_get_adjustment(GTK_RANGE(vsb));
+ if ( sb->value!=errdata.offtop) {
+ int diff = sb->value-errdata.offtop;
+ errdata.offtop = sb->value;
+ gdk_window_scroll(GDK_WINDOW(errdata.v->window),0,diff*errdata.fh);
+ }
+}
+
+static gboolean Warning_Resize(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) {
+ GtkAdjustment *sb;
+
+ errdata.linecnt = widget->allocation.width/errdata.fh;
+ sb = gtk_range_get_adjustment(GTK_RANGE(errdata.vsb));
+ sb->lower = 0; sb->upper = errdata.cnt; sb->page_size = errdata.linecnt;
+ sb->step_increment = 1; sb->page_increment = errdata.linecnt;
+
+ if ( errdata.offtop>=errdata.cnt-errdata.linecnt )
+ errdata.offtop = errdata.cnt-errdata.linecnt;
+ if ( errdata.offtop<0 ) errdata.offtop =0;
+ sb->value = errdata.offtop;
+ gtk_range_set_adjustment(GTK_RANGE(errdata.vsb),sb);
+return 0;
+}
+
+static gboolean Warning_Expose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) {
+ int i;
+ for ( i=0; i<errdata.linecnt && i+errdata.offtop<errdata.cnt; ++i ) {
+ pango_layout_set_text( errdata.layout, errdata.errlines[i+errdata.offtop], -1);
+ gdk_draw_layout( GDK_DRAWABLE(errdata.v->window),errdata.v->style->fg_gc[GTK_STATE_NORMAL],
+ 3,i*errdata.fh+errdata.as, errdata.layout);
+ }
+return 1;
+}
+
+static void CreateErrorWindow(void) {
+ GtkWidget *hbox5;
+ GtkWidget *view;
+ GtkWidget *vscrollbar2;
+ GdkPixbuf *Warning_icon_pixbuf;
+ PangoContext *context;
+ PangoFont *font;
+ PangoFontMetrics *fm;
+ int as, ds;
+ GtkRequisition desired;
+
+ errdata.gw = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (errdata.gw, "Warnings");
+ gtk_widget_set_events (errdata.gw, GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_PROPERTY_CHANGE_MASK);
+ gtk_window_set_title (GTK_WINDOW (errdata.gw), _("Warnings"));
+ Warning_icon_pixbuf = create_pixbuf ("fontview2.xbm");
+ if (Warning_icon_pixbuf) {
+ gtk_window_set_icon (GTK_WINDOW (errdata.gw), Warning_icon_pixbuf);
+ gdk_pixbuf_unref (Warning_icon_pixbuf);
+ }
+
+ hbox5 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox5, "hbox5");
+ gtk_widget_show (hbox5);
+ gtk_container_add (GTK_CONTAINER (errdata.gw), hbox5);
+
+ view = gtk_drawing_area_new ();
+ gtk_widget_set_name (view, "view");
+ gtk_widget_show (view);
+ gtk_box_pack_start (GTK_BOX (hbox5), view, TRUE, TRUE, 0);
+ gtk_widget_set_size_request (view, 16*24+1, 4*24+1);
+
+ vscrollbar2 = gtk_vscrollbar_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0)));
+ gtk_widget_set_name (vscrollbar2, "vscrollbar2");
+ gtk_widget_show (vscrollbar2);
+ gtk_box_pack_start (GTK_BOX (hbox5), vscrollbar2, FALSE, TRUE, 0);
+
+ g_signal_connect ((gpointer) errdata.gw, "delete_event",
+ G_CALLBACK (Warning_Hide),
+ NULL);
+ g_signal_connect ((gpointer) vscrollbar2, "value_changed",
+ G_CALLBACK (Warning_VScroll),
+ NULL);
+
+ g_signal_connect ((gpointer) view, "configure_event",
+ G_CALLBACK (Warning_Resize),
+ NULL);
+ g_signal_connect ((gpointer) view, "expose_event",
+ G_CALLBACK (Warning_Expose),
+ NULL);
+
+ errdata.v = view;
+ errdata.vsb = vscrollbar2;
+ errdata.layout = gtk_widget_create_pango_layout( view, NULL );
+ pango_layout_set_width(errdata.layout, -1); /* Don't wrap long lines */
+
+ context = gtk_widget_get_pango_context( view );
+ font = pango_context_load_font( context, pango_context_get_font_description(context));
+ fm = pango_font_get_metrics(font,NULL);
+ as = pango_font_metrics_get_ascent(fm);
+ ds = pango_font_metrics_get_descent(fm);
+ errdata.as = as;
+ errdata.fh = as+ds;
+
+ gtk_widget_set_size_request(view, 40*errdata.fh, 5*errdata.fh );
+
+ gtk_widget_size_request(errdata.gw,&desired);
+ /* This function is deprecated, but I can find no other way to position */
+ /* a window in the bottom right corner (or at all). So I use it */
+ gtk_widget_set_uposition(errdata.gw,
+ gdk_screen_get_width(gdk_screen_get_default())-desired.width-5,
+ gdk_screen_get_height(gdk_screen_get_default())-desired.height-errdata.fh-5);
+
+ errdata.linecnt = 5;
+
+ gtk_widget_show(errdata.gw);
+}
+
+static void AppendToErrorWindow(char *buffer) {
+ int i,linecnt;
+ char *pt,*end;
+
+ if ( buffer[strlen(buffer)-1]=='\n' ) buffer[strlen(buffer)-1] = '\0';
+
+ for ( linecnt=1, pt=buffer; (pt=strchr(pt,'\n'))!=NULL; ++linecnt )
+ ++pt;
+ if ( errdata.cnt + linecnt > MAX_ERR_LINES ) {
+ int off = errdata.cnt + linecnt - MAX_ERR_LINES;
+ for ( i=0; i<off; ++i )
+ free(errdata.errlines[i]);
+ for ( /*i=off*/; i<errdata.cnt; ++i )
+ errdata.errlines[i-off] = errdata.errlines[i];
+ for ( ; i<MAX_ERR_LINES+off ; ++i )
+ errdata.errlines[i-off] = NULL;
+ errdata.cnt -= off;
+ }
+ for ( i=errdata.cnt, pt=buffer; i<MAX_ERR_LINES; ++i ) {
+ end = strchr(pt,'\n');
+ if ( end==NULL ) end = pt+strlen(pt);
+ errdata.errlines[i] = copyn(pt,end-pt);
+ pt = end;
+ if ( *pt=='\0' ) {
+ ++i;
+ break;
+ }
+ ++pt;
+ }
+ errdata.cnt = i;
+
+ errdata.offtop = errdata.cnt - errdata.linecnt;
+ if ( errdata.offtop<0 ) errdata.offtop = 0;
+ Warning_Resize(errdata.gw,NULL,NULL);
+}
+
+int ErrorWindowExists(void) {
+return( errdata.gw!=NULL );
+}
+
+void ShowErrorWindow(void) {
+ if ( errdata.gw==NULL )
+return;
+ gdk_window_show(errdata.gw->window);
+ if ( errdata.showing )
+ gtk_widget_queue_draw(errdata.v);
+ errdata.showing = true;
+}
+
+static void _LogError(const char *format,va_list ap) {
+ char buffer[400];
+ vsnprintf(buffer,sizeof(buffer),format,ap);
+ if ( !ErrorWindowExists())
+ CreateErrorWindow();
+ AppendToErrorWindow(buffer);
+ ShowErrorWindow();
+}
+
+static void UI_LogError(const char *format,...) {
+ va_list ap;
+
+ va_start(ap,format);
+ _LogError(format,ap);
+ va_end(ap);
+}
+
+static void tinysleep(int microsecs) {
+ fd_set none;
+ struct timeval timeout;
+
+ FD_ZERO(&none);
+ memset(&timeout,0,sizeof(timeout));
+ timeout.tv_usec = microsecs;
+
+ select(1,&none,&none,&none,&timeout);
+}
+
+static void allow_events(void) {
+ g_main_context_iteration(NULL,false);
+ tinysleep(100);
+ g_main_context_iteration(NULL,false);
+}
+
+/* Stubs! */
+static void NOUI_progress_start(int delay, const char *title, const char *line1,
+ const char *line2, int tot, int stages) {
+}
+
+static void NOUI_void_void_noop(void) {
+}
+
+static void NOUI_void_int_noop(int useless) {
+}
+
+static int NOUI_int_int_noop(int useless) {
+return( true );
+}
+
+static void NOUI_void_str_noop(const char * useless) {
+}
+
+static int NOUI_alwaystrue(void) {
+return( true );
+}
+
+static int NOUI_DefaultStrokeFlags(void) {
+return( sf_correctdir );
+}
+
+struct ui_interface gtk_ui_interface = {
+ gwwv_ierror,
+ gwwv_post_error,
+ UI_LogError,
+ gwwv_post_notice,
+ gwwv_ask,
+ gwwv_choose,
+ gwwv_choose_multiple,
+ gwwv_ask_string,
+ gwwv_open_filename,
+ gwwv_saveas_filename,
+
+ NOUI_progress_start,
+ NOUI_void_void_noop,
+ NOUI_void_void_noop,
+ NOUI_void_int_noop,
+ NOUI_alwaystrue,
+ NOUI_alwaystrue,
+ NOUI_int_int_noop,
+ NOUI_void_str_noop,
+ NOUI_void_str_noop,
+ NOUI_void_void_noop,
+ NOUI_void_void_noop,
+ NOUI_void_int_noop,
+ NOUI_void_int_noop,
+ NOUI_alwaystrue,
+
+ allow_events,
+
+ NOUI_TTFNameIds,
+ NOUI_MSLangString,
+
+ NOUI_DefaultStrokeFlags
+};
diff --git a/gtkui/viewsgtk.h b/gtkui/viewsgtk.h
new file mode 100644
index 00000000..97a695aa
--- /dev/null
+++ b/gtkui/viewsgtk.h
@@ -0,0 +1,895 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _VIEWSGTK_H
+#define _VIEWSGTK_H
+
+#include <fontforge/baseviews.h>
+
+# include <gtk/gtk.h>
+# include <gdk/gdk.h>
+# include <gdk-pixbuf/gdk-pixbuf.h>
+
+struct gfi_data;
+struct contextchaindlg;
+struct statemachinedlg;
+
+extern struct cvshows {
+ int showfore, showback, showgrids, showhhints, showvhints, showdhints;
+ int showpoints, showfilled;
+ int showrulers;
+ int showrounds; /* 0=>no, 1=>auto, 2=>always */
+ int showmdx, showmdy; /* minimum distances x,y */
+ int showhmetrics, showvmetrics; /* show advance width, baseline, etc. */
+ int markextrema;
+ int markpoi; /* Points of inflection */
+ int showblues, showfamilyblues;
+ int showanchor;
+ int showcpinfo;
+ int showtabs; /* with the names of former glyphs */
+ int showsidebearings;
+} CVShows;
+
+extern struct bvshows {
+ int showfore, showoutline, showgrid;
+ int lastpixelsize;
+} BVShows;
+
+
+struct instrinfo {
+ GtkWidget *v;
+ GtkWidget *vsb;
+ int16 sbw;
+ int16 vheight, vwidth;
+ int16 lheight,lpos;
+ int16 lstopped;
+ int16 as, fh;
+ struct instrdata *instrdata;
+ int isel_pos;
+ unsigned int showaddr: 1;
+ unsigned int showhex: 1;
+ unsigned int mousedown: 1;
+ void *userdata;
+ void (*selection_callback)(struct instrinfo *,int ip);
+ int (*bpcheck)(struct instrinfo *,int ip);
+ int (*handle_char)(struct instrinfo *,GdkEvent *e);
+};
+
+enum debug_wins { dw_registers=0x1, dw_stack=0x2, dw_storage=0x4, dw_points=0x8,
+ dw_cvt=0x10, dw_raster=0x20, dw_gloss=0x40 };
+
+typedef struct debugview {
+ struct debugger_context *dc; /* Local to freetype.c */
+ GtkWidget *dv, *v;
+ GtkWidget *regs, *stack, *storage, *points, *cvt, *raster, *gloss; /* Order matters */
+ GtkWidget *points_v;
+ GtkWidget *cvtsb, *pts_vsb, *glosssb, *storagesb, *regsb, *stacksb;
+ struct instrdata id;
+ struct instrinfo ii;
+ int dwidth, toph;
+ struct charview *cv;
+ double scale;
+ int pts_head, cvt_offtop, gloss_offtop, storage_offtop, stack_offtop, reg_offtop;
+ int points_offtop;
+
+ int codeSize;
+ uint8 initialbytes[4];
+ struct reflist { RefChar *ref; struct reflist *parent; } *active_refs;
+ int last_npoints;
+} DebugView;
+
+enum dv_coderange { cr_none=0, cr_fpgm, cr_prep, cr_glyph }; /* cleverly chosen to match ttobjs.h */
+
+#define FORMER_MAX 10
+
+typedef struct charview {
+ CharViewBase b;
+ unsigned int showback:1;
+ unsigned int showfore:1;
+ unsigned int showgrids:1;
+ unsigned int showhhints:1;
+ unsigned int showvhints:1;
+ unsigned int showdhints:1;
+ unsigned int showpoints:1;
+ unsigned int showfilled:1;
+ unsigned int showrulers:1;
+ unsigned int showrounds:2; /* 0=>no, 1=>auto, 2=>always */
+ unsigned int showmdx:1;
+ unsigned int showmdy:1;
+ unsigned int showhmetrics:1;
+ unsigned int showvmetrics:1;
+ unsigned int showblues:1; /* 16 */
+ unsigned int showfamilyblues:1;
+ unsigned int showanchor:1;
+ unsigned int showpointnumbers:1;
+ unsigned int markextrema:1;
+ unsigned int markpoi:1;
+ unsigned int needsrasterize:1; /* Rasterization (of fill or fontview) needed on mouse up */
+ unsigned int recentchange:1; /* a change happened in the grids or background. don't need to rasterize */
+ unsigned int info_within: 1; /* cursor is within main window */
+ unsigned int back_img_out_of_date: 1; /* Force redraw of back image pixmap */
+ unsigned int cntrldown:1;
+ unsigned int joinvalid:1;
+ unsigned int widthsel:1;
+ unsigned int vwidthsel:1;
+ unsigned int icsel:1;
+ unsigned int tah_sel:1; /* 32 */
+ unsigned int inactive:1; /* When in a search view */
+ unsigned int show_ft_results: 1;
+ unsigned int coderange: 2; /* For the debugger */
+ unsigned int autonomous_ruler_w: 1;
+ unsigned int showcpinfo: 1;
+ unsigned int showtabs: 1;
+ unsigned int showsidebearings: 1;
+ unsigned int showing_spiro_pt_menu: 1;
+ unsigned int ruler_pressed: 1;
+ unsigned int ruler_pressedv: 1;
+ real scale;
+ GtkWidget *gw, *v;
+ GtkWidget *vsb, *hsb, *mb, *tabs;
+ PangoFontDescription *small, *normal;
+ GtkWindow *icon; /* Pixmap? */
+ guint pressed; /* glib timer id */
+ GtkWindow backimgs; /* Pixmap? */
+ int width, height;
+ int xoff, yoff;
+ int mbh, infoh, rulerh;
+ int16 sas, sfh, nas, nfh;
+ BasePoint info;
+ SplinePoint *info_sp;
+ GdkPoint e; /* mouse location */
+ GdkPoint olde;
+ BasePoint last_c;
+ BDFChar *filled;
+ int enc;
+ EncMap *map_of_enc; /* Only use for comparison against fontview's map to see if our enc be valid */
+ /* Will not be updated when fontview is reencoded */
+ PressedOn p;
+ SplinePoint *lastselpt;
+ spiro_cp *lastselcp;
+ int8 b1_tool, cb1_tool, b2_tool, cb2_tool; /* Button 3 does a popup */
+ int8 s1_tool, s2_tool, er_tool; /* Bindings for wacom stylus and eraser */
+ int8 showing_tool, pressed_tool, pressed_display, had_control, active_tool;
+ SplinePointList *active_spl;
+ SplinePoint *active_sp;
+ spiro_cp *active_cp;
+ IPoint handscroll_base;
+ uint16 rfh, ras;
+ BasePoint lastknife;
+ struct freehand {
+ struct tracedata *head, *last; /* for the freehand tool */
+ SplinePointList *current_trace;
+ int ignore_wobble; /* Ignore wiggles smaller than this */
+ int skip_cnt;
+ } freehand;
+ enum expandedge { ee_none, ee_nw, ee_up, ee_ne, ee_right, ee_se, ee_down,
+ ee_sw, ee_left, ee_max } expandedge;
+ BasePoint expandorigin;
+ real expandwidth, expandheight;
+ SplinePointList *active_shape;
+ SplinePoint joinpos;
+ spiro_cp joincp;
+ SplineChar *template1, *template2;
+#if HANYANG
+ struct jamodisplay *jamodisplay;
+#endif
+ real oldwidth, oldvwidth;
+ int16 oldic, oldtah;
+#if _ModKeysAutoRepeat
+#endif
+ PST *lcarets;
+ int16 nearcaret;
+ /* freetype results display */
+ int16 ft_dpi, ft_ppem, ft_depth;
+ real ft_pointsize;
+ struct freetype_raster *raster, *oldraster;
+ DebugView *dv;
+ uint32 mmvisible;
+ char *former_names[FORMER_MAX];
+ int former_cnt;
+ AnchorPoint *apmine, *apmatch;
+ SplineChar *apsc;
+ int guide_pos;
+} CharView;
+
+typedef struct bitmapview {
+ BDFChar *bc;
+ BDFFont *bdf;
+ struct fontview *fv;
+ EncMap *map_of_enc;
+ int enc;
+ GtkWidget *v;
+ GtkWidget *gw;
+ GtkWidget *vsb, *hsb, *mb;
+ int xoff, yoff;
+ int width, height;
+ int infoh, mbh;
+ int scale;
+ real scscale;
+ struct bitmapview *next;
+ unsigned int showfore:1;
+ unsigned int showoutline:1;
+ unsigned int showgrid:1;
+ unsigned int cntrldown:1;
+ unsigned int recentchange:1;
+ unsigned int clearing:1;
+ unsigned int shades_hidden:1;
+ unsigned int shades_down:1;
+ int8 b1_tool, cb1_tool, b2_tool, cb2_tool; /* Button 3 does a popup */
+ int8 s1_tool, s2_tool, er_tool; /* Bindings for wacom stylus and eraser */
+ int8 showing_tool, pressed_tool, pressed_display, had_control, active_tool;
+ int pressed_x, pressed_y;
+ int info_x, info_y;
+ int event_x, event_y;
+ int16 sas, sfh;
+#if _ModKeysAutoRepeat
+#endif
+ int color; /* for greyscale fonts (between 0,255) */
+ int color_under_cursor;
+} BitmapView;
+
+struct aplist { AnchorPoint *ap; int connected_to, selected; struct aplist *next; };
+
+typedef struct metricsview {
+ struct fontview *fv;
+ SplineFont *sf;
+ int pixelsize;
+ BDFFont *bdf; /* We can also see metric info on a bitmap font */
+ BDFFont *show; /* Or the rasterized version of the outline font */
+ GtkWidget *gw;
+ PangoFontDescription *font;
+ GtkWidget *hsb, *vsb, *mb, *text, *subtable_list;
+ GtkWidget *namelab, *widthlab, *lbearinglab, *rbearinglab, *kernlab;
+ int16 xstart;
+ int16 width, height, dwidth;
+ int16 mbh,sbh;
+ int16 topend; /* y value of the end of the region containing the text field */
+ int16 displayend; /* y value of the end of the region showing filled characters */
+ int16 fh, as;
+ int16 cmax, clen;
+ SplineChar **chars; /* Character input stream */
+ struct opentype_str *glyphs;/* after going through the various gsub/gpos transformations */
+ struct metricchar { /* One for each glyph above */
+ int16 dx, dwidth; /* position and width of the displayed char */
+ int16 dy, dheight; /* displayed info for vertical metrics */
+ int xoff, yoff;
+ int16 mx, mwidth; /* position and width of the text underneath */
+ int16 kernafter;
+ unsigned int selected: 1;
+ GtkWidget *width, *lbearing, *rbearing, *kern, *name;
+ } *perchar;
+ SplineChar **sstr; /* Character input stream */
+ int16 mwidth, mbase;
+ int16 glyphcnt, max;
+ int16 pressed_x, pressed_y;
+ int16 activeoff;
+ int xoff, coff, yoff;
+ struct metricsview *next;
+ unsigned int right_to_left: 1;
+ unsigned int pressed: 1;
+ unsigned int pressedwidth: 1;
+ unsigned int pressedkern: 1;
+ unsigned int showgrid: 1;
+ unsigned int antialias: 1;
+ unsigned int vertical: 1;
+ struct aplist *pressed_apl;
+ int xp, yp, ap_owner;
+ BasePoint ap_start;
+ int cursor;
+ int scale_index;
+ struct lookup_subtable *cur_subtable;
+ /*GTextInfo *scriptlangs;*/
+} MetricsView;
+
+enum fv_metrics { fvm_baseline=1, fvm_origin=2, fvm_advanceat=4, fvm_advanceto=8 };
+typedef struct fontview {
+ FontViewBase b;
+ BDFFont *show, *filled;
+ GtkWidget *gw, *v;
+ PangoFontDescription **fontset;
+ GtkWidget *vsb, *status;
+ GdkGC *gc;
+ int width, height; /* of v */
+ int16 infoh,mbh;
+ int16 lab_height, lab_as;
+ int16 colcnt, rowcnt; /* of display window */
+ int32 rowoff, rowltot; /* Can be really big in full unicode */
+ int16 cbw,cbh; /* width/height of a character box */
+ int pressed_pos, end_pos;
+ unsigned int antialias:1;
+ unsigned int bbsized:1; /* displayed bitmap should be scaled by bounding box rather than emsize */
+ unsigned int wasonlybitmaps:1;
+ unsigned int refstate: 3; /* 0x1 => paste orig of all non exist refs, 0x2=>don't, 0x3 => don't warn about non-exist refs with no source font */
+ unsigned int touched: 1;
+ unsigned int showhmetrics: 4;
+ unsigned int showvmetrics: 4;
+ unsigned int drag_and_drop: 1;
+ unsigned int has_dd_no_cursor: 1;
+ unsigned int any_dd_events_sent: 1;
+ unsigned int resize_expected: 1;
+ /* Some window managers do not honour my resize requests (if window is*/
+ /* maximized for example), but we depend on the resize request to */
+ /* fix up the window. We do get a configure notify, but the window */
+ /* stays the same size, so kludge things */
+ unsigned int glyphlabel: 2;
+ int16 magnify;
+ int16 user_requested_magnify;
+ int32 *mapping; /* an array mapping grid cells (0=upper left) to font indeces (enc, 0=NUL) */
+ /* So the default array would contain NUL, ^A, ^B, ... */
+ int mapcnt; /* Number of chars in the current group (mapping) */
+ struct searchview *sv;
+ SplineChar *sc_near_top;
+ int sel_index;
+ struct lookup_subtable *cur_subtable;
+ GdkPixbuf *char_slot;
+ GtkTooltips *popupinfo;
+ PangoLayout *statuslayout, *vlayout;
+ GtkIMContext *imc;
+ int last_popup_uni;
+ int resize_timer_src;
+ int pressed_timer_src;
+ uint8 click_count; /* GDK only gives me the click count on the */
+ /* button press, but I want to know it on the */
+ /* release */
+} FontView;
+
+typedef struct findsel {
+ GdkEvent *e;
+ real fudge; /* One pixel fudge factor */
+ real xl,xh, yl, yh; /* One pixel fudge factor */
+ unsigned int select_controls: 1; /* notice control points */
+ unsigned int seek_controls: 1; /* notice control points before base points */
+ unsigned int all_controls: 1; /* notice control points even if the base points aren't selected (in truetype point numbering mode where all cps are visible) */
+ real scale;
+ PressedOn *p;
+} FindSel;
+
+typedef struct searchview {
+ struct cvcontainer base;
+ FontView dummy_fv;
+ SplineFont dummy_sf;
+ SplineChar *chars[2];
+ EncMap dummy_map;
+ int32 map[2], backmap[2];
+ uint8 sel[2];
+ CharView cv_srch, cv_rpl;
+ CharView *lastcv;
+/* ****** */
+ GtkWidget *gw;
+ GtkWidget *mb;
+ PangoFont *plain, *bold;
+ int mbh;
+ int fh, as;
+ int rpl_x, cv_y;
+ int cv_width, cv_height;
+ short button_height, button_width;
+/* ****** */
+ SearchData sd;
+ unsigned int isvisible: 1;
+ unsigned int findenabled: 1;
+ unsigned int rplallenabled: 1;
+ unsigned int rplenabled: 1;
+ unsigned int showsfindnext: 1;
+} SearchView;
+
+typedef struct mathkernview {
+ struct cvcontainer base;
+ FontView dummy_fv;
+ SplineFont dummy_sf;
+ SplineChar sc_topright, sc_topleft, sc_bottomright, sc_bottomleft;
+ SplineChar *chars[4];
+ EncMap dummy_map;
+ int32 map[4], backmap[4];
+ uint8 sel[4];
+ CharView cv_topright, cv_topleft, cv_bottomright, cv_bottomleft;
+ CharView *lastcv;
+/* ****** */
+ int mbh;
+ int fh, as;
+ int mid_space, cv_y;
+ int cv_width, cv_height;
+ short button_height, button_width;
+/* ****** */
+ SplineChar *cursc;
+ struct mathkern *orig_mathkern;
+ uint8 saved_mathkern; /* Can't just check if orig is non-NULL, because NULL is a perfectly valid initial state */
+ uint8 last_aspect;
+ uint8 done;
+} MathKernDlg;
+
+# ifdef FONTFORGE_CONFIG_TILEPATH
+
+typedef struct tilepathdlg {
+ struct cvcontainer base;
+ FontView dummy_fv;
+ SplineFont dummy_sf;
+ SplineChar sc_first, sc_medial, sc_final, sc_isolated;
+ SplineChar *chars[4];
+ EncMap dummy_map;
+ int32 map[4], backmap[4];
+ uint8 sel[4];
+ CharView cv_first, cv_medial, cv_final, cv_isolated;
+ CharView *lastcv;
+/* ****** */
+ int mbh;
+ int fh, as;
+ int mid_space, cv_y;
+ int cv_width, cv_height;
+/* ****** */
+ struct tiledata *td;
+ uint8 done, oked;
+} TilePathDlg;
+extern void TPDChar(TilePathDlg *tpd, GdkEvent *event);
+extern void TPDCharViewInits(TilePathDlg *tpd, int cid);
+#endif /* Tile Path */
+
+struct lkdata {
+ int cnt, max;
+ int off_top, off_left;
+ struct lkinfo {
+ OTLookup *lookup;
+ unsigned int open: 1;
+ unsigned int deleted: 1;
+ unsigned int new: 1;
+ unsigned int selected: 1;
+ int16 subtable_cnt, subtable_max;
+ struct lksubinfo {
+ struct lookup_subtable *subtable;
+ unsigned int deleted: 1;
+ unsigned int new: 1;
+ unsigned int selected: 1;
+ } *subtables;
+ } *all;
+};
+
+struct gfi_data {
+ SplineFont *sf;
+ int tn_active;
+ int private_aspect, ttfv_aspect, tn_aspect, tx_aspect, unicode_aspect;
+ int old_sel, old_aspect, old_lang, old_strid;
+ int ttf_set, names_set, tex_set;
+ struct psdict *private;
+ int langlocalecode; /* MS code for the current locale */
+ unsigned int family_untitled: 1;
+ unsigned int human_untitled: 1;
+ unsigned int done: 1;
+ unsigned int mpdone: 1;
+ struct anchor_shows { CharView *cv; SplineChar *sc; int restart; } anchor_shows[2];
+ struct texdata texdata;
+ struct contextchaindlg *ccd;
+ struct statemachinedlg *smd;
+/* For GDEF Mark Attachment Class -- used in lookup flags */
+/* As usual, class 0 is unused */
+ int mark_class_cnt;
+ char **mark_classes; /* glyph name list */
+ char **mark_class_names; /* used within ff */
+ struct markclassdlg *mcd;
+ int as, fh;
+ struct lkdata tables[2];
+ int lkwidth, lkheight;
+};
+
+
+extern void FVMarkHintsOutOfDate(SplineChar *sc);
+extern void FVRefreshChar(FontView *fv,int gid);
+extern int _FVMenuSave(FontView *fv);
+extern int _FVMenuSaveAs(FontView *fv);
+extern int _FVMenuGenerate(FontView *fv,int family);
+extern void _FVCloseWindows(FontView *fv);
+extern char *GetPostscriptFontName(char *defdir,int mult);
+extern void MergeKernInfo(SplineFont *sf,EncMap *map);
+#ifdef FONTFORGE_CONFIG_WRITE_PFM
+extern int WritePfmFile(char *filename,SplineFont *sf, int type0, EncMap *map);
+#endif
+extern int SFGenerateFont(SplineFont *sf,int family,EncMap *map);
+
+extern void NonLinearDlg(FontView *fv,struct charview *cv);
+extern void FVChangeChar(FontView *fv,int encoding);
+extern void FVMergeFonts(FontView *fv);
+extern void FVInterpolateFonts(FontView *fv);
+
+extern void FVDeselectAll(FontView *fv);
+
+extern void FVAutoKern(FontView *fv);
+extern void FVAutoWidth(FontView *fv);
+
+extern void SC_MarkInstrDlgAsChanged(SplineChar *sc);
+
+extern void PythonUI_Init(void);
+
+extern void SCStroke(SplineChar *sc);
+
+extern void PfaEditSetFallback(void);
+extern void RecentFilesRemember(char *filename);
+
+
+struct debugger_context;
+extern void DebuggerTerminate(struct debugger_context *dc);
+extern void DebuggerReset(struct debugger_context *dc,real pointsize,int dpi,int dbg_fpgm, int is_bitmap);
+extern struct debugger_context *DebuggerCreate(SplineChar *sc,real pointsize,int dpi,int dbg_fpgm, int is_bitmap);
+enum debug_gotype { dgt_continue, dgt_step, dgt_next, dgt_stepout };
+extern void DebuggerGo(struct debugger_context *dc,enum debug_gotype,DebugView *dv);
+extern struct TT_ExecContextRec_ *DebuggerGetEContext(struct debugger_context *dc);
+extern void DebuggerToggleBp(struct debugger_context *dc,int range,int ip);
+extern int DebuggerBpCheck(struct debugger_context *dc,int range,int ip);
+extern void DebuggerSetWatches(struct debugger_context *dc,int n, uint8 *w);
+extern uint8 *DebuggerGetWatches(struct debugger_context *dc, int *n);
+extern void DebuggerSetWatchStores(struct debugger_context *dc,int n, uint8 *w);
+extern uint8 *DebuggerGetWatchStores(struct debugger_context *dc, int *n);
+extern int DebuggerIsStorageSet(struct debugger_context *dc, int index);
+extern void DebuggerSetWatchCvts(struct debugger_context *dc,int n, uint8 *w);
+extern uint8 *DebuggerGetWatchCvts(struct debugger_context *dc, int *n);
+extern int DebuggingFpgm(struct debugger_context *dc);
+
+
+extern void PrintDlg(FontView *fv,SplineChar *sc,MetricsView *mv);
+extern void PrintWindowClose(void);
+
+extern char *Kern2Text(SplineChar *other,KernPair *kp,int isv);
+extern char *PST2Text(PST *pst,SplineFont *sf);
+
+
+
+void EmboldenDlg(FontView *fv, CharView *cv);
+void CondenseExtendDlg(FontView *fv, CharView *cv);
+void ObliqueDlg(FontView *fv, CharView *cv);
+
+extern int FVParseSelectByPST(FontView *fv,struct lookup_subtable *sub,
+ int search_type);
+extern void DropChars2Text(GdkWindow gw, GtkWidget *glyphs,GdkEvent *event);
+
+
+/*extern void FVReplaceOutlineWithReference( FontView *fv, double fudge );*/
+extern void SVDestroy(struct searchview *sv);
+
+
+
+extern int SLICount(SplineFont *sf);
+extern unichar_t *ClassName(const char *name,uint32 feature_tag,
+ uint16 flags, int script_lang_index, int merge_with, int act_type,
+ int macfeature,SplineFont *sf);
+extern unichar_t *DecomposeClassName(const unichar_t *clsnm, unichar_t **name,
+ uint32 *feature_tag, int *macfeature,
+ uint16 *flags, uint16 *script_lang_index,int *merge_with,int *act_type,
+ SplineFont *sf);
+extern PST *AddSubs(PST *last,uint32 tag,char *name,uint16 flags,
+ uint16 sli,SplineChar *sc);
+
+
+extern void FVScrollToChar(FontView *fv,int i);
+extern void FVRegenChar(FontView *fv,SplineChar *sc);
+extern FontView *FontNew(void);
+extern char *AskNameTag(char *title,char *def,uint32 def_tag,uint16 flags,
+ int script_lang_index, enum possub_type type, SplineFont *sf, SplineChar *default_script,
+ int merge_with,int act_type);
+extern int RecentFilesAny(void);
+extern void _aplistbuild(GtkMenuItem *menuitem,SplineFont *sf,
+ void (*func)(GtkMenuItem *menuitem, gpointer user_data));
+extern void GetEncodingMenu(GtkMenuItem *menuitem,
+ void (*func)(GtkMenuItem *menuitem, gpointer user_data),
+ Encoding *cur);
+
+extern void CharInfoInit(void);
+extern void SCLigCaretCheck(SplineChar *sc,int clean);
+extern int DeviceTableOK(char *dvstr, int *_low, int *_high);
+#ifdef FONTFORGE_CONFIG_DEVICETABLES
+extern DeviceTable *DeviceTableParse(DeviceTable *dv,char *dvstr);
+extern void DevTabToString(char **str,DeviceTable *adjust);
+#endif
+extern void GFI_LookupEnableButtons(struct gfi_data *gfi, int isgpos);
+extern void GFI_LookupScrollbars(struct gfi_data *gfi, int isgpos, int refresh);
+extern void FontInfo(SplineFont *sf,int aspect,int sync);
+extern void FontInfoDestroy(SplineFont *sf);
+extern void FontMenuFontInfo(void *fv);
+extern void GFI_CCDEnd(struct gfi_data *d);
+extern struct enc *MakeEncoding(SplineFont *sf, EncMap *map);
+extern void LoadEncodingFile(void);
+extern void RemoveEncoding(void);
+extern void SFPrivateInfo(SplineFont *sf);
+extern void FVDelay(FontView *fv,int (*func)(FontView *));
+extern void SCPreparePopup(GtkTooltips *tip,GtkWidget *v,SplineChar *sc,struct remap *remap,
+ int localenc, int actualuni);
+extern real CVRoundRectRadius(void);
+extern int CVRectElipseCenter(void);
+extern void CVRectEllipsePosDlg(CharView *cv);
+extern real CVStarRatio(void);
+extern int CVPolyStarPoints(void);
+extern StrokeInfo *CVFreeHandInfo(void);
+extern void BVToolsSetCursor(BitmapView *bv, int state,char *device);
+extern void CVToolsSetCursor(CharView *cv, int state,char *device);
+extern int CVPaletteIsVisible(CharView *cv,int which);
+extern void CVPaletteSetVisible(CharView *cv,int which,int visible);
+extern void CVPalettesRaise(CharView *cv);
+extern void CVLayersSet(CharView *cv);
+extern void _CVPaletteActivate(CharView *cv,int force);
+extern void CVPaletteActivate(CharView *cv);
+extern void CVPalettesHideIfMine(CharView *cv);
+extern int BVPaletteIsVisible(BitmapView *bv,int which);
+extern void BVPaletteSetVisible(BitmapView *bv,int which,int visible);
+extern void BVPaletteActivate(BitmapView *bv);
+extern void BVPalettesHideIfMine(BitmapView *bv);
+extern void BVPaletteColorChange(BitmapView *bv);
+extern void BVPaletteColorUnderChange(BitmapView *bv,int color);
+extern void BVPaletteChangedChar(BitmapView *bv);
+extern void CVPaletteDeactivate(void);
+extern void PalettesChangeDocking(void);
+extern int CVPalettesWidth(void);
+extern int BVPalettesWidth(void);
+
+extern void CVDoTransform(CharView *cv, enum cvtools cvt );
+extern void CVTransFunc(CharView *cv,real transform[6],enum fvtrans_flags);
+extern void TransformDlgCreate(void *data,void (*transfunc)(void *,real *,int,BVTFunc *,enum fvtrans_flags),
+ int (*getorigin)(void *,BasePoint *,int), int enableback,
+ enum cvtools cvt);
+extern void BitmapDlg(FontView *fv,SplineChar *sc, int isavail);
+extern int SimplifyDlg(SplineFont *sf,struct simplifyinfo *smpl);
+extern void CVReviewHints(CharView *cv);
+extern void CVCreateHint(CharView *cv,int ishstem,int preserveundoes);
+extern void SCRemoveSelectedMinimumDistances(SplineChar *sc,int inx);
+extern int CVExport(CharView *cv);
+extern int BVExport(BitmapView *bv);
+
+extern void CVResize(CharView *cv );
+extern CharView *CharViewCreate(SplineChar *sc,FontView *fv,int enc);
+extern void CharViewFree(CharView *cv);
+extern int CVValid(SplineFont *sf, SplineChar *sc, CharView *cv);
+extern void CVSetCharChanged(CharView *cv,int changed);
+extern int CVAnySel(CharView *cv, int *anyp, int *anyr, int *anyi, int *anya);
+extern int CVAnySelPoints(CharView *cv);
+extern void CVSelectPointAt(CharView *cv);
+extern int CVTwoForePointsSelected(CharView *cv, SplinePoint **sp1, SplinePoint **sp2);
+extern int CVNumForePointsSelected(CharView *cv, BasePoint **sp);
+extern int CVClearSel(CharView *cv);
+extern int CVSetSel(CharView *cv,int mask);
+extern void CVInvertSel(CharView *cv);
+extern int CVAllSelected(CharView *cv);
+extern SplinePointList *CVAnySelPointList(CharView *cv);
+extern int CVAnySelPoint(CharView *cv, SplinePoint **selsp, spiro_cp **selcp);
+extern int CVOneThingSel(CharView *cv, SplinePoint **sp, SplinePointList **spl,
+ RefChar **ref, ImageList **img, AnchorPoint **ap, spiro_cp **cp);
+extern int CVOneContourSel(CharView *cv, SplinePointList **_spl,
+ RefChar **ref, ImageList **img);
+extern void RevertedGlyphReferenceFixup(SplineChar *sc, SplineFont *sf);
+extern void CVImport(CharView *cv);
+extern void BVImport(BitmapView *bv);
+extern void FVImport(FontView *bv);
+extern void CVFindCenter(CharView *cv, BasePoint *bp, int nosel);
+extern void CVStroke(CharView *cv);
+extern void FVStroke(FontView *fv);
+extern void FreeHandStrokeDlg(StrokeInfo *si);
+extern void OutlineDlg(FontView *fv, CharView *cv,MetricsView *mv,int isinline);
+extern void ShadowDlg(FontView *fv, CharView *cv,MetricsView *mv,int wireframe);
+extern void CVTile(CharView *cv);
+extern void FVTile(FontView *fv);
+extern void SCCharInfo(SplineChar *sc,EncMap *map,int enc);
+extern void CharInfoDestroy(struct charinfo *ci);
+extern SplineChar *SuffixCheck(SplineChar *sc,char *suffix);
+extern GImage *NameList_GetImage(SplineFont *sf,SplineChar *sc,char *namelist,
+ int isliga );
+extern GImage *GV_GetConstructedImage(SplineChar *sc,struct glyphvariants *gv,
+ int is_horiz);
+extern GImage *SC_GetLinedImage(SplineChar *sc, int pos, int is_italic_cor);
+extern void CVGetInfo(CharView *cv);
+extern void CVPGetInfo(CharView *cv);
+extern int SCUsedBySubs(SplineChar *sc);
+extern void SCSubBy(SplineChar *sc);
+extern void SCRefBy(SplineChar *sc);
+extern void ApGetInfo(CharView *cv, AnchorPoint *ap);
+extern void CVAddAnchor(CharView *cv);
+extern AnchorClass *AnchorClassUnused(SplineChar *sc,int *waslig);
+extern void FVSetWidth(FontView *fv,enum widthtype wtype);
+extern void CVSetWidth(CharView *cv,enum widthtype wtype);
+extern void CVChangeSC(CharView *cv, SplineChar *sc );
+extern Undoes *CVPreserveTState(CharView *cv);
+extern void CVRestoreTOriginalState(CharView *cv);
+extern void CVUndoCleanup(CharView *cv);
+
+extern void CVAdjustPoint(CharView *cv, SplinePoint *sp);
+extern void CVMergeSplineSets(CharView *cv, SplinePoint *active, SplineSet *activess,
+ SplinePoint *merge, SplineSet *mergess);
+extern void CVAdjustControl(CharView *cv,BasePoint *cp, BasePoint *to);
+extern int CVMoveSelection(CharView *cv, real dx, real dy, uint32 input_state);
+extern void CPEndInfo(CharView *cv);
+extern void CVMouseMovePoint(CharView *cv,PressedOn *);
+extern void CVMouseUpPointer(CharView *cv );
+extern void CVCheckResizeCursors(CharView *cv);
+extern void CVMouseDownHand(CharView *cv);
+extern void CVMouseUpHand(CharView *cv);
+extern void CVMouseDownTransform(CharView *cv);
+extern void CVMouseMoveTransform(CharView *cv);
+extern void CVMouseUpTransform(CharView *cv);
+extern void CVMouseDownKnife(CharView *cv);
+extern void CVMouseMoveKnife(CharView *cv,PressedOn *);
+extern void CVMouseMoveShape(CharView *cv);
+extern void CVMouseUpShape(CharView *cv);
+extern void CVDebugPointPopup(CharView *cv);
+
+extern int GotoChar(SplineFont *sf,EncMap *map);
+
+extern void CVShowPoint(CharView *cv, BasePoint *me);
+
+extern BitmapView *BitmapViewCreate(BDFChar *bc, BDFFont *bdf, FontView *fv,int enc);
+extern BitmapView *BitmapViewCreatePick(int enc, FontView *fv);
+extern void BitmapViewFree(BitmapView *bv);
+extern void BVRotateBitmap(BitmapView *bv,enum bvtools type );
+extern int BVColor(BitmapView *bv);
+extern void BCGeneralFunction(BitmapView *bv,
+ void (*SetPoint)(BitmapView *,int x, int y, void *data),void *data);
+extern char *BVFlipNames[];
+extern void BVChangeBC(BitmapView *bv, BDFChar *bc, int fitit );
+
+extern void MVSetSCs(MetricsView *mv, SplineChar **scs);
+extern void MVRefreshChar(MetricsView *mv, SplineChar *sc);
+extern void MVRegenChar(MetricsView *mv, SplineChar *sc);
+extern void MVReKern(MetricsView *mv);
+extern MetricsView *MetricsViewCreate(FontView *fv,SplineChar *sc,BDFFont *bdf);
+extern void MetricsViewFree(MetricsView *mv);
+extern void MVRefreshAll(MetricsView *mv);
+
+extern void DoPrefs(void);
+
+extern char *FVOpenFont(const char *title, const char *defaultfile, int mult);
+
+
+
+
+extern void ShowAboutScreen(void);
+extern void DelayEvent(void (*func)(void *), void *data);
+
+extern void FindProblems(FontView *fv,CharView *cv,SplineChar *sc);
+extern void CVConstrainSelection(CharView *cv,int type);
+extern void CVMakeParallel(CharView *cv);
+
+extern void ScriptDlg(FontView *fv,CharView *cv);
+
+# if HANYANG
+extern void MenuNewComposition(GdkWindow gw, struct gmenuitem *, GdkEvent *);
+extern void CVDisplayCompositions(GdkWindow gw, struct gmenuitem *, GdkEvent *);
+extern void Disp_DoFinish(struct jamodisplay *d, int cancel);
+extern void Disp_RefreshChar(SplineFont *sf,SplineChar *sc);
+extern void Disp_DefaultTemplate(CharView *cv);
+# endif
+
+extern SearchView *SVCreate(FontView *fv);
+extern void SVCharViewInits(SearchView *sv);
+extern void SV_DoClose(struct cvcontainer *cvc);
+extern void SVChar(SearchView *sv, GdkEvent *event);
+extern void SVMakeActive(SearchView *sv,CharView *cv);
+extern int SVAttachFV(FontView *fv,int ask_if_difficult);
+extern void SVDetachFV(FontView *fv);
+
+extern void MKDMakeActive(MathKernDlg *mkd,CharView *cv);
+extern void MKDChar(MathKernDlg *mkd, GdkEvent *event);
+extern void MKD_DoClose(struct cvcontainer *cvc);
+extern void MKDCharViewInits(MathKernDlg *mkd);
+extern void MathKernDialog(SplineChar *sc);
+
+extern void ShowAtt(SplineFont *sf);
+extern void FontCompareDlg(FontView *fv);
+extern void SFShowKernPairs(SplineFont *sf,SplineChar *sc,AnchorClass *ac);
+extern void SFShowLigatures(SplineFont *sf,SplineChar *sc);
+
+extern void SCEditInstructions(SplineChar *sc);
+extern void SFEditTable(SplineFont *sf, uint32 tag);
+extern void IIScrollTo(struct instrinfo *ii,int ip,int mark_stop);
+extern void IIReinit(struct instrinfo *ii,int ip);
+
+extern void CVGridFitChar(CharView *cv);
+extern void CVFtPpemDlg(CharView *cv,int debug);
+extern void SCDeGridFit(SplineChar *sc);
+
+extern void CVDebugReInit(CharView *cv,int restart_debug,int dbg_fpgm);
+extern void CVDebugFree(DebugView *dv);
+
+extern void KernClassD(KernClass *kc, SplineFont *sf, int isv);
+extern void ShowKernClasses(SplineFont *sf,MetricsView *mv,int isv);
+extern void KCLD_End(struct kernclasslistdlg *kcld);
+extern void KCLD_MvDetach(struct kernclasslistdlg *kcld,MetricsView *mv);
+extern void KernPairD(SplineFont *sf,SplineChar *sc1,SplineChar *sc2,int isv);
+
+extern void AnchorControl(SplineChar *sc,AnchorPoint *ap);
+extern void AnchorControlClass(SplineFont *_sf,AnchorClass *ac);
+
+extern void FVSelectByPST(FontView *fv);
+
+enum hist_type { hist_hstem, hist_vstem, hist_blues };
+struct psdict;
+extern void SFHistogram(SplineFont *sf,struct psdict *private,uint8 *selected,
+ EncMap *map, enum hist_type which);
+
+extern void CCD_Close(struct contextchaindlg *ccd);
+extern int CCD_NameListCheck(SplineFont *sf,const char *ret,int empty_bad,char *title);
+extern struct contextchaindlg *ContextChainEdit(SplineFont *sf,FPST *fpst,
+ struct gfi_data *gfi,unichar_t *newname);
+extern char *cu_copybetween(const unichar_t *start, const unichar_t *end);
+
+extern struct statemachinedlg *StateMachineEdit(SplineFont *sf,ASM *sm,struct gfi_data *d);
+extern void SMD_Close(struct statemachinedlg *smd);
+extern void GFI_FinishSMNew(struct gfi_data *d,ASM *sm, int success,int isnew);
+extern void GFI_SMDEnd(struct gfi_data *d);
+
+extern void MMChangeBlend(MMSet *mm,FontView *fv,int tonew);
+extern void MMWizard(MMSet *mm);
+
+extern int LayerDialog(Layer *layer);
+extern void CVLayerChange(CharView *cv);
+
+extern int PointOfViewDlg(struct pov_data *pov,SplineFont *sf,int flags);
+
+extern SplineChar *FVMakeChar(FontView *fv,int i);
+
+extern void CVPointOfView(CharView *cv,struct pov_data *);
+
+extern void DVCreateGloss(DebugView *dv);
+extern int CVXPos(DebugView *dv,int offset,int width);
+
+enum subtable_data_flags {
+ /* I have flags for each alternative because I want "unspecified" to be */
+ /* an option */
+ sdf_kernclass = 0x01,
+ sdf_kernpair = 0x02,
+ sdf_verticalkern = 0x04,
+ sdf_horizontalkern = 0x08,
+ sdf_dontedit = 0x10
+};
+struct subtable_data {
+ int flags;
+ SplineChar *sc;
+};
+
+extern struct lookup_subtable *SFNewLookupSubtableOfType(SplineFont *sf, int lookup_type, struct subtable_data *sd );
+extern int EditLookup(OTLookup *otl,int isgpos,SplineFont *sf);
+extern int EditSubtable(struct lookup_subtable *sub,int isgpos,SplineFont *sf,
+ struct subtable_data *sd);
+extern void _LookupSubtableContents(SplineFont *sf, struct lookup_subtable *sub,
+ struct subtable_data *sd);
+extern void FVMassGlyphRename(FontView *fv);
+
+extern void SFBdfProperties(SplineFont *sf, EncMap *map, BDFFont *thisone);
+
+
+
+extern BasePoint last_ruler_offset[];
+
+
+extern void MathInit(void);
+extern void SFMathDlg(SplineFont *sf);
+
+extern void SFValidationWindow(SplineFont *sf,enum fontformat format);
+extern void ValidationDestroy(SplineFont *sf);
+
+
+
+extern const char *UI_TTFNameIds(int id);
+extern const char *UI_MSLangString(int language);
+extern void FontInfoInit(void);
+extern void LookupUIInit(void);
+extern enum psstrokeflags Ps_StrokeFlagsDlg(void);
+extern struct cidmap *AskUserForCIDMap(void);
+
+extern void DefineGroups(struct fontview *fv);
+extern void DisplayGroups(struct fontview *fv);
+#endif /* _VIEWSGTK_H */
diff --git a/gtkui/windowmenu.c b/gtkui/windowmenu.c
new file mode 100644
index 00000000..6ddc10ff
--- /dev/null
+++ b/gtkui/windowmenu.c
@@ -0,0 +1,225 @@
+/* Copyright (C) 2000-2007 by George Williams */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+# include "fontforgegtk.h"
+# include <fontforge/gfile.h>
+# include <fontforge/splinefont.h>
+
+static void WindowSelect(GtkMenuItem *menuitem, gpointer user_data) {
+ GtkWidget *top = GTK_WIDGET( user_data );
+
+ gdk_window_show(top->window);
+}
+
+
+static void AddMI(GtkMenuShell *shell,GtkWidget *current, GtkWidget *cur,
+ char *name, int changed, int is_fontview) {
+ GtkWidget *mi;
+ char buffer[28];
+
+ sprintf( buffer, "%s%.20s %c", is_fontview ? "" : " ", name, changed ? '~' : ' ' );
+
+ if ( current==cur ) {
+ mi = gtk_check_menu_item_new_with_label(buffer);
+ gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(mi), TRUE );
+ } else
+ mi = gtk_menu_item_new_with_label(buffer);
+ gtk_widget_show (mi);
+ gtk_container_add (GTK_CONTAINER (shell), mi);
+ g_signal_connect ((gpointer) mi, "activate",
+ G_CALLBACK (WindowSelect),
+ (gpointer) cur);
+}
+
+void Menu_ActivateWindows(GtkMenuItem *menuitem, gpointer user_data) {
+ GtkWidget *current = gtk_widget_get_toplevel( GTK_WIDGET( menuitem ));
+ int i;
+ GList *sub;
+ GtkMenuShell *shell;
+ FontView *fv;
+ CharView *cv;
+ BDFFont *bdf;
+ MetricsView *mv;
+ BitmapView *bv;
+
+ if ( RecentFiles[0]==NULL )
+return;
+ shell = GTK_MENU_SHELL(gtk_menu_item_get_submenu( GTK_MENU_ITEM( menuitem )));
+
+ sub = gtk_container_get_children( GTK_CONTAINER( shell ));
+ while ( sub!=NULL ) {
+ gtk_container_remove( GTK_CONTAINER(shell), GTK_WIDGET( sub->data ));
+ sub = g_list_remove(sub, sub->data);
+ }
+
+ for ( fv = fv_list; fv!=NULL; fv = (FontView *) fv->b.next ) {
+ AddMI(shell,current, fv->gw,fv->b.sf->fontname, fv->b.sf->changed,true);
+ for ( i=0; i<fv->b.sf->glyphcnt; ++i ) if ( fv->b.sf->glyphs[i]!=NULL ) {
+ for ( cv = (CharView *) fv->b.sf->glyphs[i]->views; cv!=NULL; cv=(CharView *) cv->b.next )
+ AddMI(shell,current,cv->gw,cv->b.sc->name,cv->b.sc->changed,false);
+ }
+ for ( bdf= fv->b.sf->bitmaps; bdf!=NULL; bdf = bdf->next ) {
+ for ( i=0; i<bdf->glyphcnt; ++i ) if ( bdf->glyphs[i]!=NULL ) {
+ for ( bv = bdf->glyphs[i]->views; bv!=NULL; bv=bv->next )
+ AddMI(shell,current,bv->gw,fv->b.sf->glyphs[i]->name,
+ bv->bc->changed,false);
+ }
+ }
+ for ( mv=fv->b.sf->metrics; mv!=NULL; mv=mv->next )
+ AddMI(shell,current,mv->gw,"Metrics",false,false);
+ }
+}
+
+
+static void RecentSelect(GtkMenuItem *menuitem, gpointer user_data) {
+ ViewPostscriptFont((char *) (user_data));
+}
+
+void RecentMenuBuild(GtkMenuItem *menuitem, gpointer user_data) {
+ int i;
+ GList *sub;
+ GtkWidget *shell;
+ FontView *fv;
+
+ if ( RecentFiles[0]==NULL )
+return;
+ shell = gtk_menu_item_get_submenu( GTK_MENU_ITEM( menuitem ));
+ sub = gtk_container_get_children( GTK_CONTAINER( shell ));
+ while ( sub!=NULL ) {
+ gtk_container_remove( GTK_CONTAINER(shell), GTK_WIDGET( sub->data ));
+ sub = g_list_remove(sub, sub->data);
+ }
+
+ for ( i=0; i<RECENT_MAX && RecentFiles[i]!=NULL; ++i ) {
+ for ( fv=fv_list; fv!=NULL; fv=(FontView *) fv->b.next )
+ if ( fv->b.sf->filename!=NULL && strcmp(fv->b.sf->filename,RecentFiles[i])==0 )
+ break;
+ if ( fv==NULL ) {
+ GtkWidget *recent_mi = gtk_menu_item_new_with_label( GFileNameTail(RecentFiles[i]) );
+ gtk_widget_show (recent_mi);
+ gtk_container_add (GTK_CONTAINER (shell), recent_mi);
+ g_signal_connect ((gpointer) recent_mi, "activate",
+ G_CALLBACK (RecentSelect),
+ (gpointer) RecentFiles[i]);
+ }
+ }
+}
+
+int RecentFilesAny(void) {
+ int i;
+ FontViewBase *fvl;
+
+ for ( i=0; i<RECENT_MAX && RecentFiles[i]!=NULL; ++i ) {
+ for ( fvl=(FontViewBase *) fv_list; fvl!=NULL; fvl=fvl->next )
+ if ( fvl->sf->filename!=NULL && strcmp(fvl->sf->filename,RecentFiles[i])==0 )
+ break;
+ if ( fvl==NULL )
+return( true );
+ }
+return( false );
+}
+
+static void ScriptSelect(GtkMenuItem *menuitem, gpointer user_data) {
+ int index = (int) (user_data);
+ FontViewBase *fv = (FontViewBase *) g_object_get_data( \
+ G_OBJECT( gtk_widget_get_toplevel( GTK_WIDGET( menuitem ))),\
+ "data" );
+
+ /* the menu is not always up to date. If user changed prefs and then used */
+ /* Alt|Ctl|Digit s/he would not get a new menu built and the old one might*/
+ /* refer to something out of bounds. Hence the check */
+ if ( index<0 || script_filenames[index]==NULL )
+return;
+ ExecuteScriptFile(fv,NULL,script_filenames[index]);
+}
+
+void ScriptMenuBuild(GtkMenuItem *menuitem, gpointer user_data) {
+ int i;
+ GList *sub;
+ GtkMenuShell *shell;
+
+ if ( script_menu_names[0]==NULL )
+return;
+ shell = GTK_MENU_SHELL(gtk_menu_item_get_submenu( GTK_MENU_ITEM( menuitem )));
+
+ sub = gtk_container_get_children( GTK_CONTAINER( shell ));
+ while ( sub!=NULL ) {
+ gtk_container_remove( GTK_CONTAINER(shell), GTK_WIDGET( sub->data ));
+ sub = g_list_remove(sub, sub->data);
+ }
+
+ for ( i=0; i<SCRIPT_MENU_MAX && script_menu_names[i]!=NULL; ++i ) {
+ GtkWidget *script_mi = gtk_menu_item_new_with_label( script_menu_names[i] );
+ gtk_widget_show (script_mi);
+ gtk_container_add (GTK_CONTAINER (shell), script_mi);
+ g_signal_connect ((gpointer) script_mi, "activate",
+ G_CALLBACK (ScriptSelect),
+ (gpointer) i);
+/* Not sure how to get the accelerator group of the menu */
+/* gtk_widget_add_accelerator (script_mi, "activate", accel_group, */
+/* i==9? '0' : '1'+i, GDK_CONTROL_MASK|GDK_MOD1_MASK, */
+/* GTK_ACCEL_VISIBLE); */
+
+ }
+}
+
+/* Builds up a menu containing all the anchor classes */
+void _aplistbuild(GtkMenuItem *menuitem,SplineFont *sf,
+ void (*func)(GtkMenuItem *menuitem, gpointer user_data)) {
+ AnchorClass *ac;
+ GList *sub;
+ GtkWidget *shell;
+ GtkWidget *w;
+
+ shell = gtk_menu_item_get_submenu( GTK_MENU_ITEM( menuitem ));
+
+ sub = gtk_container_get_children( GTK_CONTAINER( shell ));
+ while ( sub!=NULL ) {
+ gtk_container_remove( GTK_CONTAINER(shell), GTK_WIDGET( sub->data ));
+ sub = g_list_remove(sub, sub->data);
+ }
+
+ w = gtk_menu_item_new_with_label( _("All") );
+ gtk_widget_show (w);
+ gtk_container_add (GTK_CONTAINER (shell), w);
+ g_signal_connect ((gpointer) w, "activate",
+ G_CALLBACK (func),
+ (gpointer) (void *) (-1));
+ if ( sf->anchor!=NULL ) {
+ w = gtk_separator_menu_item_new( );
+ gtk_widget_show (w);
+ gtk_container_add (GTK_CONTAINER (shell), w);
+ for ( ac=sf->anchor; ac!=NULL; ac = ac->next ) {
+ w = gtk_menu_item_new_with_label( ac->name );
+ gtk_widget_show (w);
+ gtk_container_add (GTK_CONTAINER (shell), w);
+ g_signal_connect ((gpointer) w, "activate",
+ G_CALLBACK (func),
+ (gpointer) ac);
+ }
+ } else
+ gtk_widget_set_sensitive(w,false);
+}