Font configuration should/will become easier. For TrueType and Type1 fonts this should just be a matter of specifying a list of directories in which to look for fonts. A cache is needed to speed up the inventory on startup.
Hmhm. Not bad.
My idea is still different: Having several font sources and the renderers merely announce which font sources they support. That leaves to option open for later to enable multiple renderers simultaneously.
I don't think enabling multiple simultaneous renderers is worth the trouble. If there are fonts producing a different metric for the same font, all you share is parsing the FO tree and some property refining. You have to provide for the case that generated areas can't be reused across renderers and, if there should be any advantage, also for cases where it is possible to share areas. This looks ... complex.
Example: FontSource A: TrueType fonts FontSource B: Type 1 fonts FontSource C: AWT fonts FontSource D: Base14 fonts FontSource E: PCL base fonts (just a guess)
PDF renderer supports: A, B, D (maybe C) PostScript renderer supports: A, B, D (maybe C) Java2D/AWT renderer supports: A and C PCL renderer: Probably A, E .....
You need - a class managing the fonts - inquire the supported font types from the renderer - match the renderer font types with the managed fonts
I still think it would be easier to get a renderer specific font manager from the renderer, or get the fonts directly from the renderer. The font managers or the renderes can share code for general configuration, caching, font file management etc. by subclassing a common class or by delegation (especially in the second case).
J.Pietschmann
