diff --git a/Lib/fontgoggles/mac/fontList.py b/Lib/fontgoggles/mac/fontList.py index 4cc23890..36251909 100644 --- a/Lib/fontgoggles/mac/fontList.py +++ b/Lib/fontgoggles/mac/fontList.py @@ -36,6 +36,14 @@ fontItemMaximumSize = 1500 +supportedFormatsString = """ +Supported formats: +• .designspace, .ufo, .ufoz +• .ttf, .otf, .woff, .woff2, .ttx +• .ttc, .otc +""" + + def makeUndoProxy(model, changeMonitor=None): um = UndoManager(changeMonitor) return um.setModel(model) @@ -322,10 +330,28 @@ def setupFontItems(self): def setupDropFontsPlaceholder(self): color = AppKit.NSColor.systemGrayColor() - color = color.blendedColorWithFraction_ofColor_(0.5, AppKit.NSColor.textBackgroundColor()) - self.dropFontsPlaceHolder = UnclickableTextBox((10, 10, -10, -10), - "Drop some fonts here!", fontSize=24, - textColor=color) + + attrs = { + AppKit.NSForegroundColorAttributeName: color, + AppKit.NSFontAttributeName: AppKit.NSFont.systemFontOfSize_(24), + } + header = AppKit.NSAttributedString.alloc().initWithString_attributes_( + "Drop some fonts here!\n", + attrs, + ) + attrs[AppKit.NSFontAttributeName] = AppKit.NSFont.systemFontOfSize_(16) + info = AppKit.NSAttributedString.alloc().initWithString_attributes_( + supportedFormatsString, + attrs, + ) + text = AppKit.NSMutableAttributedString.alloc().init() + text.appendAttributedString_(header) + text.appendAttributedString_(info) + + self.dropFontsPlaceHolder = UnclickableTextBox( + (10, 10, -10, -10), "", fontSize=22, textColor=color + ) + self.dropFontsPlaceHolder._nsObject.setAttributedStringValue_(text) @property def width(self):