API Reference for Enthought Tool Suite 2.7.1
Trait definition for a wxPython-based Kiva font.
fh = TraitKivaFont()
Mapping of strings to valid Kiva font families
font_families = { Const('default') : Name('DEFAULT'), Const('decorative') : Name('DECORATIVE'), Const('roman') : Name('ROMAN'), Const('script') : Name('SCRIPT'), Const('swiss') : Name('SWISS'), Const('modern') : Name('MODERN') }
Strings to ignore in text representations of fonts
font_noise = [ 'pt', 'point', 'family' ]
Mapping of strings to Kiva font styles
font_styles = { Const('italic') : Name('ITALIC') }
Mapping of strings to Kiva font weights
font_weights = { Const('bold') : Name('BOLD') }
KivaFont = TraitFactory(KivaFontFunc)
KivaFontTrait = Trait(fh.validate(None, None, 'modern 12'), fh, editor = KivaFontEditor)
Returns a trait whose value must be a GUI toolkit-specific font.
For wxPython, the returned trait accepts any of the following:
For wxPython, 'Arial 10'
| Local name | Refers to |
|---|---|
| BOLD | enthought.kiva.constants.BOLD |
| DECORATIVE | enthought.kiva.constants.DECORATIVE |
| DEFAULT | enthought.kiva.constants.DEFAULT |
| Font | enthought.kiva.fonttools.font.Font |
| ITALIC | enthought.kiva.constants.ITALIC |
| KivaFontEditor | enthought.kiva.traits.ui.wx.kiva_font_editor.KivaFontEditor |
| MODERN | enthought.kiva.constants.MODERN |
| NORMAL | enthought.kiva.constants.NORMAL |
| ROMAN | enthought.kiva.constants.ROMAN |
| SCRIPT | enthought.kiva.constants.SCRIPT |
| SWISS | enthought.kiva.constants.SWISS |
| Trait | enthought.traits.traits.Trait |
| TraitError | enthought.traits.trait_errors.TraitError |
| TraitFactory | enthought.traits.traits.TraitFactory |
| TraitHandler | enthought.traits.trait_handlers.TraitHandler |
Copyright © 2002-2008 Enthought, Inc.