shoes/shoes4 — pull request #802 by georgewalton (2014-07-21 18:01:23+00:00)
Title: TextFontFactory reuses existing fonts

Hi all, I've been using shoes to make an interactive list of ~100 entries (not exactly what shoes is meant for but oh well), when this runs on Windows and I scroll down the list it crashes with this error;

java/lang/reflect/java/lang/reflect/Constructor.java:408:in `newInstance': org.eclipse.swt.SWTError: No more handles
from .../shoes4/lib/shoes/swt/text_block/text_font_factory.rb:19:in `create_font' ...

It seems to happen because too many fonts are created at the same time, so I've updated TextFontFactory to reuse existing fonts rather than make lots of identical ones, which fixes this (probably rare) issue.