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

All Samples(379)  |  Call(285)  |  Derive(0)  |  Import(94)
Represents a TrueType font.

Its encoding is always UTF-8.

Note: you cannot use the same TTFont object for different documents
at the same time.

Example of usage:

    font = ttfonts.TTFont('PostScriptFontName', '/path/to/font.ttf')(more...)

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/testshapes.py   django-admin-report(Download)
def _setup():
    from reportlab.pdfbase import pdfmetrics, ttfonts
    pdfmetrics.registerFont(ttfonts.TTFont("Vera", "Vera.ttf"))
    pdfmetrics.registerFont(ttfonts.TTFont("VeraBd", "VeraBd.ttf"))
    pdfmetrics.registerFont(ttfonts.TTFont("VeraIt", "VeraIt.ttf"))
    pdfmetrics.registerFont(ttfonts.TTFont("VeraBI", "VeraBI.ttf"))
                if os.path.isfile(fn):
                    try:
                        f = ttfonts.TTFont(name, fn)
                        pdfmetrics.registerFont(f)
                        F.append(name)

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"))

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"))

src/d/j/django-admin-report-HEAD/example/lib/sx/pisa3/pisa_context.py   django-admin-report(Download)
 
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.fonts import addMapping
 
                        # Register TTF font and special name 
                        filename = file.getNamedFile()
                        pdfmetrics.registerFont(TTFont(fullFontName, filename))
 
                        # Add or replace missing styles

src/b/l/blockdiag-1.3.3/_build/lib/blockdiag/imagedraw/pdf.py   blockdiag(Download)
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from blockdiag.imagedraw import base
from blockdiag.imagedraw.utils import cached
            path, index = parse_fontpath(font.path)
            if index:
                ttfont = TTFont(font.path, path, subfontIndex=index)
            else:
                ttfont = TTFont(font.path, path)

src/b/l/blockdiag-1.3.3/src/blockdiag/imagedraw/pdf.py   blockdiag(Download)
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from blockdiag.imagedraw import base
from blockdiag.imagedraw.utils import cached
            path, index = parse_fontpath(font.path)
            if index:
                ttfont = TTFont(font.path, path, subfontIndex=index)
            else:
                ttfont = TTFont(font.path, path)

src/m/w/mwlib.ext-0.13.2/upstream-src/tools/pythonpoint/styles/htu.py   mwlib.ext(Download)
     Image, Table, TableStyle, Spacer
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
 
 
    """
 
    pdfmetrics.registerFont(TTFont('Verdana','verdana.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-Bold','verdanab.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-Italic','verdanai.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-BoldItalic','verdanaz.ttf'))

src/i/n/indico-HEAD/indico/MaKaC/PDFinterface/base.py   indico(Download)
from reportlab.lib.pagesizes import landscape, A4, LETTER, A0, A1, A2, A3, A5
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.fonts import addMapping
from MaKaC.i18n import _
 
        dir=os.path.split(os.path.abspath(indico.extra.fonts.__file__))[0]
        pdfmetrics.registerFont(TTFont('Times-Roman', os.path.join(dir,'LiberationSerif-Regular.ttf')))
        pdfmetrics.registerFont(TTFont('Times-Bold', os.path.join(dir, 'LiberationSerif-Bold.ttf')))
        pdfmetrics.registerFont(TTFont('Times-Italic', os.path.join(dir,'LiberationSerif-Italic.ttf')))
        pdfmetrics.registerFont(TTFont('Times-Bold-Italic', os.path.join(dir, 'LiberationSerif-BoldItalic.ttf')))

src/r/e/reportlab-3.1.8/tools/pythonpoint/styles/htu.py   reportlab(Download)
     Image, Table, TableStyle, Spacer
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
 
 
    """
 
    pdfmetrics.registerFont(TTFont('Verdana','verdana.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-Bold','verdanab.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-Italic','verdanai.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-BoldItalic','verdanaz.ttf'))

src/r/e/ReportLab-HEAD/tools/pythonpoint/styles/htu.py   ReportLab(Download)
     Image, Table, TableStyle, Spacer
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
 
 
    """
 
    pdfmetrics.registerFont(TTFont('Verdana','verdana.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-Bold','verdanab.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-Italic','verdanai.ttf'))
    pdfmetrics.registerFont(TTFont('Verdana-BoldItalic','verdanaz.ttf'))

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next