PackageDescription: FontSelection(Bundle)

Font Selection

Last published: February 14, 2011 by 'jbelger'

The bundle FontSelection extends the base image functionality for font selection for Windows operating systems. It selects the fonts based on their supported characters in prior to the normal font attributes. The goal of this selection policy is to have a visible output for every printed character. This new selection policy is represented by class WindowsCompositeFontPolicy and can be used in own graphics contexts as default policy. It is automatically installed and activated for the windowing system by loading this bundle (see postload action). It could be possible that you need to reopen existing windows so that the policy is used.

The WindowCompositeFontPolicy uses the class WindowsCompositeFont as default font class. This composite font grows dynamically depending on the printed characters. It uses internally instances of WinUnicodeFont as platform font representation. For performance reasons the class FontMatch is introduced, which is used as a cache for a best-match font description and the corresponding encoder. The encoder is a UnicodeRangesCharacterEncoder that encodes/decodes characters based on the character ranges in the given font.