Пример #1
0
    def __init__(self, FPath='./',FName='Arial.ttf', String=None, 
                 Height=10, Track=0):
        self.FTFont = FontUtils.initFreeType(FPath, FName)
        self.String = String
        self.Height = Height                  # FC units
        self.Tracking = Track                 # FC units
        self.Scale = FontUtils.getUniformScale(self.FTFont, self.Height) 
# attributes we may need later
#        self.FType = (FName.split('.')[-1])).upper()
#        self.Position = (0,0,0)
#        self.Plane = (0,0,1)
#        self.Shape = None
        if DEBUG:
            print "TextShape Parms"
            print "Font Path: ", FPath
            print "Font Name: ", FName
            print "String: ", String
            print "Height: ", Height
            print "Track: ", Track
            print "Scale: ", self.Scale