|
|
|
|
@ -12,32 +12,28 @@
|
|
|
|
|
<style>
|
|
|
|
|
@font-face {
|
|
|
|
|
font-family: "Event Heiti";
|
|
|
|
|
src: local("Heiti SC"), local("STHeiti"), local("PingFang SC"), local("PingFangSC-Regular"), local("黑体"), local("SimHei"),
|
|
|
|
|
url("assets/fonts/SourceHanSansSC-Regular-gb2312.woff2?v=20260828") format("woff2");
|
|
|
|
|
src: local("Heiti SC"), local("STHeiti"), local("PingFang SC"), local("PingFangSC-Regular"), local("黑体"), local("SimHei");
|
|
|
|
|
font-weight: 400 900;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
font-display: swap;
|
|
|
|
|
}
|
|
|
|
|
@font-face {
|
|
|
|
|
font-family: "Event Songti";
|
|
|
|
|
src: local("Songti SC"), local("STSongti-SC-Regular"), local("STSong"), local("宋体"), local("SimSun"), local("NSimSun"),
|
|
|
|
|
url("assets/fonts/SourceHanSerifSC-Regular-gb2312.woff2?v=20260828") format("woff2");
|
|
|
|
|
src: local("Songti SC"), local("STSongti-SC-Regular"), local("STSong"), local("宋体"), local("SimSun"), local("NSimSun");
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
font-display: swap;
|
|
|
|
|
}
|
|
|
|
|
@font-face {
|
|
|
|
|
font-family: "Event Songti";
|
|
|
|
|
src: local("Songti SC Bold"), local("STSongti-SC-Bold"), local("宋体"), local("SimSun"), local("NSimSun"),
|
|
|
|
|
url("assets/fonts/SourceHanSerifSC-SemiBold-gb2312.woff2?v=20260828") format("woff2");
|
|
|
|
|
src: local("Songti SC Bold"), local("STSongti-SC-Bold"), local("宋体"), local("SimSun"), local("NSimSun");
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
font-display: swap;
|
|
|
|
|
}
|
|
|
|
|
@font-face {
|
|
|
|
|
font-family: "Event Songti";
|
|
|
|
|
src: local("Songti SC Bold"), local("STSongti-SC-Bold"), local("宋体"), local("SimSun"), local("NSimSun"),
|
|
|
|
|
url("assets/fonts/SourceHanSerifSC-Bold-gb2312.woff2?v=20260828") format("woff2");
|
|
|
|
|
src: local("Songti SC Bold"), local("STSongti-SC-Bold"), local("宋体"), local("SimSun"), local("NSimSun");
|
|
|
|
|
font-weight: 700 900;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
font-display: swap;
|
|
|
|
|
@ -5928,6 +5924,18 @@
|
|
|
|
|
if (node && node.src) return node.src.replace(/prototype-scale\.js.*$/, "");
|
|
|
|
|
return "/frontend/assets/";
|
|
|
|
|
}
|
|
|
|
|
function hasLocalFont(names) {
|
|
|
|
|
var ctx = document.createElement("canvas").getContext("2d");
|
|
|
|
|
if (!ctx) return false;
|
|
|
|
|
var sample = "沪苏汉字國體";
|
|
|
|
|
ctx.font = "72px Courier New, monospace";
|
|
|
|
|
var fallback = ctx.measureText(sample).width;
|
|
|
|
|
for (var i = 0; i < names.length; i++) {
|
|
|
|
|
ctx.font = '72px "' + names[i] + '", Courier New, monospace';
|
|
|
|
|
if (Math.abs(ctx.measureText(sample).width - fallback) > 1) return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
function loadLate() {
|
|
|
|
|
if (done) return;
|
|
|
|
|
done = true;
|
|
|
|
|
@ -5945,6 +5953,15 @@
|
|
|
|
|
photo.src = base + "generated/hero-photonic-youth-blue-purple-balanced-v7-sharp-trails-4k.jpg?v=20260828c";
|
|
|
|
|
photonic.appendChild(photo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var hasHeiti = hasLocalFont(["Heiti SC", "STHeiti", "PingFang SC", "PingFangSC-Regular", "黑体", "SimHei"]);
|
|
|
|
|
var hasSongti = hasLocalFont(["Songti SC", "STSongti-SC-Regular", "STSong", "STSongti-SC-Bold", "宋体", "SimSun", "NSimSun"]);
|
|
|
|
|
if (!hasHeiti || !hasSongti) {
|
|
|
|
|
var fonts = document.createElement("link");
|
|
|
|
|
fonts.rel = "stylesheet";
|
|
|
|
|
fonts.href = base + "event-site-fonts.css?v=20260828";
|
|
|
|
|
document.head.appendChild(fonts);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function startLate() { window.setTimeout(loadLate, 60); }
|
|
|
|
|
if (document.readyState === "complete") startLate();
|
|
|
|
|
|