# Path: PyDvi/Tools/Logging.py
# def print_card(text, **kwargs):
# 
#     """ Print the string *text* formated by :meth:`format_card`.  The remaining keyword arguments
#     *kwargs* are passed to :meth:`format_card`.
#     """
#     
#     print format_card(text, **kwargs)
# 
# Path: PyDvi/Tools/TexCommentedFile.py
# class TexCommentedFile(file):
# 
#     """ This class permits to iterate over lines of a text file and to skip commented line by '%'.
#     """
# 
#     ##############################################
# 
#     def __init__(self, filename):
# 
#         super(TexCommentedFile, self).__init__(filename, mode='r')
# 
#     ##############################################
# 
#     def __iter__(self):
# 
#         while True:
#             line = self.readline()
#             if not line:
#                 raise StopIteration()
#             comment_start_index = line.find('%')
#             if comment_start_index != -1:
#                 line = line[:comment_start_index]
#             line = line.strip()
#             if line:
#                 yield line
# 
#     ##############################################
# 
#     def concatenate_lines(self):
# 
#         """ Concatenate the lines and return the corresponding string. """
# 
#         return ''.join(self)


import os
from ..Tools.Logging import print_card
from ..Tools.TexCommentedFile import TexCommentedFile
                raise ValueError("Unknown file extension for file %s" % (filename))

        font_map_entry = FontMapEntry(tex_name, ps_font_name,
                                      ps_snippet, effects,
                                      encoding_filename, pfb_filename)
        self._register_entry(font_map_entry)
    
    ##############################################
    
    @staticmethod
    def _parse_effects(ps_snippet):

        """ Parse the PostScript snippet. """
 
        effects_list = ps_snippet.split()
        effects = {}
        for key_word in 'SlantFont', 'ExtendFont':
            try:
                # parameter is followed by the command
                parameter_index = effects_list.index(key_word) -1
                effects[key_word] = float(effects_list[parameter_index])
            except ValueError: # key word was not found
                pass
            
        return effects
    
    ##############################################
 
    def print_summary(self):
 

# Path: PyDvi/Tools/Logging.py
# def print_card(text, **kwargs):
# 
#     """ Print the string *text* formated by :meth:`format_card`.  The remaining keyword arguments
#     *kwargs* are passed to :meth:`format_card`.
#     """
#     
#     print format_card(text, **kwargs)
# 
# Path: PyDvi/Tools/TexCommentedFile.py
# class TexCommentedFile(file):
# 
#     """ This class permits to iterate over lines of a text file and to skip commented line by '%'.
#     """
# 
#     ##############################################
# 
#     def __init__(self, filename):
# 
#         super(TexCommentedFile, self).__init__(filename, mode='r')
# 
#     ##############################################
# 
#     def __iter__(self):
# 
#         while True:
#             line = self.readline()
#             if not line:
#                 raise StopIteration()
#             comment_start_index = line.find('%')
#             if comment_start_index != -1:
#                 line = line[:comment_start_index]
#             line = line.strip()
#             if line:
#                 yield line
# 
#     ##############################################
# 
#     def concatenate_lines(self):
# 
#         """ Concatenate the lines and return the corresponding string. """
# 
#         return ''.join(self)


# Path: PyDvi/Font/FontMap.py
import os
from ..Tools.Logging import print_card
from ..Tools.TexCommentedFile import TexCommentedFile

                raise ValueError("Unknown file extension for file %s" % (filename))

        font_map_entry = FontMapEntry(tex_name, ps_font_name,
                                      ps_snippet, effects,
                                      encoding_filename, pfb_filename)
        self._register_entry(font_map_entry)
    
    ##############################################
    
    @staticmethod
    def _parse_effects(ps_snippet):

        """ Parse the PostScript snippet. """
 
        effects_list = ps_snippet.split()
        effects = {}
        for key_word in 'SlantFont', 'ExtendFont':
            try:
                # parameter is followed by the command
                parameter_index = effects_list.index(key_word) -1
                effects[key_word] = float(effects_list[parameter_index])
            except ValueError: # key word was not found
                pass
            
        return effects
    
    ##############################################
 
    def print_summary(self):
 

        print_card('Font Map %s' % (self.name))