I propose that we seriously refactor the PDF2SVG(-DEV) code by splitting it into two parts: 1. PDF2SVGConverter (fairly similar to current). Includes PDFGraphics2D PDFPage2SVGConverter PDF2SVGConverter AMIFont (a wrapper for PDFont) 2. NonStandardFontManager. AMIFontFamily AMIFontManager CodePoint CodePointSet FontFamilySet
The problem has arisen because so many of the fonts are non-standard and can only be managed by heuristics. If all fonts were standard and used Unicode we could dispense with the NonStandardFontManager. Because PDF2SVG was not planned on this basis the code is often difficult to follow and redundant.
The proposed design is that there would be an AMIFont for each PDFont. If the PDFont was not standard the AMIFont would contain a reference to a NSFM which would provide additional font information on a heuristic/lookup basis.
In addition the current FontManager may require a lookup for each font and it is possible that a regex may be useful for some names.