common.font#

Defines FontDatabase, a utility class used to load and store fonts used by Bookmarks.

The FontDatabase instance is saved at bookmarks.common.font_db. QFont and QFontMetrics instances can be retrieved using:

1from bookmarks import common
2font, metrics = common.font_db.bold_font(common.size(common.size_font_small))

Classes:

FontDatabase([parent])

Custom QFontDatabase used to load and provide the fonts needed by Bookmarks.

Functions:

init_font()

Initializes the font cache and database.

class bookmarks.common.font.FontDatabase(parent=None)[source]#

Bases: QFontDatabase

Custom QFontDatabase used to load and provide the fonts needed by Bookmarks.

Methods:

add_custom_fonts()

Load the fonts used by Bookmarks to the font database.

bold_font(font_size)

The primary font used by the application.

light_font(font_size)

The secondary font used by the application.

medium_font(font_size)

The secondary font used by the application.

add_custom_fonts()[source]#

Load the fonts used by Bookmarks to the font database.

bold_font(font_size)[source]#

The primary font used by the application.

light_font(font_size)[source]#

The secondary font used by the application.

medium_font(font_size)[source]#

The secondary font used by the application.

bookmarks.common.font.init_font()[source]#

Initializes the font cache and database.