geepillow.fonts#

Fonts module.

Attributes#

Functions#

create(font, size)

Create a font.

load_data(filename)

Load binary data from filename.

load_ttf(filename, size)

Load a Font from a file.

opensans_bold(size)

OpenSans-Bold.

opensans_bold_italic(size)

OpenSans-BoldItalic.

opensans_italic(size)

OpenSans-Italic.

opensans_light(size)

OpenSans-Light.

opensans_regular(size)

OpenSans-Regular.

provided(size)

Get font from URL.

Package Contents#

geepillow.fonts.create(font, size)[source]#

Create a font.

Parameters:
  • font (str | PIL.ImageFont.ImageFont | pathlib.Path)

  • size (float)

Return type:

PIL.ImageFont.ImageFont | PIL.ImageFont.FreeTypeFont | PIL.ImageFont.TransposedFont

geepillow.fonts.load_data(filename)[source]#

Load binary data from filename.

Parameters:

filename (pathlib.Path)

geepillow.fonts.load_ttf(filename, size)[source]#

Load a Font from a file.

Parameters:
  • filename (pathlib.Path) – path of the font. If absolute path it will load it directly, if relative it will load one of the available in the package.

  • size (float) – size of the

Return type:

PIL.ImageFont.FreeTypeFont

geepillow.fonts.opensans_bold(size)[source]#

OpenSans-Bold.

Parameters:

size (int)

Return type:

PIL.ImageFont.FreeTypeFont

geepillow.fonts.opensans_bold_italic(size)[source]#

OpenSans-BoldItalic.

Parameters:

size (int)

Return type:

PIL.ImageFont.FreeTypeFont

geepillow.fonts.opensans_italic(size)[source]#

OpenSans-Italic.

Parameters:

size (int)

Return type:

PIL.ImageFont.FreeTypeFont

geepillow.fonts.opensans_light(size)[source]#

OpenSans-Light.

Parameters:

size (int)

Return type:

PIL.ImageFont.FreeTypeFont

geepillow.fonts.opensans_regular(size)[source]#

OpenSans-Regular.

Parameters:

size (int)

Return type:

PIL.ImageFont.FreeTypeFont

geepillow.fonts.provided(size)[source]#

Get font from URL.

Return type:

PIL.ImageFont.FreeTypeFont

geepillow.fonts.URL_FONT = 'http://db.onlinewebfonts.com/t/8050e6017c3b848b20a6324507cfba88.ttf'[source]#