我想建立一个网站,将从fontbit(一个希伯来语字体公司)下载字体。 这里我所做的:HTML和JS的形式,不工作
<!DOCTYPE html>
<html>
<head>
<title>הורדת פונטים מפונטביט בחינם</title>
</head>
<body align="center">
<form name="form" onsubmit="return downloadFont()" method="post">
<span dir="rtl" align="center">שם הפונט באנגלית:</span><br>
<input type="text" name="name"><br><br>
<input align="left" type="radio" name="fonttype" value="regular">Regular<br>
<input align="left" type="radio" name="fonttype" value="bold">Bold<br><br>
<input type="submit" value="download">
</form>
<script>
function downloadFont() {
var fontName = document.form["form"]["name"].value;
var fontType= document.form["form"]["fonttype"].value;
function bold() {
var url = "http://fontface.co.il/fonts/"+fontName+"boldwebfont.eot";
window.location=url;
}
function regular() {
var url = "http://fontface.co.il/fonts/"+fontName+"regularwebfont.eot";
window.location=url;
}
if (fontType == regular) {
regular();
}
if (fontType==bold) {
bold();
}
else {
alert("error");
}
}
</script>
</body>
</html>
林初学,所以也许我做了一个巨大的错误, 的问题是,当我点击下载中心应该带我去的URL。 但它什么都不做。 (希伯来语文本是“英文字体mame:”)
函数bold()的结果 - HTTP错误404.0 - 未找到 您正在查找的资源已被删除,名称已更改或暂时不可用。 – Wordica
这是什么意思?我是一个总的初学者 –
这些是受版权保护的字体,你需要有一个许可证,标题说“从字体位下载免费字体”的事实可能是非法使用 –