FontSubsetCacheInterface

Optional cache contract for reusing TrueType font subset programs.

Table of contents

Namespace: Com\Tecnick\Pdf\Font

File: FontSubsetCacheInterface.php line 41

Optional cache contract for reusing TrueType font subset programs.

Implementations are injected into Output and consulted before the subsetting is performed. The cached value is the raw subset font program returned by Subset::getSubsetFont(), before any compression or encryption.

The library never evicts entries: expiration and size limits are up to the implementation.

Tags

Methods

get()

File: FontSubsetCacheInterface.php line 48

public get(string $key) : string|null

Parameters

  • $key : string: Cache key identifying the font subset.

Return values

string|null

set()

File: FontSubsetCacheInterface.php line 56

public set(string $key, string $subsetFont) : void

Parameters

  • $key : string: Cache key identifying the font subset.
  • $subsetFont : string: Raw subset font program (uncompressed).