From e03b8c7fbad805e56c0599e86fc96ea898cc1a46 Mon Sep 17 00:00:00 2001 From: laqieer Date: Mon, 14 Feb 2022 18:24:45 +0800 Subject: [PATCH] Fix: read .fnt file in UTF-8 encoding. --- tools/butano/butano_fonts_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/butano/butano_fonts_tool.py b/tools/butano/butano_fonts_tool.py index c1427d5..471e915 100644 --- a/tools/butano/butano_fonts_tool.py +++ b/tools/butano/butano_fonts_tool.py @@ -86,7 +86,7 @@ def process_fonts_files(fonts_file_paths, build_folder_path): font_name = fonts_file_name_no_ext + '_sprite_font' fonts_header_path = build_folder_path + '/' + font_name + '.h' - with open(fonts_file_path, 'r') as fonts_file, open(fonts_header_path, 'w', encoding='utf-8') as header_file: + with open(fonts_file_path, 'r', encoding='utf-8') as fonts_file, open(fonts_header_path, 'w', encoding='utf-8') as header_file: font_chars = [] font_widths = [0] * 95 unique_chars = unique_characters.copy()