Changeset 175 for trunk/pycha/chart.py

Show
Ignore:
Timestamp:
03/21/09 08:19:39 (17 months ago)
Author:
lgs
Message:

Allow to specify the font of the ticks. Based on a patch by ged_AT_openhex.org. Fixes #26

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pycha/chart.py

    r173 r175  
    350350        cx.stroke() 
    351351 
     352        cx.select_font_face(self.options.axis.tickFont, 
     353                            cairo.FONT_SLANT_NORMAL, 
     354                            cairo.FONT_WEIGHT_NORMAL) 
     355        cx.set_font_size(self.options.axis.tickFontSize) 
     356 
    352357        label = unicode(tick[1]) 
    353358        extents = cx.text_extents(label) 
     
    384389        cx.close_path() 
    385390        cx.stroke() 
     391 
     392        cx.select_font_face(self.options.axis.tickFont, 
     393                            cairo.FONT_SLANT_NORMAL, 
     394                            cairo.FONT_WEIGHT_NORMAL) 
     395        cx.set_font_size(self.options.axis.tickFontSize) 
    386396 
    387397        label = unicode(tick[1]) 
     
    638648        labelFontSize=9, 
    639649        labelWidth=50.0, 
     650        tickFont='Tahoma', 
     651        tickFontSize=9, 
    640652        x=Option( 
    641653            hide=False,