网络安全的可读字体

发布于 2024-08-20 16:36:58 字数 374 浏览 19 评论 0原文

在我使用的网络应用程序中,文本可读性的问题时常出现。原因是它涉及将从网页上读取或写下的密码。我的一位同事指出 Crystal 字体 是一种设计明确的字体( “l”和“1”不会混淆,“0”和“O”等),但我很确定它在网络上没有用。我意识到我可能必须使用后备策略,但我正在寻求有关哪些字体适合此目的的建议,特别是用户可能可用的那些字体。此外,有关该主题的资源的链接也很棒。谢谢!

编辑:人们建议等宽字体作为可读的网络字体。谁能提供有关用户可能拥有的可能比等宽字体更好的附加信息,以便我可以将字体链接在一起以获得最佳结果?

In a web app I work with from time to time the issue of text readability has come up. The reason is that it involves passwords which will be read off of the web page or written down. One of my co-workers pointed out the Crystal font as one that is designed to be unambiguous ("l" and "1" aren't confused, "0" and "O", etc), but I'm pretty sure its not useful on the web. I realize that I will probably have to use a fallback strategy, but am looking for advice on what fonts are good for this purpose and specifically those fonts that users may have available. Also, links to resources on the topic would be great as well. Thanks!

Edit: People have suggested monospace as a readable web font. Can anyone provide additional info on possible fonts that users might have that may be better than monospace so that I can chain fonts together to get the best possible result?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

海夕 2024-08-27 16:36:59

一个很好的开始是font-family: monospace。这些字体的设计目的是明确的。

如果您真的迫切希望得到完全正确的结果,您可以在服务器上以您选择的字体渲染一个小图像,然后发送该图像。

A great start is font-family: monospace. These fonts are designed to be unambiguous.

If you're really desperate to get it exactly right, you can render a little image in your chosen font on the server, then send that.

情丝乱 2024-08-27 16:36:59

如果可读性是密码最重要的因素,并且您需要使用特定字体,您可以使用特定字体在服务器上的图像上绘制文本,然后将其提供给浏览器。

If readability is the most important thing for the password and you are required to have a specific font you can draw the text on an image on the server using your specific font then serve it to the browser.

海风掠过北极光 2024-08-27 16:36:59

通用等宽字体在这方面会有所擅长,但并不完美。 iIl10oO

但是,最好的解决方案是确保密码不包含不明确的字符。

The generic monospace font will be somewhat good at this, but not perfect. iIl10oO

However, the best solution is to make sure that the passwords do not contain ambiguous characters.

眼眸 2024-08-27 16:36:59

尝试这个字体堆栈

font-family: "Lucida Console","Courier New",Monaco,"Nimbus Mono L",monospace;
  • 99% 的 Windows 拥有 Lucida Console 和 courier new
  • 91% 的 Mac 拥有 Courier New
  • 31% 的 Linux 拥有 Nimbus Mono L

http://www.codestyle.org/servlets/FontStack?stack =Lucida%2BConsole%252CCourier%2BNew%252CMonaco%252CNimbus%2BMino%2BL&generic=monospace&x=5&y=8

Try this font stack

font-family: "Lucida Console","Courier New",Monaco,"Nimbus Mono L",monospace;
  • 99% of Windows has Lucida Console and courier new
  • 91% of Mac has Courier New
  • 31% of Linux has Nimbus Mono L

http://www.codestyle.org/servlets/FontStack?stack=Lucida%2BConsole%252CCourier%2BNew%252CMonaco%252CNimbus%2BMono%2BL&generic=monospace&x=5&y=8

遥远的她 2024-08-27 16:36:59

正如您所描述的,它是供您工作的人员使用的,因此可能对他们使用的浏览器有更多的控制。如果这个浏览器足够现代,您可以考虑使用 @font-face 在界面中显式使用 Crystal 字体。

您可以阅读 Paul Irish 的这篇文章,了解有关实施的更多信息@字体脸。

查看 @font-face 浏览器支持,了解哪些浏览器尚支持此功能。

任何人都可以提供更多信息吗
用户可能拥有的字体
这可能比等宽字体更好
我可以将字体链接在一起以获得
最好的结果?

在 Linux 上,我喜欢 Bitstream Vera Sans Mono(或其更广泛的变体 DejaVu Sans Mono),在 Windows 上我认为 Consolas 很棒(但前提是 Cleartype 打开)。 Mac 用户可能会喜欢摩纳哥。您可以在字体声明中将它们全部命名,然后再提及后备选项“monospace”(在 Windows 计算机上可能是 Courier New)。

As you describe it is intended for people at your work, there's possibly a bit more control on which browser they use. If this browser is modern enough, you can consider using @font-face to explicitly use the Crystal font in your interface.

You can read this article by Paul Irish to learn more about implementing @font-face.

Have a look at @font-face browser support to see which browsers support this feature yet.

Can anyone provide additional info on
possible fonts that users might have
that may be better than monospace so
that I can chain fonts together to get
the best possible result?

On Linux, I like Bitstream Vera Sans Mono (or its more extensive variant DejaVu Sans Mono), on Windows I think Consolas is great (but only if Cleartype is on). Mac users might be fond of Monaco. You could name them all in your font declaration, before mentioning the fallback option "monospace" (which probably is Courier New on Windows machines).

深者入戏 2024-08-27 16:36:59

我在使用 Courier New 之前分发了序列号,但这是一个坏主意。我们经常接到关于没有正确读取密钥的人的电话。

我们通过使用 VerdanaMono 解决了这个问题,但 Verdana 非常相似(我们希望所有按键都占用相同的水平空间)。我们还提供了可能的字符列表,以便人们可以进行比较。 (看起来像这样:“可用的字符是:ABCD ... abcde ... 1234 ...”)。

I distributed serial keys before using Courier New and it was a bad idea. We regularly had calls about people who didn't read the key right.

We fixed the issue by using VerdanaMono, but Verdana is very similar (we wanted the keys to all take the same horizontal space). We also provided a list of possible characters so people could compare. (It looked like this : "The available characters are : ABCD... abcde... 1234...").

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文