#1095 FontManager should allow larger fonts

open
nobody
5
2012-10-08
2010-09-08
Egon Willighagen
No
  1. renderer/font/AWTFontManager.java:44
    I see fonts are cached before use. I don't really understand why it's needed. Upper limit of font size is too small for OOChem, increasing of i upper limit to 100 makes the trick, but I'm in doubt if it's effective. (I'd like all OOChemistry related changes go upstream)

Discussion

  • There is no particular reason for fonts to be cached in this way - it was a design choice that was easy to code. What happens is that fonts are created for ranges of scales (hmm..should be zoom?) as a map of <Double, Font="">.

    An alternative would be lazy initialisation, where every time the zoom is changed, the map is checked to see if it has a font for this value, and (if not) one is created.