使用asp.net将字体安装到客户端计算机 [英] Install fonts to client machine using asp.net

查看:86
本文介绍了使用asp.net将字体安装到客户端计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在asp.net中是否有任何代码可将字体安装到客户端计算机?

Is there is any code to install font to a client machine in asp.net?

推荐答案

即使您可以通过编程方式安装字体,也无法通过以下方式完成安装ASP.NET是一种服务器端技术;服务器端无法对客户端计算机执行任何操作.实际上,这非常好,因为在设计时都考虑了安全性.从客户端计算机的角度来看,没有诸如ASP.NET或任何其他服务器端技术之类的东西,只有HTTP请求和响应.

但是,我确实知道您可能不需要安装代码本身,只需要使用存储在服务器上的代码即可访问Web页面.安装字体并不是真正的选择.

可以通过在CSS中嵌入字体来解决此问题.请参见例如
Even though you can install fonts programmatically, it cannot be done via ASP.NET which is a server-side technology; and the server-side cannot do anything to the client machine. Actually, this is very good, as this is all designed with safety in mind. From the standpoint of the client machine, there is no such thing as ASP.NET or any other server-side technology, there are only HTTP requests and responses.

However, I do understand that you probably do not need to instal the code per se, you just need to use a code stored on the server for a Web pages. Installing a font is not really an option.

This problem can be solved by embedding a technique of embedding a font in CSS. Please see, for example, http://home.tiscali.nl/developerscorner/fdc-varia/font-embedding.htm[^].

—SA




您可以使用ActiveX控件来做到这一点.如果确实需要,您需要创建自己的AX控件来安装字体.

但是AX只能在某些有限的浏览器上使用...

希望对您有帮助,

谢谢
-Amit.
Hi,

you can do it using ActiveX control. you need to create your own AX control to install font if you really need.

But AX will work on some limited browsers only...

hope this will help you,

thanks
-Amit.


这篇关于使用asp.net将字体安装到客户端计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆