shortmopa.blogg.se

Calibre font family
Calibre font family




If the old_name refers to an embedded font, it is removed.

calibre font family

Changes all occurrences of the font family in stylesheets, style tags and style attributes. def change_font ( container, old_name, new_name = None ): ''' Change a font family from old_name to new_name. append ( rule ) for rule in reversed ( removals ): remove_embedded_font ( container, sheet, rule, sheet_name ) return changed propertyValue )): families = True def font_family_data ( container ): families = if old_name in families : changed = True removals. getProperty ( 'font-family' ) if ff is not None : for f in parse_font_family ( css_text ( ff. STYLE_RULE : font_family_data_from_declaration ( rule. get ( f, False ) def font_family_data_from_sheet ( sheet, families ): for rule in sheet. propertyValue )) for f in font_families : families = families.

calibre font family

getProperty ( 'font-family' ) if f is not None : font_families = parse_font_family ( css_text ( f. get ( 'font-family', None ) if f is not None : font_families = f = style. propertyValue, font_family_as_list = True ). getProperty ( 'font' ) if f is not None : f = normalize_font ( f.

calibre font family

#!/usr/bin/env python _license_ = 'GPL v3' _copyright_ = '2014, Kovid Goyal ' from import css_text from .container import OEB_STYLES, OEB_DOCS from _css import normalize_font from tinycss.fonts3 import parse_font_family, parse_font, serialize_font_family, serialize_font from polyglot.builtins import iteritems def unquote ( x ): if x and len ( x ) > 1 and x = x and x in ( '"', "'" ): x = x return x def font_family_data_from_declaration ( style, families ): font_families = f = style.






Calibre font family