|
|
|
|
@ -9,6 +9,7 @@
|
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32.png?v=20260828">
|
|
|
|
|
<link rel="icon" type="image/png" sizes="192x192" href="assets/favicon-192.png?v=20260828">
|
|
|
|
|
<link rel="apple-touch-icon" href="assets/apple-touch-icon.png?v=20260828">
|
|
|
|
|
<link rel="stylesheet" href="assets/event-site-songti.css?v=20260828">
|
|
|
|
|
<style>
|
|
|
|
|
@font-face {
|
|
|
|
|
font-family: "Event Heiti";
|
|
|
|
|
@ -6139,37 +6140,6 @@
|
|
|
|
|
}
|
|
|
|
|
}, 120);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
function assetBase() {
|
|
|
|
|
var node = document.querySelector("script[src*='prototype-scale']");
|
|
|
|
|
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 loadWebfontsIfNeeded() {
|
|
|
|
|
var hasHeiti = hasLocalFont(["Heiti SC", "STHeiti", "PingFang SC", "黑体", "SimHei"]);
|
|
|
|
|
var hasSongti = hasLocalFont(["Songti SC", "STSong", "STSongti-SC-Bold", "宋体", "SimSun", "NSimSun"]);
|
|
|
|
|
if (hasHeiti && hasSongti) return;
|
|
|
|
|
var fonts = document.createElement("link");
|
|
|
|
|
fonts.rel = "stylesheet";
|
|
|
|
|
fonts.href = assetBase() + "event-site-fonts.css?v=20260828";
|
|
|
|
|
document.head.appendChild(fonts);
|
|
|
|
|
}
|
|
|
|
|
if (document.readyState === "complete") window.setTimeout(loadWebfontsIfNeeded, 60);
|
|
|
|
|
else window.addEventListener("load", function () { window.setTimeout(loadWebfontsIfNeeded, 60); });
|
|
|
|
|
}());
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|