From 72d6b3886b3777d25ef0250fffeb529af05d8654 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Tue, 13 Jun 2023 11:44:34 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20markdown=20render=20=E5=A2=9E=E5=A4=A7?= =?UTF-8?q?=20fontsize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/general_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/general_utils.py b/util/general_utils.py index 4d2e87843..acd735491 100644 --- a/util/general_utils.py +++ b/util/general_utils.py @@ -140,13 +140,13 @@ def word2img(title: str, text: str, max_width=30, font_size=20): return image -def render_markdown(markdown_text, image_width=800, image_height=600, font_size=16, font_color=(0, 0, 0), bg_color=(255, 255, 255)): +def render_markdown(markdown_text, image_width=800, image_height=600, font_size=26, font_color=(0, 0, 0), bg_color=(255, 255, 255)): HEADER_MARGIN = 20 - HEADER_FONT_STANDARD_SIZE = 32 + HEADER_FONT_STANDARD_SIZE = 42 QUOTE_LEFT_LINE_MARGIN = 10 - QUOTE_FONT_LINE_MARGIN = 5 # 引用文字距离左边线的距离和上下的距离 + QUOTE_FONT_LINE_MARGIN = 6 # 引用文字距离左边线的距离和上下的距离 QUOTE_LEFT_LINE_HEIGHT = font_size + QUOTE_FONT_LINE_MARGIN * 2 QUOTE_LEFT_LINE_WIDTH = 5 QUOTE_LEFT_LINE_COLOR = (180, 180, 180)