# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2016 Continuum Analytics, Inc.
#
# May be copied and distributed freely only as part of an Anaconda or
# Miniconda installation.
# -----------------------------------------------------------------------------
"""Custom Fonts."""

# Standard library imports
from __future__ import absolute_import, division, print_function
import glob
import os

# Third party imports
from qtpy.QtGui import QFontDatabase


PATH = os.path.dirname(os.path.realpath(__file__))
FONTFILES = glob.glob(os.path.join(PATH, '*.ttf'))


def load_fonts(app):
    """Load custom fonts."""
    app.database = QFontDatabase()
    for font in FONTFILES:
        app.database.addApplicationFont(font)
