Comment 10 for bug 179589

Revision history for this message
bbyak (buliabyak) wrote :

KoRi: the meaning of -inkscape-font-specification is to record the EXACT specification of the font, in case it is not uniquely representable in other standard CSS properties. For example, a font Ababa Swoosh from family Ababa would not be representable in CSS because it has no property for the swoosh variant. In that case "Ababa Swoosh" is placed to -inkscape-font-specification and is tried before everything else. So, this was not specifically designed for import, but it is logical to use it to store the exact font name as specified in PDF, before we substitute and/or break it into properties. It is useful meta-information which, although not used much yet, may become crucial later on (for example for exporting PDF back).

As for your patch, yes, let's not try to do any substitution when font family is explicitly given. However, there are real speed issue and exactness issue with your patch at the moment. I attach PDF which takes many minutes to import, and it replaces "Triodion-UCS" with "Trajan" - really not very similar at all! Can you try to simplify and streamline your code so it works faster and returns matches only if a whole first word of the two names has coincided?