IFontResolver Interface

Definition

Namespace Broadside.Fonts
Assembly Broadside.dll

The font resolver extension point: finds a font program for a font that is not embedded, and the named resources fonts need (predefined CMaps, CID-to-Unicode tables). Register one with UseFontResolver(IFontResolver).

public interface IFontResolver

Remarks

ISO 32000-2 §9.6.2.2 (the Standard 14 fonts, "or their font metrics and suitable substitution fonts, shall be available"), §9.8 (the font descriptor, which "enables a PDF processor to synthesise a substitute font or select a similar font"), §9.7.5.2 (predefined CMaps) and §9.10.2 (CID-to-Unicode tables).

An engine asks its resolvers in order: those registered with UseFontResolver(IFontResolver), in registration order, then the operating system's (SystemFontResolver unless replaced with UseSystemFontResolver(IFontResolver?)). The first answer wins. When none answers for a font that is not one of the Standard 14 fonts, the engine picks the Standard 14 font most similar to it (Similar) and asks again for that; when that fails too, it records a diagnostic and the font's glyphs are not drawn (its widths and glyph names still apply).

Both members have a default that finds nothing, so a resolver implements only what it supplies. A resolver is shared by every document and thread of the engine: it must be thread-safe, keep no per-call state, and must not throw for a font or resource it does not have.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Methods (2)