|
Represents a private font store.
Fonts are normally loaded from the system into a global font
store, which is relatively static.
You can add fonts using Doc.AddFont
or Doc.EmbedFont,
and unload them with XFont.Unload. However because
the global store is shared across threads, modifying it can cause
issues if other threads are using the fonts.
A private font store provides a more flexible alternative. It
isolates fonts so that only specific Doc objects can access
them. You can load all required fonts into a private store, assign
that store to any Doc that needs those
fonts, and later unload the fonts or delete the original font files
once all dependent objects are done using them.
For automatic deletion of font files, see the autoDeleteFile
parameter in AddFont and
AddFonts.
When two private font stores interact, their fonts are merged
into a shared reference group.
The private font store ensures that all fonts it contains are
unloaded before their files are deleted.
If multiple private stores come into contact, all private fonts
(and any shared references to them) become shared across all
involved stores. Fonts are only unloaded and files automatically
deleted after every involved store has been disposed.
However, contact between stores does not mean they all end up
with the same font set. Shared references are managed separately
from the actual fonts each store contains. When you add a font to a
store that already has a shared reference to the same font, the
existing shared reference is reused.
Private font stores come into contact in the following
cases:
- When multiple font stores are assigned sequentially to the same
Doc.FontStore.
- When a new store is created using the copy constructor Store(Store),
it contacts the original store.
- When calling AddFont(XFont)
with a font that is private, the fonts store contacts the current
store.
- When calling AddStore(Store),
the passed-in store contacts the current store.
There are XFont.FindFamily,
XFont.FindFamilyNames,
XFont.FindByName
and XFont.FindByStyle
function overloads which allow you to search a font store for
certain types of fonts.
System.Object
WebSupergoo.ABCpdf14.Store
Implements: IDisposable
|