全 H5 页中文字体改用阿里普惠体真字模,移除 text-shadow 伪粗体兜底
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+9
-27
@@ -4,13 +4,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../shared/fonts.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>我的 · 傻瓜比价</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
||||
html { background: #000; }
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; background: #000; display: flex; justify-content: center; align-items: center; min-height: 100vh; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }
|
||||
body { font-family: 'PuHuiTi', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; background: #000; display: flex; justify-content: center; align-items: center; min-height: 100vh; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }
|
||||
/* WebView 长按禁止文字选区/蓝色高亮(导购页非可选文档);输入框单独恢复可选 */
|
||||
input, textarea { -webkit-user-select: text; user-select: text; }
|
||||
:root {
|
||||
@@ -155,7 +157,7 @@ input, textarea { -webkit-user-select: text; user-select: text; }
|
||||
.cps-v6 .cps-bot em { font-style: normal;color: #1a1a1a;background: linear-gradient(to top,#FFD600 45%,transparent 45%);padding: 0 2px;font-weight: 900; }
|
||||
|
||||
/* ===== Tweaks Panel ===== */
|
||||
.tweaks-panel { position: fixed; right: 20px; bottom: 20px; width: 280px; background: #fff; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.18); padding: 16px; z-index: 9998; font-family: -apple-system, sans-serif; display: none; }
|
||||
.tweaks-panel { position: fixed; right: 20px; bottom: 20px; width: 280px; background: #fff; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.18); padding: 16px; z-index: 9998; font-family: 'PuHuiTi', -apple-system, sans-serif; display: none; }
|
||||
.tweaks-panel.open { display: block; }
|
||||
.tweaks-panel h3 { font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
|
||||
.tweaks-panel .tweaks-sub { font-size: 11px; color: #999; margin-bottom: 12px; }
|
||||
@@ -849,7 +851,7 @@ body.gv-embed .variant-toggle { display: none !important; }
|
||||
}
|
||||
.coupon-done-k .v6-head .num-line .num {
|
||||
color: #FFE066;
|
||||
font-family: -apple-system, "DIN Alternate", sans-serif;
|
||||
font-family: 'PuHuiTi', -apple-system, "DIN Alternate", sans-serif;
|
||||
font-size: 36px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
@@ -960,7 +962,7 @@ body.gv-embed .variant-toggle { display: none !important; }
|
||||
.coupon-done-k .v6-tickets .pl::after { right: -6px; clip-path: inset(0 50% 0 0); }
|
||||
.coupon-done-k .v6-tickets .pl .num {
|
||||
font-size: 24px; font-weight: 900; color: #E02E24;
|
||||
font-family: -apple-system, "DIN Alternate", sans-serif;
|
||||
font-family: 'PuHuiTi', -apple-system, "DIN Alternate", sans-serif;
|
||||
line-height: 1; letter-spacing: -0.5px;
|
||||
}
|
||||
.coupon-done-k .v6-tickets .pl .num small {
|
||||
@@ -1014,7 +1016,7 @@ body.gv-embed .variant-toggle { display: none !important; }
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
font-family: -apple-system, "DIN Alternate", sans-serif;
|
||||
font-family: 'PuHuiTi', -apple-system, "DIN Alternate", sans-serif;
|
||||
margin: 0 2px;
|
||||
letter-spacing: -0.5px;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.15);
|
||||
@@ -1604,7 +1606,7 @@ body.gv-embed .variant-toggle { display: none !important; }
|
||||
#home .tcd-num .num {
|
||||
font-size: 28px; font-weight: 900; color: #fff;
|
||||
line-height: 1; letter-spacing: -1px;
|
||||
font-family: -apple-system, "DIN Alternate", sans-serif;
|
||||
font-family: 'PuHuiTi', -apple-system, "DIN Alternate", sans-serif;
|
||||
}
|
||||
#home .tcd-num .unit {
|
||||
font-size: 12px; font-weight: 600; color: #FFF3E0;
|
||||
@@ -3372,7 +3374,7 @@ TODO: 补充 @owner / @from / @to / @notes(参照 FLOW.md)
|
||||
.prof-stats-row > div:not(.prof-stats-div) { flex: 1; text-align: center; }
|
||||
.prof-stat-num { font-family: "DIN Alternate", "Helvetica Neue", sans-serif; font-size: 18px; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
|
||||
.prof-stat-num .prof-stat-cur { font-size: 13px; font-weight: 800; margin-right: 1px; }
|
||||
.prof-stat-unit { font-size: 12px; font-weight: 700; margin-left: 1px; font-family: -apple-system, "PingFang SC", sans-serif; }
|
||||
.prof-stat-unit { font-size: 12px; font-weight: 700; margin-left: 1px; font-family: 'PuHuiTi', -apple-system, "PingFang SC", sans-serif; }
|
||||
.prof-stat-key { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.88); margin-bottom: 4px; }
|
||||
.prof-stats-div { width: 1px; height: 34px; background: rgba(255,255,255,.33); }
|
||||
.prof-savings-btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; width: 142px; height: 34px; margin: 12px auto 0; padding: 0 16px; background: #fff; border: none; border-radius: 999px; font-size: 14px; font-weight: 600; color: #FF5722; cursor: pointer; box-shadow: 0 6px 12px rgba(214,82,0,.14); }
|
||||
@@ -7775,25 +7777,5 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
else updateWelfareCheckinTabDot();
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
/* 安卓 WebView 对中文回退字体常不合成粗体 → 给 font-weight≥600 的文字加水平描影 faux-bold(不引字体,三页统一) */
|
||||
(function(){
|
||||
function fb(el){
|
||||
if(el.nodeType!==1||el.dataset.fb)return;
|
||||
var w=parseInt(getComputedStyle(el).fontWeight,10)||400;
|
||||
if(w<600)return;
|
||||
var has=false,ch=el.childNodes;
|
||||
for(var i=0;i<ch.length;i++){if(ch[i].nodeType===3&&ch[i].nodeValue.trim()){has=true;break;}}
|
||||
if(!has)return;
|
||||
var c=getComputedStyle(el).color,s=(w>=800?'0.4px':'0.3px'),sh=s+' 0 0 '+c+', -'+s+' 0 0 '+c;
|
||||
el.style.textShadow=el.style.textShadow?el.style.textShadow+', '+sh:sh;
|
||||
el.dataset.fb='1';
|
||||
}
|
||||
function scan(r){var a=r.querySelectorAll('*');for(var i=0;i<a.length;i++)fb(a[i]);}
|
||||
function run(){scan(document);}
|
||||
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run);else run();
|
||||
try{new MutationObserver(function(ms){for(var j=0;j<ms.length;j++){var an=ms[j].addedNodes;for(var k=0;k<an.length;k++){if(an[k].nodeType===1){fb(an[k]);scan(an[k]);}}}}).observe(document.documentElement,{childList:true,subtree:true});}catch(e){}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+4
-22
@@ -1,7 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../shared/fonts.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>比价记录 · 傻瓜比价</title>
|
||||
<style>
|
||||
@@ -38,7 +40,7 @@
|
||||
html, body { height: 100%; }
|
||||
/* 【去框】原型 body 是黑底 + flex 居中(浏览器预览用)。WebView 里直接铺页面色、不居中。 */
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
|
||||
font-family: 'PuHuiTi', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
|
||||
background: #F5F5F5;
|
||||
color: var(--color-ink);
|
||||
}
|
||||
@@ -493,7 +495,7 @@ body.transitioning-tab { /* no animation */ }
|
||||
/* —— 模拟 iOS 数字键盘(focus 价格输入框时升起)—— 【去框】absolute→fixed 贴视口底 */
|
||||
.fb-keyboard { position: fixed; left: 0; right: 0; bottom: 0; height: 226px; background: #D1D5DB; padding: 6px 4px 8px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 6px; z-index: 12; transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
|
||||
.fb-keyboard.show { transform: translateY(0); }
|
||||
.fb-key { background: #FFFFFF; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 25px; font-weight: 400; color: #1A1A1A; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.28); user-select: none; -webkit-user-select: none; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
|
||||
.fb-key { background: #FFFFFF; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 25px; font-weight: 400; color: #1A1A1A; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.28); user-select: none; -webkit-user-select: none; font-family: 'PuHuiTi', -apple-system, BlinkMacSystemFont, sans-serif; }
|
||||
.fb-key:active { background: #BCC0C6; transition: background 0s; }
|
||||
.fb-key.fn { background: #ABB1BB; font-size: 17px; }
|
||||
.fb-key.fn svg { display: block; }
|
||||
@@ -1783,25 +1785,5 @@ async function submitFeedback() {
|
||||
else updateWelfareCheckinTabDot();
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
/* 安卓 WebView 对中文回退字体常不合成粗体 → 给 font-weight≥600 的文字加水平描影 faux-bold(不引字体,三页统一) */
|
||||
(function(){
|
||||
function fb(el){
|
||||
if(el.nodeType!==1||el.dataset.fb)return;
|
||||
var w=parseInt(getComputedStyle(el).fontWeight,10)||400;
|
||||
if(w<600)return;
|
||||
var has=false,ch=el.childNodes;
|
||||
for(var i=0;i<ch.length;i++){if(ch[i].nodeType===3&&ch[i].nodeValue.trim()){has=true;break;}}
|
||||
if(!has)return;
|
||||
var c=getComputedStyle(el).color,s=(w>=800?'0.4px':'0.3px'),sh=s+' 0 0 '+c+', -'+s+' 0 0 '+c;
|
||||
el.style.textShadow=el.style.textShadow?el.style.textShadow+', '+sh:sh;
|
||||
el.dataset.fb='1';
|
||||
}
|
||||
function scan(r){var a=r.querySelectorAll('*');for(var i=0;i<a.length;i++)fb(a[i]);}
|
||||
function run(){scan(document);}
|
||||
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run);else run();
|
||||
try{new MutationObserver(function(ms){for(var j=0;j<ms.length;j++){var an=ms[j].addedNodes;for(var k=0;k<an.length;k++){if(an[k].nodeType===1){fb(an[k]);scan(an[k]);}}}}).observe(document.documentElement,{childList:true,subtree:true});}catch(e){}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+3
-21
@@ -1,7 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../shared/fonts.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>上报记录 · 傻瓜比价</title>
|
||||
<style>
|
||||
@@ -11,7 +13,7 @@
|
||||
html, body { height: 100%; }
|
||||
html { background: var(--color-surface-page); }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
|
||||
font-family: 'PuHuiTi', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
|
||||
background: var(--color-surface-page);
|
||||
}
|
||||
|
||||
@@ -605,25 +607,5 @@ window.goBackToProfile = goBackToProfile;
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
/* 安卓 WebView 对中文回退字体常不合成粗体 → 给 font-weight≥600 的文字加水平描影 faux-bold(不引字体,三页统一) */
|
||||
(function(){
|
||||
function fb(el){
|
||||
if(el.nodeType!==1||el.dataset.fb)return;
|
||||
var w=parseInt(getComputedStyle(el).fontWeight,10)||400;
|
||||
if(w<600)return;
|
||||
var has=false,ch=el.childNodes;
|
||||
for(var i=0;i<ch.length;i++){if(ch[i].nodeType===3&&ch[i].nodeValue.trim()){has=true;break;}}
|
||||
if(!has)return;
|
||||
var c=getComputedStyle(el).color,s=(w>=800?'0.4px':'0.3px'),sh=s+' 0 0 '+c+', -'+s+' 0 0 '+c;
|
||||
el.style.textShadow=el.style.textShadow?el.style.textShadow+', '+sh:sh;
|
||||
el.dataset.fb='1';
|
||||
}
|
||||
function scan(r){var a=r.querySelectorAll('*');for(var i=0;i<a.length;i++)fb(a[i]);}
|
||||
function run(){scan(document);}
|
||||
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run);else run();
|
||||
try{new MutationObserver(function(ms){for(var j=0;j<ms.length;j++){var an=ms[j].addedNodes;for(var k=0;k<an.length;k++){if(an[k].nodeType===1){fb(an[k]);scan(an[k]);}}}}).observe(document.documentElement,{childList:true,subtree:true});}catch(e){}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* 阿里巴巴普惠体 3.0(GB2312 子集 + 拉丁 + 标点,5 档)—— H5 全局中文字重对齐原型。
|
||||
* 与原生 res/font/puhuiti_* 同一套字体;安卓系统 CJK 只有 Regular/Bold 两档,原型的
|
||||
* 600/700/800/900 在系统字体下会被压成偏细 → 之前靠 text-shadow 伪粗(易过粗)。
|
||||
* 内嵌真字体后 font-weight 由字模原生渲染,与原型一致,伪粗体脚本已移除。
|
||||
* woff2 同源加载,浏览器按页面实际用到的字重懒下载并缓存(跨页只下一次)。
|
||||
* 档位对齐原型:400→Regular / 600→SemiBold / 700→Bold / 800→ExtraBold / 900→Heavy。
|
||||
*/
|
||||
@font-face { font-family: 'PuHuiTi'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/puhuiti_regular.woff2') format('woff2'); }
|
||||
@font-face { font-family: 'PuHuiTi'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/puhuiti_semibold.woff2') format('woff2'); }
|
||||
@font-face { font-family: 'PuHuiTi'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/puhuiti_bold.woff2') format('woff2'); }
|
||||
@font-face { font-family: 'PuHuiTi'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/puhuiti_extrabold.woff2') format('woff2'); }
|
||||
@font-face { font-family: 'PuHuiTi'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/puhuiti_heavy.woff2') format('woff2'); }
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user