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

All Samples(33)  |  Call(19)  |  Derive(0)  |  Import(14)

        def registerFontFamily(family,normal=None,bold=None,italic=None,boldItalic=None):
    from reportlab.lib import fonts
    if not normal: normal = family
    family = family.lower()
    if not boldItalic: boldItalic = italic or bold or normal
    if not bold: bold = normal
    if not italic: italic = normal
    fonts.addMapping(family, 0, 0, normal)
    fonts.addMapping(family, 1, 0, bold)
    fonts.addMapping(family, 0, 1, italic)
    fonts.addMapping(family, 1, 1, boldItalic)
        


src/p/y/pyth-0.5.6/examples/writing/pdf.py   pyth(Download)
 
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.pdfbase.pdfmetrics import registerFont, registerFontFamily
from reportlab.pdfbase.ttfonts import TTFont
 
registerFont(TTFont('TimesTTF', fontfile % ""))
registerFont(TTFont('TimesTTF_B', fontfile % "_Bold"))
registerFont(TTFont('TimesTTF_I', fontfile % "_Italic"))
registerFont(TTFont('TimesTTF_BI', fontfile % "_Bold_Italic"))
registerFontFamily("TimesTTF", normal="TimesTTF", bold="TimesTTF_B", italic="TimesTTF_I", boldItalic="TimesTTF_BI")

src/p/y/pyth-HEAD/examples/writing/pdf.py   pyth(Download)
 
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.pdfbase.pdfmetrics import registerFont, registerFontFamily
from reportlab.pdfbase.ttfonts import TTFont
 
registerFont(TTFont('TimesTTF', fontfile % ""))
registerFont(TTFont('TimesTTF_B', fontfile % "_Bold"))
registerFont(TTFont('TimesTTF_I', fontfile % "_Italic"))
registerFont(TTFont('TimesTTF_BI', fontfile % "_Bold_Italic"))
registerFontFamily("TimesTTF", normal="TimesTTF", bold="TimesTTF_B", italic="TimesTTF_I", boldItalic="TimesTTF_BI")

src/m/w/mwlib.ext-0.13.2/upstream-src/docs/userguide/genuserguide.py   mwlib.ext(Download)
    G = {}
    sys.path.insert(0,topDir)
    from reportlab.pdfbase.pdfmetrics import registerFontFamily
    from reportlab.pdfbase import pdfmetrics
    from reportlab.pdfbase.ttfonts import TTFont
    pdfmetrics.registerFont(TTFont('Vera', 'Vera.ttf'))
    pdfmetrics.registerFont(TTFont('VeraBd', 'VeraBd.ttf'))
    pdfmetrics.registerFont(TTFont('VeraIt', 'VeraIt.ttf'))
    pdfmetrics.registerFont(TTFont('VeraBI', 'VeraBI.ttf'))
    registerFontFamily('Vera',normal='Vera',bold='VeraBd',italic='VeraIt',boldItalic='VeraBI')

src/r/e/reportlab-3.1.8/docs/userguide/genuserguide.py   reportlab(Download)
    G = {}
    sys.path.insert(0,topDir)
    from reportlab.pdfbase.pdfmetrics import registerFontFamily
    from reportlab.pdfbase import pdfmetrics
    from reportlab.pdfbase.ttfonts import TTFont
    pdfmetrics.registerFont(TTFont('Vera', 'Vera.ttf'))
    pdfmetrics.registerFont(TTFont('VeraBd', 'VeraBd.ttf'))
    pdfmetrics.registerFont(TTFont('VeraIt', 'VeraIt.ttf'))
    pdfmetrics.registerFont(TTFont('VeraBI', 'VeraBI.ttf'))
    registerFontFamily('Vera',normal='Vera',bold='VeraBd',italic='VeraIt',boldItalic='VeraBI')

src/r/e/ReportLab-HEAD/docs/userguide/genuserguide.py   ReportLab(Download)
    G = {}
    sys.path.insert(0,topDir)
    from reportlab.pdfbase.pdfmetrics import registerFontFamily
    from reportlab.pdfbase import pdfmetrics
    from reportlab.pdfbase.ttfonts import TTFont
    pdfmetrics.registerFont(TTFont('Vera', 'Vera.ttf'))
    pdfmetrics.registerFont(TTFont('VeraBd', 'VeraBd.ttf'))
    pdfmetrics.registerFont(TTFont('VeraIt', 'VeraIt.ttf'))
    pdfmetrics.registerFont(TTFont('VeraBI', 'VeraBI.ttf'))
    registerFontFamily('Vera',normal='Vera',bold='VeraBd',italic='VeraIt',boldItalic='VeraBI')

src/m/w/mwlib.ext-0.13.2/upstream-src/docs/userguide/ch2a_fonts.py   mwlib.ext(Download)
from reportlab.lib.styles import ParagraphStyle
 
from reportlab.pdfbase.pdfmetrics import registerFontFamily
registerFontFamily('Vera',normal='Vera',bold='VeraBd',italic='VeraIt',boldItalic='VeraBI')
 

src/r/e/reportlab-3.1.8/docs/userguide/ch2a_fonts.py   reportlab(Download)
from reportlab.lib.styles import ParagraphStyle
 
from reportlab.pdfbase.pdfmetrics import registerFontFamily
registerFontFamily('Vera',normal='Vera',bold='VeraBd',italic='VeraIt',boldItalic='VeraBI')
 

src/r/e/ReportLab-HEAD/docs/userguide/ch2a_fonts.py   ReportLab(Download)
from reportlab.lib.styles import ParagraphStyle
 
from reportlab.pdfbase.pdfmetrics import registerFontFamily
registerFontFamily('Vera',normal='Vera',bold='VeraBd',italic='VeraIt',boldItalic='VeraBI')
 

src/c/h/cheshire3-1.1.2/cheshire3/formats/documentFactory.py   cheshire3(Download)
reportlab.rl_config.warnOnMissingFontGlyphs = 0
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.pdfmetrics import registerFontFamily
from reportlab.pdfbase.ttfonts import TTFont
 
            pdfmetrics.registerFont(TTFont(self.italictag, self.ttfontItalic))
            pdfmetrics.registerFont(TTFont(self.bolditalictag, self.ttfontBoldItalic))               
            registerFontFamily(self.normaltag,normal=self.normaltag,bold=self.boldtag,italic=self.italictag,boldItalic=self.bolditalictag)
            ParagraphStyle.fontName = self.normaltag
        else:

src/c/h/cheshire3-HEAD/cheshire3/formats/documentFactory.py   cheshire3(Download)
reportlab.rl_config.warnOnMissingFontGlyphs = 0
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.pdfmetrics import registerFontFamily
from reportlab.pdfbase.ttfonts import TTFont
 
            pdfmetrics.registerFont(TTFont(self.italictag, self.ttfontItalic))
            pdfmetrics.registerFont(TTFont(self.bolditalictag, self.ttfontBoldItalic))               
            registerFontFamily(self.normaltag,normal=self.normaltag,bold=self.boldtag,italic=self.italictag,boldItalic=self.bolditalictag)
            ParagraphStyle.fontName = self.normaltag
        else:

  1 | 2  Next