fontforge/fontforge — pull request #22 by monkeyiq (2012-08-21 15:56:32+00:00)
Title: Workshop2012saveas: When saving, force a .sfd or .sfdir extension

Because a user might be new to fontforge, they might mistakenly use the save or save as menu option to try to create a font file like a ttf. This patch forces a valid extension in the save/save as dialog so that the file will not mistakenly be produced as .otf, .ttf etc.

The core of the patch is the new GFileChooserInputFilenameFuncType function which can optionally be set to alter the filename that is input as the user types it.

A new string function that might be interesting is u_copynallocm() which copies the first n characters but allocates m characters in the new string. Handy for copy(), concat(), use(), free() types scenarios.