校准证书日期文字基线
This commit is contained in:
@@ -208,7 +208,7 @@ def render_practice_camp_certificate_image(certificate: Certificate, learner: Le
|
||||
(end_month, 1058),
|
||||
]:
|
||||
draw.text(
|
||||
(x * x_scale, 668 * y_scale),
|
||||
(x * x_scale, 648 * y_scale),
|
||||
value,
|
||||
fill="#202020",
|
||||
font=font(41, "song", False, text_scale),
|
||||
@@ -217,7 +217,7 @@ def render_practice_camp_certificate_image(certificate: Certificate, learner: Le
|
||||
|
||||
issue_date_text = f"{issue_year}年{issue_month}月{issue_day}日"
|
||||
issue_date_font = font(36, "song", False, text_scale)
|
||||
issue_date_position = (568 * x_scale, 1158 * y_scale)
|
||||
issue_date_position = (568 * x_scale, 1140 * y_scale)
|
||||
draw.rectangle(
|
||||
(
|
||||
442 * x_scale,
|
||||
@@ -362,7 +362,7 @@ def draw_issue_date_numbers(
|
||||
y_scale: float,
|
||||
) -> None:
|
||||
text_font = font(13, "song", False, scale)
|
||||
y = 688 * y_scale
|
||||
y = 682 * y_scale
|
||||
for value, x in [(issue_year, 500), (issue_month, 535), (issue_day, 566)]:
|
||||
draw.text((x * x_scale, y), value, fill="#111111", font=text_font, anchor="mm")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user