Module Font
[hide private]
[frames] | no frames]

Source Code for Module Font

 1  # Blender.Text3d.Font module and the Font PyType object 
 2   
 3  """ 
 4  The Blender.Text3d.Font subsubmodule. 
 5   
 6  Text3d.Font Objects 
 7  =================== 
 8   
 9  This module provides access to B{Font} objects in Blender. 
10   
11  Example:: 
12          import Blender 
13          from Blender import Text3d 
14           
15          # Load a font 
16          myfont= Text3d.Font.Load('/usr/share/fonts/ttf/verdana.ttf') 
17           
18          #  
19          for font in Text3d.Font.Get(): 
20                  print font.name, font.filename, font.packed 
21  """ 
22   
23 -def Load (filename):
24 """ 25 Create a new Text3d.Font object. 26 @type filename: string 27 @param filename: file of the font 28 @rtype: Blender Text3d.Font 29 @return: The created Text3d.Font Data object. 30 """
31
32 -def Get (name = None):
33 """ 34 Get the Text3d.Font object(s) from Blender. 35 @type name: string 36 @param name: The name of the Text3d object. 37 @rtype: Blender Text3d or a list of Blender Text3ds 38 @return: It depends on the 'name' parameter: 39 - (name): The Text3d object with the given name; 40 - (): A list with all Font objects in the current .blend file. 41 """
42 -class Font:
43 """ 44 The Text3d.Font object 45 ====================== 46 This object gives access Blender's B{Font} objects 47 @ivar filename: The filename (path) of the file loaded into this Font. 48 @type filename: string 49 @ivar packed: Boolean, True when the sample is packed (readonly). 50 @type packed: string 51 """ 52
53 - def pack():
54 """ 55 Packs the font into the current blend file. 56 @note: 57 @returns: nothing 58 @rtype: none 59 """
60
61 - def unpack(mode):
62 """ 63 Unpacks the font. 64 @param mode: One of the values in Blender.UnpackModes dict. 65 @note: An error will be raised if the font is not packed or the filename path does not exist. 66 @returns: nothing 67 @rtype: none 68 @type mode: int 69 """
70