FontPaths

Shared font paths rooted at the library base directory.

Namespace: Com\Tecnick\Pdf\Font

class FontPaths

Source: src/FontPaths.php:36

Shared font paths rooted at the library base directory.

Methods

buildAllowedPaths()

Build trusted roots for local font file access.

public static buildAllowedPaths(): string[]

Returns: string[]

Source: src/FontPaths.php:139

findFontFile()

Returns the full path of a font file, or an empty string when it is not found.

public static findFontFile(string $fontdir, string $file): string

Parameters:

  • $fontdir (string): Original font directory.
  • $file (string): Font file name.

Returns: string

Source: src/FontPaths.php:88

getConfigPath()

Returns the K_PATH_FONTS value, or an empty string when it is undefined or empty.

An existing directory is returned as its canonical realpath, without a trailing separator. Any other value is returned unchanged.

public static getConfigPath(): string

Returns: string

Source: src/FontPaths.php:57

getInputPath()

Returns the default input font directory.

public static getInputPath(): string

Returns: string

Source: src/FontPaths.php:121

getLibraryRoot()

Returns the library root directory.

public static getLibraryRoot(): string

Returns: string

Source: src/FontPaths.php:41

getOutputPath()

Returns the default output font directory.

public static getOutputPath(): string

Returns: string

Source: src/FontPaths.php:129