forked from LiveCarta/BookConverter
font-family change with 1st upper character
This commit is contained in:
@@ -5,7 +5,7 @@ from ebooklib import epub
|
||||
from bs4 import BeautifulSoup
|
||||
from itertools import takewhile
|
||||
|
||||
from src.util.color_reader import str2hex, rgb2color_name
|
||||
from src.util.color_reader import str2hex
|
||||
from src.livecarta_config import LiveCartaConfig
|
||||
|
||||
|
||||
@@ -129,7 +129,8 @@ LIVECARTA_STYLE_ATTRS_MAPPING = {
|
||||
'font-variant': lambda x: x,
|
||||
'text-align': lambda x: x,
|
||||
'font': lambda x: '',
|
||||
'font-family': lambda x: LiveCartaConfig.FONT_CORRESPONDANCE_TABLE.get(re.sub(r"^\s+|\s+$", "", x.title())),
|
||||
'font-family': lambda x: LiveCartaConfig.FONT_CORRESPONDANCE_TABLE.get(re.sub(r"^\s+|\s+$", "", x.title()))
|
||||
or LiveCartaConfig.FONT_CORRESPONDANCE_TABLE.get(re.sub(r"^\s+|\s+$", "", x)),
|
||||
'font-size': convert_tag_style_values,
|
||||
'color': get_text_color,
|
||||
'background-color': get_bg_color,
|
||||
|
||||
Reference in New Issue
Block a user