Remove font=family processing

This commit is contained in:
Kiryl
2022-06-28 16:38:21 +03:00
parent eab4f0130a
commit f01f6ad778
3 changed files with 23 additions and 41 deletions

View File

@@ -113,13 +113,6 @@ class HTMLDocxPreprocessor:
elif color and color in LiveCartaConfig.COLORS_MAP:
font.attrs["style"] = f'color: {color};'
if face is not None:
face = re.sub(r",[\w,\- ]*$", "", face)
if face != LiveCartaConfig.DEFAULT_FONT_NAME and LiveCartaConfig.FONT_CORRESPONDANCE_TABLE.get(face):
font.attrs["face"] = LiveCartaConfig.FONT_CORRESPONDANCE_TABLE[face]
else:
font.attrs["face"] = LiveCartaConfig.DEFAULT_FONT_NAME
if len(font.attrs) == 0:
font.unwrap()