diff --git a/novelwriter/assets/icons/material_filled_bold.icons b/novelwriter/assets/icons/material_filled_bold.icons index b043b7c9..9dc5a503 100644 --- a/novelwriter/assets/icons/material_filled_bold.icons +++ b/novelwriter/assets/icons/material_filled_bold.icons @@ -1,89 +1,97 @@ -alert_error = -alert_info = -alert_question = -alert_warn = -cls_archive = -cls_character = -cls_custom = -cls_entity = -cls_none = -cls_novel = -cls_object = -cls_plot = -cls_template = -cls_timeline = -cls_trash = -cls_world = -fmt_bold = -fmt_italic = -fmt_mark = -fmt_strike = -fmt_subscript = -fmt_superscript = -fmt_underline = -fmt_toolbar = -search_cancel = -search_case = -search_loop = -search_preserve = -search_project = -search_regex = -search_replace = -search_word = -search = -bullet-off = -bullet-on = -unfold-hide = -unfold-show = -add = -bookmarks = -browse = -cancel = -checked = -chevron_down = -chevron_left = -chevron_right = -chevron_up = -close = -copy = -document_add = -document = -edit = -exclude = -export = -filter = -fit_height = -fit_width = -folder = -font = -import = -language = -lines = -list = -manuscript = -margin_bottom = -margin_left = -margin_right = -margin_top = -maximise = -minimise = -more_vertical = -noncheckable = -novel_view = -open = -outline = -panel = -pin = -project_copy = -project_view = -quote = -refresh = -remove = -revert = -settings = -star = -stats = -timer_off = -timer = -unchecked = -view = +# This file is automatically generated. Do not edit. + +# Meta +meta:name = Material Symbols - Filled Bold +meta:author = Google +meta:licence = Apache License Version 2.0 + +# Icons +icon:alert_error = +icon:alert_info = +icon:alert_question = +icon:alert_warn = +icon:cls_archive = +icon:cls_character = +icon:cls_custom = +icon:cls_entity = +icon:cls_none = +icon:cls_novel = +icon:cls_object = +icon:cls_plot = +icon:cls_template = +icon:cls_timeline = +icon:cls_trash = +icon:cls_world = +icon:fmt_bold = +icon:fmt_italic = +icon:fmt_mark = +icon:fmt_strike = +icon:fmt_subscript = +icon:fmt_superscript = +icon:fmt_underline = +icon:fmt_toolbar = +icon:search = +icon:search_cancel = +icon:search_case = +icon:search_loop = +icon:search_preserve = +icon:search_project = +icon:search_regex = +icon:search_replace = +icon:search_word = +icon:bullet-off = +icon:bullet-on = +icon:unfold-hide = +icon:unfold-show = +icon:add = +icon:bookmarks = +icon:browse = +icon:cancel = +icon:checked = +icon:chevron_down = +icon:chevron_left = +icon:chevron_right = +icon:chevron_up = +icon:close = +icon:copy = +icon:document_add = +icon:document = +icon:edit = +icon:exclude = +icon:export = +icon:filter = +icon:fit_height = +icon:fit_width = +icon:folder = +icon:font = +icon:import = +icon:language = +icon:lines = +icon:list = +icon:manuscript = +icon:margin_bottom = +icon:margin_left = +icon:margin_right = +icon:margin_top = +icon:maximise = +icon:minimise = +icon:more_vertical = +icon:noncheckable = +icon:novel_view = +icon:open = +icon:outline = +icon:panel = +icon:pin = +icon:project_copy = +icon:project_view = +icon:quote = +icon:refresh = +icon:remove = +icon:revert = +icon:settings = +icon:star = +icon:stats = +icon:timer_off = +icon:timer = +icon:unchecked = +icon:view = diff --git a/novelwriter/assets/icons/material_filled_normal.icons b/novelwriter/assets/icons/material_filled_normal.icons index e70f277f..c729da16 100644 --- a/novelwriter/assets/icons/material_filled_normal.icons +++ b/novelwriter/assets/icons/material_filled_normal.icons @@ -1,89 +1,97 @@ -alert_error = -alert_info = -alert_question = -alert_warn = -cls_archive = -cls_character = -cls_custom = -cls_entity = -cls_none = -cls_novel = -cls_object = -cls_plot = -cls_template = -cls_timeline = -cls_trash = -cls_world = -fmt_bold = -fmt_italic = -fmt_mark = -fmt_strike = -fmt_subscript = -fmt_superscript = -fmt_underline = -fmt_toolbar = -search_cancel = -search_case = -search_loop = -search_preserve = -search_project = -search_regex = -search_replace = -search_word = -search = -bullet-off = -bullet-on = -unfold-hide = -unfold-show = -add = -bookmarks = -browse = -cancel = -checked = -chevron_down = -chevron_left = -chevron_right = -chevron_up = -close = -copy = -document_add = -document = -edit = -exclude = -export = -filter = -fit_height = -fit_width = -folder = -font = -import = -language = -lines = -list = -manuscript = -margin_bottom = -margin_left = -margin_right = -margin_top = -maximise = -minimise = -more_vertical = -noncheckable = -novel_view = -open = -outline = -panel = -pin = -project_copy = -project_view = -quote = -refresh = -remove = -revert = -settings = -star = -stats = -timer_off = -timer = -unchecked = -view = +# This file is automatically generated. Do not edit. + +# Meta +meta:name = Material Symbols - Filled +meta:author = Google +meta:licence = Apache License Version 2.0 + +# Icons +icon:alert_error = +icon:alert_info = +icon:alert_question = +icon:alert_warn = +icon:cls_archive = +icon:cls_character = +icon:cls_custom = +icon:cls_entity = +icon:cls_none = +icon:cls_novel = +icon:cls_object = +icon:cls_plot = +icon:cls_template = +icon:cls_timeline = +icon:cls_trash = +icon:cls_world = +icon:fmt_bold = +icon:fmt_italic = +icon:fmt_mark = +icon:fmt_strike = +icon:fmt_subscript = +icon:fmt_superscript = +icon:fmt_underline = +icon:fmt_toolbar = +icon:search = +icon:search_cancel = +icon:search_case = +icon:search_loop = +icon:search_preserve = +icon:search_project = +icon:search_regex = +icon:search_replace = +icon:search_word = +icon:bullet-off = +icon:bullet-on = +icon:unfold-hide = +icon:unfold-show = +icon:add = +icon:bookmarks = +icon:browse = +icon:cancel = +icon:checked = +icon:chevron_down = +icon:chevron_left = +icon:chevron_right = +icon:chevron_up = +icon:close = +icon:copy = +icon:document_add = +icon:document = +icon:edit = +icon:exclude = +icon:export = +icon:filter = +icon:fit_height = +icon:fit_width = +icon:folder = +icon:font = +icon:import = +icon:language = +icon:lines = +icon:list = +icon:manuscript = +icon:margin_bottom = +icon:margin_left = +icon:margin_right = +icon:margin_top = +icon:maximise = +icon:minimise = +icon:more_vertical = +icon:noncheckable = +icon:novel_view = +icon:open = +icon:outline = +icon:panel = +icon:pin = +icon:project_copy = +icon:project_view = +icon:quote = +icon:refresh = +icon:remove = +icon:revert = +icon:settings = +icon:star = +icon:stats = +icon:timer_off = +icon:timer = +icon:unchecked = +icon:view = diff --git a/novelwriter/assets/icons/material_outline_bold.icons b/novelwriter/assets/icons/material_outline_bold.icons index 7225e7b1..a1ae5ea5 100644 --- a/novelwriter/assets/icons/material_outline_bold.icons +++ b/novelwriter/assets/icons/material_outline_bold.icons @@ -1,89 +1,97 @@ -alert_error = -alert_info = -alert_question = -alert_warn = -cls_archive = -cls_character = -cls_custom = -cls_entity = -cls_none = -cls_novel = -cls_object = -cls_plot = -cls_template = -cls_timeline = -cls_trash = -cls_world = -fmt_bold = -fmt_italic = -fmt_mark = -fmt_strike = -fmt_subscript = -fmt_superscript = -fmt_underline = -fmt_toolbar = -search_cancel = -search_case = -search_loop = -search_preserve = -search_project = -search_regex = -search_replace = -search_word = -search = -bullet-off = -bullet-on = -unfold-hide = -unfold-show = -add = -bookmarks = -browse = -cancel = -checked = -chevron_down = -chevron_left = -chevron_right = -chevron_up = -close = -copy = -document_add = -document = -edit = -exclude = -export = -filter = -fit_height = -fit_width = -folder = -font = -import = -language = -lines = -list = -manuscript = -margin_bottom = -margin_left = -margin_right = -margin_top = -maximise = -minimise = -more_vertical = -noncheckable = -novel_view = -open = -outline = -panel = -pin = -project_copy = -project_view = -quote = -refresh = -remove = -revert = -settings = -star = -stats = -timer_off = -timer = -unchecked = -view = +# This file is automatically generated. Do not edit. + +# Meta +meta:name = Material Symbols - Outlined Bold +meta:author = Google +meta:licence = Apache License Version 2.0 + +# Icons +icon:alert_error = +icon:alert_info = +icon:alert_question = +icon:alert_warn = +icon:cls_archive = +icon:cls_character = +icon:cls_custom = +icon:cls_entity = +icon:cls_none = +icon:cls_novel = +icon:cls_object = +icon:cls_plot = +icon:cls_template = +icon:cls_timeline = +icon:cls_trash = +icon:cls_world = +icon:fmt_bold = +icon:fmt_italic = +icon:fmt_mark = +icon:fmt_strike = +icon:fmt_subscript = +icon:fmt_superscript = +icon:fmt_underline = +icon:fmt_toolbar = +icon:search = +icon:search_cancel = +icon:search_case = +icon:search_loop = +icon:search_preserve = +icon:search_project = +icon:search_regex = +icon:search_replace = +icon:search_word = +icon:bullet-off = +icon:bullet-on = +icon:unfold-hide = +icon:unfold-show = +icon:add = +icon:bookmarks = +icon:browse = +icon:cancel = +icon:checked = +icon:chevron_down = +icon:chevron_left = +icon:chevron_right = +icon:chevron_up = +icon:close = +icon:copy = +icon:document_add = +icon:document = +icon:edit = +icon:exclude = +icon:export = +icon:filter = +icon:fit_height = +icon:fit_width = +icon:folder = +icon:font = +icon:import = +icon:language = +icon:lines = +icon:list = +icon:manuscript = +icon:margin_bottom = +icon:margin_left = +icon:margin_right = +icon:margin_top = +icon:maximise = +icon:minimise = +icon:more_vertical = +icon:noncheckable = +icon:novel_view = +icon:open = +icon:outline = +icon:panel = +icon:pin = +icon:project_copy = +icon:project_view = +icon:quote = +icon:refresh = +icon:remove = +icon:revert = +icon:settings = +icon:star = +icon:stats = +icon:timer_off = +icon:timer = +icon:unchecked = +icon:view = diff --git a/novelwriter/assets/icons/material_outline_normal.icons b/novelwriter/assets/icons/material_outline_normal.icons index bf199798..14d66542 100644 --- a/novelwriter/assets/icons/material_outline_normal.icons +++ b/novelwriter/assets/icons/material_outline_normal.icons @@ -1,89 +1,97 @@ -alert_error = -alert_info = -alert_question = -alert_warn = -cls_archive = -cls_character = -cls_custom = -cls_entity = -cls_none = -cls_novel = -cls_object = -cls_plot = -cls_template = -cls_timeline = -cls_trash = -cls_world = -fmt_bold = -fmt_italic = -fmt_mark = -fmt_strike = -fmt_subscript = -fmt_superscript = -fmt_underline = -fmt_toolbar = -search_cancel = -search_case = -search_loop = -search_preserve = -search_project = -search_regex = -search_replace = -search_word = -search = -bullet-off = -bullet-on = -unfold-hide = -unfold-show = -add = -bookmarks = -browse = -cancel = -checked = -chevron_down = -chevron_left = -chevron_right = -chevron_up = -close = -copy = -document_add = -document = -edit = -exclude = -export = -filter = -fit_height = -fit_width = -folder = -font = -import = -language = -lines = -list = -manuscript = -margin_bottom = -margin_left = -margin_right = -margin_top = -maximise = -minimise = -more_vertical = -noncheckable = -novel_view = -open = -outline = -panel = -pin = -project_copy = -project_view = -quote = -refresh = -remove = -revert = -settings = -star = -stats = -timer_off = -timer = -unchecked = -view = +# This file is automatically generated. Do not edit. + +# Meta +meta:name = Material Symbols - Outlined +meta:author = Google +meta:licence = Apache License Version 2.0 + +# Icons +icon:alert_error = +icon:alert_info = +icon:alert_question = +icon:alert_warn = +icon:cls_archive = +icon:cls_character = +icon:cls_custom = +icon:cls_entity = +icon:cls_none = +icon:cls_novel = +icon:cls_object = +icon:cls_plot = +icon:cls_template = +icon:cls_timeline = +icon:cls_trash = +icon:cls_world = +icon:fmt_bold = +icon:fmt_italic = +icon:fmt_mark = +icon:fmt_strike = +icon:fmt_subscript = +icon:fmt_superscript = +icon:fmt_underline = +icon:fmt_toolbar = +icon:search = +icon:search_cancel = +icon:search_case = +icon:search_loop = +icon:search_preserve = +icon:search_project = +icon:search_regex = +icon:search_replace = +icon:search_word = +icon:bullet-off = +icon:bullet-on = +icon:unfold-hide = +icon:unfold-show = +icon:add = +icon:bookmarks = +icon:browse = +icon:cancel = +icon:checked = +icon:chevron_down = +icon:chevron_left = +icon:chevron_right = +icon:chevron_up = +icon:close = +icon:copy = +icon:document_add = +icon:document = +icon:edit = +icon:exclude = +icon:export = +icon:filter = +icon:fit_height = +icon:fit_width = +icon:folder = +icon:font = +icon:import = +icon:language = +icon:lines = +icon:list = +icon:manuscript = +icon:margin_bottom = +icon:margin_left = +icon:margin_right = +icon:margin_top = +icon:maximise = +icon:minimise = +icon:more_vertical = +icon:noncheckable = +icon:novel_view = +icon:open = +icon:outline = +icon:panel = +icon:pin = +icon:project_copy = +icon:project_view = +icon:quote = +icon:refresh = +icon:remove = +icon:revert = +icon:settings = +icon:star = +icon:stats = +icon:timer_off = +icon:timer = +icon:unchecked = +icon:view = diff --git a/novelwriter/assets/icons/material_rounded_bold.icons b/novelwriter/assets/icons/material_rounded_bold.icons new file mode 100644 index 00000000..7d28ed46 --- /dev/null +++ b/novelwriter/assets/icons/material_rounded_bold.icons @@ -0,0 +1,97 @@ +# This file is automatically generated. Do not edit. + +# Meta +meta:name = Material Symbols - Rounded Bold +meta:author = Google +meta:licence = Apache License Version 2.0 + +# Icons +icon:alert_error = +icon:alert_info = +icon:alert_question = +icon:alert_warn = +icon:cls_archive = +icon:cls_character = +icon:cls_custom = +icon:cls_entity = +icon:cls_none = +icon:cls_novel = +icon:cls_object = +icon:cls_plot = +icon:cls_template = +icon:cls_timeline = +icon:cls_trash = +icon:cls_world = +icon:fmt_bold = +icon:fmt_italic = +icon:fmt_mark = +icon:fmt_strike = +icon:fmt_subscript = +icon:fmt_superscript = +icon:fmt_underline = +icon:fmt_toolbar = +icon:search = +icon:search_cancel = +icon:search_case = +icon:search_loop = +icon:search_preserve = +icon:search_project = +icon:search_regex = +icon:search_replace = +icon:search_word = +icon:bullet-off = +icon:bullet-on = +icon:unfold-hide = +icon:unfold-show = +icon:add = +icon:bookmarks = +icon:browse = +icon:cancel = +icon:checked = +icon:chevron_down = +icon:chevron_left = +icon:chevron_right = +icon:chevron_up = +icon:close = +icon:copy = +icon:document_add = +icon:document = +icon:edit = +icon:exclude = +icon:export = +icon:filter = +icon:fit_height = +icon:fit_width = +icon:folder = +icon:font = +icon:import = +icon:language = +icon:lines = +icon:list = +icon:manuscript = +icon:margin_bottom = +icon:margin_left = +icon:margin_right = +icon:margin_top = +icon:maximise = +icon:minimise = +icon:more_vertical = +icon:noncheckable = +icon:novel_view = +icon:open = +icon:outline = +icon:panel = +icon:pin = +icon:project_copy = +icon:project_view = +icon:quote = +icon:refresh = +icon:remove = +icon:revert = +icon:settings = +icon:star = +icon:stats = +icon:timer_off = +icon:timer = +icon:unchecked = +icon:view = diff --git a/novelwriter/assets/icons/material_rounded_normal.icons b/novelwriter/assets/icons/material_rounded_normal.icons new file mode 100644 index 00000000..c4022290 --- /dev/null +++ b/novelwriter/assets/icons/material_rounded_normal.icons @@ -0,0 +1,97 @@ +# This file is automatically generated. Do not edit. + +# Meta +meta:name = Material Symbols - Rounded +meta:author = Google +meta:licence = Apache License Version 2.0 + +# Icons +icon:alert_error = +icon:alert_info = +icon:alert_question = +icon:alert_warn = +icon:cls_archive = +icon:cls_character = +icon:cls_custom = +icon:cls_entity = +icon:cls_none = +icon:cls_novel = +icon:cls_object = +icon:cls_plot = +icon:cls_template = +icon:cls_timeline = +icon:cls_trash = +icon:cls_world = +icon:fmt_bold = +icon:fmt_italic = +icon:fmt_mark = +icon:fmt_strike = +icon:fmt_subscript = +icon:fmt_superscript = +icon:fmt_underline = +icon:fmt_toolbar = +icon:search = +icon:search_cancel = +icon:search_case = +icon:search_loop = +icon:search_preserve = +icon:search_project = +icon:search_regex = +icon:search_replace = +icon:search_word = +icon:bullet-off = +icon:bullet-on = +icon:unfold-hide = +icon:unfold-show = +icon:add = +icon:bookmarks = +icon:browse = +icon:cancel = +icon:checked = +icon:chevron_down = +icon:chevron_left = +icon:chevron_right = +icon:chevron_up = +icon:close = +icon:copy = +icon:document_add = +icon:document = +icon:edit = +icon:exclude = +icon:export = +icon:filter = +icon:fit_height = +icon:fit_width = +icon:folder = +icon:font = +icon:import = +icon:language = +icon:lines = +icon:list = +icon:manuscript = +icon:margin_bottom = +icon:margin_left = +icon:margin_right = +icon:margin_top = +icon:maximise = +icon:minimise = +icon:more_vertical = +icon:noncheckable = +icon:novel_view = +icon:open = +icon:outline = +icon:panel = +icon:pin = +icon:project_copy = +icon:project_view = +icon:quote = +icon:refresh = +icon:remove = +icon:revert = +icon:settings = +icon:star = +icon:stats = +icon:timer_off = +icon:timer = +icon:unchecked = +icon:view = diff --git a/novelwriter/gui/theme.py b/novelwriter/gui/theme.py index 18f4e543..5dfc079b 100644 --- a/novelwriter/gui/theme.py +++ b/novelwriter/gui/theme.py @@ -627,12 +627,15 @@ class GuiIcons: def loadNewTheme(self, iconTheme: str) -> bool: """Load new style theme.""" - themePath = self._iconPath / "material_outline_bold.icons" + themePath = self._iconPath / "material_rounded_normal.icons" with open(themePath, mode="r", encoding="utf-8") as icons: for icon in icons: - key, _, svg = icon.partition(" = ") - if key and svg: - self._svgData[key.strip()] = svg.strip().encode("utf-8") + bits = icon.partition("=") + key = bits[0].strip() + value = bits[2].strip() + if key and value: + if key.startswith("icon:"): + self._svgData[key[5:]] = value.encode("utf-8") return True @@ -811,3 +814,19 @@ def _loadInternalName(confParser: NWConfigParser, confFile: str | Path) -> str: return "" return confParser.rdStr("Main", "name", "") + + +def _loadIconName(path: Path) -> str: + """Open an icons file and read the 'name' setting.""" + try: + with open(path, mode="r", encoding="utf-8") as icons: + for icon in icons: + key, _, value = icon.partition("=") + if key.strip() == "meta:name": + return value.strip() + except Exception: + logger.error("Could not load file: %s", path) + logException() + return "" + + return "" diff --git a/pkgutils.py b/pkgutils.py index be32d51f..2e874153 100755 --- a/pkgutils.py +++ b/pkgutils.py @@ -345,18 +345,44 @@ def buildIconTheme(args: argparse.Namespace) -> None: style = args.style if style == "material": - processMaterialIcons( - workDir, iconsDir / "material_outline_normal.icons", "outlined", False, 400 - ) - processMaterialIcons( - workDir, iconsDir / "material_filled_normal.icons", "outlined", True, 400 - ) - processMaterialIcons( - workDir, iconsDir / "material_outline_bold.icons", "outlined", False, 700 - ) - processMaterialIcons( - workDir, iconsDir / "material_filled_bold.icons", "outlined", True, 700 - ) + processMaterialIcons(workDir, iconsDir, { + "material_outline_normal": { + "name": "Material Symbols - Outlined", + "style": "outlined", + "filled": False, + "weight": 400, + }, + "material_outline_bold": { + "name": "Material Symbols - Outlined Bold", + "style": "outlined", + "filled": False, + "weight": 700, + }, + "material_rounded_normal": { + "name": "Material Symbols - Rounded", + "style": "rounded", + "filled": False, + "weight": 400, + }, + "material_rounded_bold": { + "name": "Material Symbols - Rounded Bold", + "style": "rounded", + "filled": False, + "weight": 700, + }, + "material_filled_normal": { + "name": "Material Symbols - Filled", + "style": "rounded", + "filled": True, + "weight": 400, + }, + "material_filled_bold": { + "name": "Material Symbols - Filled Bold", + "style": "rounded", + "filled": True, + "weight": 700, + }, + }) print("") diff --git a/utils/material_icons.py b/utils/material_icons.py index 471284b6..49a62579 100644 --- a/utils/material_icons.py +++ b/utils/material_icons.py @@ -57,6 +57,7 @@ ICON_MAP = { "fmt_underline": "format_underlined", "fmt_toolbar": "text_format", + "search": "search", "search_cancel": "close", "search_case": "match_case", "search_loop": "laps", @@ -65,7 +66,6 @@ ICON_MAP = { "search_regex": "regular_expression", "search_replace": "find_replace", "search_word": "match_word", - "search": "search", "bullet-off": "radio_button_unchecked", "bullet-on": "radio_button_checked", @@ -136,7 +136,7 @@ def _fixXml(svg: str) -> str: return etree.tostring(xSvg).decode() -def processMaterialIcons(workDir: Path, output: Path, style: str, fill: bool, weight: int) -> None: +def processMaterialIcons(workDir: Path, iconsDir: Path, jobs: dict) -> None: """Process material icons of a given spec and write output file.""" srcRepo = workDir / "material-design-icons" if not srcRepo.is_dir(): @@ -144,20 +144,36 @@ def processMaterialIcons(workDir: Path, output: Path, style: str, fill: bool, we else: subprocess.call(["git", "pull"], cwd=srcRepo) - kind = f"wght{weight}" if weight != 400 else "" - kind += "fill1" if fill else "" + for file, job in jobs.items(): + name: str = job["name"] + style: str = job["style"] + filled: bool = job["filled"] + weight: int = job["weight"] - with open(output, mode="w", encoding="utf-8") as icons: - iconSrc = srcRepo / "symbols" / "web" - for key, name in ICON_MAP.items(): - if kind: - fileNmae = f"{name}_{kind}_24px.svg" - else: - fileNmae = f"{name}_24px.svg" - iconFile = iconSrc / name / f"materialsymbols{style}" / fileNmae - if iconFile.is_file(): - svg = iconFile.read_text(encoding="utf-8") - icons.write(f"{key:<15s} = {_fixXml(svg)}\n") - print(f"Wrote: {iconFile.stem}") - else: - print(f"Not Found: {iconFile}") + kind = f"wght{weight}" if weight != 400 else "" + kind += "fill1" if filled else "" + + print("") + print(f"Processing: {name}") + print("") + with open(iconsDir / f"{file}.icons", mode="w", encoding="utf-8") as icons: + icons.write("# This file is automatically generated. Do not edit.\n\n") + icons.write("# Meta\n") + icons.write(f"meta:name = {name}\n") + icons.write("meta:author = Google\n") + icons.write("meta:licence = Apache License Version 2.0\n") + icons.write("\n") + icons.write("# Icons\n") + iconSrc = srcRepo / "symbols" / "web" + for key, icon in ICON_MAP.items(): + if kind: + fileNmae = f"{icon}_{kind}_24px.svg" + else: + fileNmae = f"{icon}_24px.svg" + iconFile = iconSrc / icon / f"materialsymbols{style}" / fileNmae + if iconFile.is_file(): + svg = iconFile.read_text(encoding="utf-8") + icons.write(f"icon:{key:<15s} = {_fixXml(svg)}\n") + print(f"Wrote: {iconFile.stem}") + else: + print(f"Not Found: {iconFile}")