<commit_before>#Pyjsdl - Copyright (C) 2013 <NAME> <http://gatc.ca/>
#Released under the MIT License <http://opensource.org/licenses/MIT>

#from __future__ import division
from math import ceil as _ceil
from pyjsdl.surface import Surface
from pyjsdl.color import Color
from pyjsdl.pyjsobj import HTML5Canvas

__docformat__ = 'restructuredtext'


_initialized = False
_surf = None


def init():
    """
    **pyjsdl.font.init**
    
    Initialize font module.
    """
    global _surf, _initialized, match_font
    if _initialized:
        return
    try:
        _surf = HTML5Canvas(1,1)
        _surf.measureText('x')
    except:
        _surf = None
    _initialized = True
init()


def quit():
    """
    **pyjsdl.font.quit**
    
    Unintialize font module.
    """
    global _surf, _initialized
    _surf = None
    _initialized = False


def get_init():
    """
    **pyjsdl.font.get_init**
    
    Check if font module is initialized.
    """
    return _initialized


def get_default_font():
    """
    **pyjs2d.font.get_default_font**<commit_msg>update documentation<commit_after>#Pyjsdl - Copyright (C) 2013 <NAME> <http://gatc.ca/>
#Released under the MIT License <http://opensource.org/licenses/MIT>

#from __future__ import division
from math import ceil as _ceil
from pyjsdl.surface import Surface
from pyjsdl.color import Color
from pyjsdl.pyjsobj import HTML5Canvas

__docformat__ = 'restructuredtext'


_initialized = False
_surf = None


def init():
    """
    **pyjsdl.font.init**
    
    Initialize font module.
    """
    global _surf, _initialized, match_font
    if _initialized:
        return
    try:
        _surf = HTML5Canvas(1,1)
        _surf.measureText('x')
    except:
        _surf = None
    _initialized = True
init()


def quit():
    """
    **pyjsdl.font.quit**
    
    Unintialize font module.
    """
    global _surf, _initialized
    _surf = None
    _initialized = False


def get_init():
    """
    **pyjsdl.font.get_init**
    
    Check if font module is initialized.
    """
    return _initialized


def get_default_font():
    """
    **pyjsdl.font.get_default_font**
{'fraction_non_alphanumeric': 0.10803193987787693, 'fraction_numerical': 0.007984969469234382, 'mean_word_length': 2.776595744680851, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5148110', 'n_tokens_mistral': 721, 'n_tokens_neox': 714, 'n_words': 180}