'Scan the file system and register the result in database'

def _scan_disk(self):

    found_fonts = []
    for font_path in customfonts.list_all_sysfonts():
        try:
            font = ttfonts.TTFontFile(font_path)
            _logger.debug('Found    font    %s    at    %s', font.name, font_path)
            found_fonts.append((font.familyName, font.name, font_path, font.styleName))
        except Exception as ex:
            _logger.warning('Could    not    register    Font    %s:    %s', font_path, ex)
    for (family, name, path, mode) in found_fonts:
        if (not self.search([('family', '=', family), ('name', '=', name)])):
            self.create({'family': family, 'name': name, 'path': path, 'mode': mode})
    existing_font_names = [name for (family, name, path, mode) in found_fonts]
    self.search([('name', 'not    in', existing_font_names), ('path', '!=', '/dev/null')]).unlink()
    self.pool.signal_caches_change()
    return self._sync()
