PHP Class Pressbooks\GlobalTypography

显示文件 Open project: pressbooks/pressbooks

Public Methods

Method Description
_getRequiredLanguages ( ) Get required languages for this book, excluding those supported by the theme.
fixWebFonts ( $css ) : mixed Fix relative/ambiguous URLs to web fonts
getFonts ( $languages = null ) Check for absent font files and download if necessary.
getSupportedLanguages ( ) : array Get Pressbooks-supported languages.
getThemeFontStacks ( string $type ) : string Get the current theme's font stacks.
getThemeSupportedLanguages ( ) : array Get the current theme's supported languages.
updateGlobalTypographyMixin ( ) Update and save the SCSS mixin which assigns the $global-typography variable.
updateWebBookStyleSheet ( ) : void Update and save the supplementary webBook stylesheet which adds global typography support.

Protected Methods

Method Description
_getBookLanguage ( ) : string
_sassify ( $type, array $languages ) : void

Method Details

_getBookLanguage() protected method

protected _getBookLanguage ( ) : string
return string

_getRequiredLanguages() public method

Get required languages for this book, excluding those supported by the theme.

_sassify() protected method

protected _sassify ( $type, array $languages ) : void
$type
$languages array
return void

fixWebFonts() public method

Fix relative/ambiguous URLs to web fonts
public fixWebFonts ( $css ) : mixed
$css
return mixed

getFonts() public method

Check for absent font files and download if necessary.
public getFonts ( $languages = null )

getSupportedLanguages() public method

Get Pressbooks-supported languages.
public getSupportedLanguages ( ) : array
return array

getThemeFontStacks() public method

Get the current theme's font stacks.
public getThemeFontStacks ( string $type ) : string
$type string (prince, epub, web ...)
return string

getThemeSupportedLanguages() public method

Get the current theme's supported languages.
public getThemeSupportedLanguages ( ) : array
return array

updateGlobalTypographyMixin() public method

Update and save the SCSS mixin which assigns the $global-typography variable.

updateWebBookStyleSheet() public method

Update and save the supplementary webBook stylesheet which adds global typography support.
public updateWebBookStyleSheet ( ) : void
return void