Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,12 +34,12 @@ def get_font_regular(size=14):
|
|
| 34 |
return font_manager.FontProperties(family='sans-serif', size=size)
|
| 35 |
|
| 36 |
def get_font_bold(size=14):
|
| 37 |
-
"""加载思源黑体-粗体 (
|
| 38 |
-
font_path = "
|
| 39 |
if os.path.exists(font_path):
|
| 40 |
return font_manager.FontProperties(fname=font_path, size=size)
|
| 41 |
else:
|
| 42 |
-
st.warning("警告:未找到字体文件 '
|
| 43 |
return font_manager.FontProperties(family='sans-serif', size=size, weight='bold')
|
| 44 |
|
| 45 |
def get_pinyin_abbr(text):
|
|
|
|
| 34 |
return font_manager.FontProperties(family='sans-serif', size=size)
|
| 35 |
|
| 36 |
def get_font_bold(size=14):
|
| 37 |
+
"""加载思源黑体-粗体 (SourceHanSansOLD-Heavy-2.otf)"""
|
| 38 |
+
font_path = "SourceHanSansOLD-Heavy-2.otf"
|
| 39 |
if os.path.exists(font_path):
|
| 40 |
return font_manager.FontProperties(fname=font_path, size=size)
|
| 41 |
else:
|
| 42 |
+
st.warning("警告:未找到字体文件 'SourceHanSansOLD-Heavy-2.otf',散场时间表显示可能不正确。")
|
| 43 |
return font_manager.FontProperties(family='sans-serif', size=size, weight='bold')
|
| 44 |
|
| 45 |
def get_pinyin_abbr(text):
|