移除发证单位并修正证书字体字重
This commit is contained in:
@@ -7,7 +7,7 @@ from app.services.certificate_templates import (
|
||||
get_certificate_template,
|
||||
list_certificate_templates,
|
||||
)
|
||||
from app.services.pdf import render_certificate_image
|
||||
from app.services.pdf import font, render_certificate_image
|
||||
|
||||
|
||||
def test_builtin_certificate_templates_have_assets():
|
||||
@@ -31,3 +31,12 @@ def test_practice_camp_template_renders_four_dynamic_values():
|
||||
|
||||
assert rendered.size == (3437, 2551)
|
||||
assert template.dynamic_fields == ("姓名", "课程开始日期", "课程结束日期", "发证日期")
|
||||
|
||||
|
||||
def test_certificate_bold_fonts_use_real_bold_faces():
|
||||
for kind in ("kai", "song"):
|
||||
regular = font(32, kind, False)
|
||||
bold = font(32, kind, True)
|
||||
|
||||
assert regular.getname()[1] != bold.getname()[1]
|
||||
assert "Bold" in bold.getname()[1]
|
||||
|
||||
Reference in New Issue
Block a user