'Find the values of various font properties. This limited kind
of parsing is described in Chapter 10 "Adobe Type Manager
Compatibility" of the Type-1 spec.'

def _parse(self):

    prop = {u'weight': u'Regular', u'ItalicAngle': 0.0, u'isFixedPitch': False, u'UnderlinePosition': (-100), u'UnderlineThickness': 50}
    filtered = ((token, value) for (token, value) in self._tokens(self.parts[0]) if (token is not self._whitespace))
    convert = (lambda x: x.decode(u'ascii', u'replace'))
    for (token, value) in filtered:
        if ((token is self._name) and value.startswith('/')):
            key = convert(value[1:])
            (token, value) = next(filtered)
            if (token is self._name):
                if (value in ('true', 'false')):
                    value = (value == 'true')
                else:
                    value = convert(value.lstrip('/'))
            elif (token is self._string):
                value = convert(value.lstrip('(').rstrip(')'))
            elif (token is self._number):
                if ('.' in value):
                    value = float(value)
                else:
                    value = int(value)
            else:
                value = None
            if ((key != u'FontInfo') and (value is not None)):
                prop[key] = value
    if (u'FontName' not in prop):
        prop[u'FontName'] = (prop.get(u'FullName') or prop.get(u'FamilyName') or u'Unknown')
    if (u'FullName' not in prop):
        prop[u'FullName'] = prop[u'FontName']
    if (u'FamilyName' not in prop):
        extras = u'(?i)([    -](regular|plain|italic|oblique|(semi)?bold|(ultra)?light|extra|condensed))+$'
        prop[u'FamilyName'] = re.sub(extras, u'', prop[u'FullName'])
    self.prop = prop
