Show
Ignore:
Timestamp:
10/10/08 07:40:38 (3 months ago)
Author:
tal
Message:
Version 1.0.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • applicationScripts/FontLab/UFO/UFOCentral.py

    r273 r276  
    11# FLM: UFO Central 
    2 """Export and import UFOs with metadata. Version 0.6.1 beta""" 
     2"""Export and import UFOs. Version 1.0""" 
     3 
     4help = """ 
     5UFO Central 
     6Version 1.0 
     7 
     8This script gives you fine-grained control over 
     9importing and exporting UFO data. 
     10 
     11Import 
     12------ 
     13 
     14Select UFOs 
     15Select the UFOs you wish to import data from. 
     16You can select a directory and all UFOs from 
     17the directory will be imported. 
     18 
     19Save After Importing 
     20Check to save the VFB files after importing. 
     21 
     22Close After Importing 
     23Check to close the VFBs after importing. 
     24 
     25 
     26Export 
     27------ 
     28 
     29Current Font 
     30Check to export data from the current font. 
     31 
     32All Open Fonts 
     33Check to export data from all open fonts. 
     34 
     35 
     36File Options 
     37------------ 
     38 
     39Make New Files 
     40Check to write new UFO or VFB files. The file name 
     41will be same as the file being exported or imported 
     42except that it will have a different file suffix. 
     43If that file name already exists, a date stamp will 
     44be added to the file name. 
     45 
     46Write Into Existing Files 
     47Check to write data into existing UFO or VFB files. 
     48The file name will be exported or imported except 
     49that it will have a different file suffix. 
     50 
     51 
     52Data Options 
     53------------ 
     54 
     55Font Info 
     56Check to read/write font info data. 
     57 
     58Kerning 
     59Check to read/write kerning data. 
     60 
     61Groups 
     62Check to read/write group data. 
     63 
     64Lib 
     65Check to read/write font lib data. 
     66 
     67Hints 
     68Check to read/write hint data. 
     69 
     70Glyphs 
     71This button brings up a dialog that will allow 
     72you to select which glyphs should be exported 
     73or imported. 
     74 
     75Glyph Marks 
     76Check to read/write glyph marks. 
     77 
     78Glyph Masks 
     79Check to read/write glyph masks. 
     80""".strip() 
     81 
    382 
    483import os 
     
    23102# --------- 
    24103 
     104class HelpDialog(object): 
     105 
     106    def __init__(self): 
     107        self.w = dialogKit.ModalDialog((390, 500), "UFO Central Help") 
     108        self.w.help = dialogKit.List((12, 12, -12, -60), help.splitlines()) 
     109        self.w.open() 
     110 
     111 
    25112class MainDialog(object): 
    26113 
     
    61148        self.w.doGlyphMarksCheckBox = dialogKit.CheckBox((435, 162, -12, 20), "Glyph Marks") 
    62149        self.w.doGlyphMasksCheckBox = dialogKit.CheckBox((435, 185, -12, 20), "Glyph Masks") 
     150 
     151        self.w.helpButton = dialogKit.Button((12, -32, 70, 20), "Help", callback=self.showHelpCallback) 
    63152 
    64153        self.w.open() 
     
    104193        else: 
    105194            self.w.destinationNewFilesCheckBox.set(not sender.get()) 
     195 
     196    def showHelpCallback(self, sender): 
     197        HelpDialog() 
    106198 
    107199    # ------