equal
deleted
inserted
replaced
652 else: |
652 else: |
653 font = Font(fontName, fontName, defaultEncoding) |
653 font = Font(fontName, fontName, defaultEncoding) |
654 registerFont(font) |
654 registerFont(font) |
655 return font |
655 return font |
656 |
656 |
|
657 def getAscentDescent(fontName): |
|
658 font = getFont(fontName) |
|
659 try: |
|
660 return font.ascent,font.descent |
|
661 except: |
|
662 return font.face.ascent,font.face.descent |
|
663 |
|
664 def getAscent(fontName): |
|
665 return getAscentDescent(fontName)[0] |
|
666 |
|
667 def getDescent(fontName): |
|
668 return getAscentDescent(fontName)[1] |
|
669 |
657 def getRegisteredFontNames(): |
670 def getRegisteredFontNames(): |
658 "Returns what's in there" |
671 "Returns what's in there" |
659 reg = _fonts.keys() |
672 reg = _fonts.keys() |
660 reg.sort() |
673 reg.sort() |
661 return reg |
674 return reg |