Issue #3 resolved

FONT(FAMILY) REFACTORING

petermr avatarpetermr created an issue

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.

Comments (2)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.