Chrome Canvas中的子像素呈现 [英] Sub-pixel rendering in Chrome Canvas

查看:204
本文介绍了Chrome Canvas中的子像素呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人知道是否可以在Chrome(和/或Safari)的HTML5画布中启用子像素渲染。

I'm wondering if anyone knows if it's possible to enable sub-pixel rendering in an HTML5 canvas in Chrome (and/or Safari).

在HTML中的像素呈现,并且FF为HTML&画布渲染。具体问题如下:

Chrome does sub-pixel rendering in HTML, and FF does it for both HTML & Canvas rendering. Specific issue pictured below:

推荐答案

简短答案:否。不可能

这是挫败了许多Canvas用户的两个主题之一。

This is one of two topics that frustrates a lot of Canvas users.

任何类型的子像素着色/反锯齿都是由浏览器。这意味着不同的浏览器倾向于以不同的方式呈现事物。

Subpixel rendering/anti-aliasing of any kind is up to the browser. This means that different browsers are prone to render things in different ways.

很多人要求反锯齿是一个可以打开或关闭的选项用于特定上下文。没有任何运气的东西。

A lot of people have asked for anti-aliasing to be an option that can be turned on or off for a specific context. No luck of anything like that yet.

Chrome特别需要注意,因为他们处理子像素渲染的方式发生了巨大的变化过去4个月。如果您开始使用 Chrome开发者频道,则可以预览他们正在尝试的内容。他们在这方面做了相当多的测试,甚至推动了一些急剧的回归变化,我已经抱怨。

Chrome in particular you'll need to keep an eye on, because the way they have handled sub-pixel rendering has changed drastically over the past 4 months. If you start using the Chrome developer channel you'll get a preview of the things they keep trying out. They've been doing quite a bit of testing in this area, and have even pushed some drastic regressive changes that I've complained about.

这里的好处是:


  1. Chrome在子像素渲染方面绝对尚未完成。

  2. 该规范需要在这一领域更加具体,所以在浏览器之间有一致性,因为任何子像素着色/反锯齿现在是非常依赖于浏览器。在 2008.我没有解决它的讨论。任何进步。

这篇关于Chrome Canvas中的子像素呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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