C# 如何为asp.net网站嵌入或安装字体

C# 如何为asp.net网站嵌入或安装字体,c#,asp.net,fonts,C#,Asp.net,Fonts,我正在创建一个网站,其中有两个单选按钮用于语言英语和印地语,我需要根据所选单选按钮更改文本框的字体。对于英语,一切正常,但对于印地语来说,只有在客户端计算机上安装了Shivaji05字体,网站才能正常运行。我尝试了一些方法。对于没有Shivaji05字体的系统,我提供了下载链接字体已下载但未安装,因此即使此试用也未成功。是否有人可以建议如何在客户端pc上安装字体,或者在这种情况下是否有其他方法可以实现我的要求?您应该将以下内容添加到css文件中: @font-face { font-fa

我正在创建一个网站,其中有两个单选按钮用于语言英语和印地语,我需要根据所选单选按钮更改文本框的字体。对于英语,一切正常,但对于印地语来说,只有在客户端计算机上安装了Shivaji05字体,网站才能正常运行。我尝试了一些方法。对于没有Shivaji05字体的系统,我提供了下载链接字体已下载但未安装,因此即使此试用也未成功。是否有人可以建议如何在客户端pc上安装字体,或者在这种情况下是否有其他方法可以实现我的要求?

您应该将以下内容添加到css文件中:

@font-face {
    font-family: 'Name of font';
    src: url('font.eot') format('embedded-opentype'); /* IE9 Compat Modes */
    src: url('font.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('font-webfont.woff') format('woff'), /* Modern Browsers */
     url('font.ttf') format('truetype'), /* Safari, Android, iOS */
     url('font-webfont.svg#levenim') format('svg'); /* Legacy iOS */
}

参考文献


您应该将以下内容添加到css文件中:

@font-face {
    font-family: 'Name of font';
    src: url('font.eot') format('embedded-opentype'); /* IE9 Compat Modes */
    src: url('font.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('font-webfont.woff') format('woff'), /* Modern Browsers */
     url('font.ttf') format('truetype'), /* Safari, Android, iOS */
     url('font-webfont.svg#levenim') format('svg'); /* Legacy iOS */
}

参考文献


您应该将以下内容添加到css文件中:

@font-face {
    font-family: 'Name of font';
    src: url('font.eot') format('embedded-opentype'); /* IE9 Compat Modes */
    src: url('font.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('font-webfont.woff') format('woff'), /* Modern Browsers */
     url('font.ttf') format('truetype'), /* Safari, Android, iOS */
     url('font-webfont.svg#levenim') format('svg'); /* Legacy iOS */
}

参考文献


您应该将以下内容添加到css文件中:

@font-face {
    font-family: 'Name of font';
    src: url('font.eot') format('embedded-opentype'); /* IE9 Compat Modes */
    src: url('font.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('font-webfont.woff') format('woff'), /* Modern Browsers */
     url('font.ttf') format('truetype'), /* Safari, Android, iOS */
     url('font-webfont.svg#levenim') format('svg'); /* Legacy iOS */
}

参考文献


谢谢Adel Assi,这是可行的,但仍然需要我关闭网站并再次运行以显示字体。这可以通过提供版本刷新css文件来解决,请尝试以下操作:看看我的答案,从这里清除缓存谢谢Adel Assi这是可行的,但仍然需要我关闭网站并再次运行以显示字体。这可以通过提供版本刷新css文件来解决,请尝试以下操作:看看我的答案,从这里清除缓存谢谢Adel Assi这是可行的,但仍然需要我关闭网站并再次运行以显示字体。这可以通过提供版本刷新css文件来解决,请尝试以下操作:看看我的答案,从这里清除缓存谢谢Adel Assi这是可行的,但仍然需要我关闭网站并再次运行以显示字体。这可以通过提供版本刷新css文件来解决,请尝试以下操作:看看我的答案,从这里清除缓存