Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(197)  |  Call(181)  |  Derive(0)  |  Import(16)

        def getAscentDescent(fontName,fontSize=None):
    font = getFont(fontName)
    try:
        ascent = font.ascent
        descent = font.descent
    except:
        ascent = font.face.ascent
        descent = font.face.descent
    if fontSize:
        norm = fontSize/1000.
        return ascent*norm, descent*norm
    else:
        return ascent, descent
        


src/d/j/django-admin-report-HEAD/example/lib/sx/pisa3/reportlab_paragraph.py   django-admin-report(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(cbDefn.height,cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/d/j/django-admin-report-HEAD/example/lib/reportlab/platypus/paragraph.py   django-admin-report(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(imgNormV(cbDefn.height,fontSize),cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/m/w/mwlib.ext-0.13.2/upstream-src/src/reportlab/platypus/paragraph.py   mwlib.ext(Download)
from types import StringType, ListType
from unicodedata import category
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(imgNormV(cbDefn.height,fontSize),cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            if hasattr(f,'text'):
                text = strip(f.text)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/r/e/reportlab-3.1.8/src/reportlab/platypus/paragraph.py   reportlab(Download)
from operator import truth
from unicodedata import category
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(imgNormV(cbDefn.height,fontSize),cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            if hasattr(f,'text'):
                text = strip(f.text)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/w/e/web2py-appreport-HEAD/modules/plugin_appreport/libs/appreport/libs/pisa/xhtml2pdf/sx/pisa3/reportlab_paragraph.py   web2py-appreport(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(cbDefn.height,cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/r/e/ReportLab-HEAD/src/reportlab/platypus/paragraph.py   ReportLab(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(imgNormV(cbDefn.height,fontSize),cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/i/e/iellos-HEAD/lib/sx/pisa3/reportlab_paragraph.py   iellos(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(cbDefn.height,cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/i/e/iellos-HEAD/lib/reportlab/platypus/paragraph.py   iellos(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(imgNormV(cbDefn.height,fontSize),cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/w/m/wms-HEAD/sx/pisa3/reportlab_paragraph.py   wms(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(cbDefn.height,cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

src/w/m/wms-HEAD/reportlab/platypus/paragraph.py   wms(Download)
from operator import truth
from types import StringType, ListType
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paraparser import ParaParser
from reportlab.platypus.flowables import Flowable
                descent, ascent = imgVRange(cbDefn.height,cbDefn.valign,fontSize)
            else:
                ascent, descent = getAscentDescent(f.fontName,fontSize)
        else:
            ascent, descent = getAscentDescent(f.fontName,fontSize)
            fontSize = f.fontSize
            fontName = f.fontName
            ascent, descent = getAscentDescent(fontName,fontSize)
            words = hasattr(f,'text') and split(f.text, ' ') or f.words
            spaceWidth = stringWidth(' ', fontName, fontSize, self.encoding)
                    currentWidth = -spaceWidth   # hack to get around extra space for word 1
                    maxSize = fontSize
                    maxAscent, minDescent = getAscentDescent(fontName,fontSize)
 
                wordWidth = w[0]

  1 | 2  Next