什么是亚像素精度的主流浏览器的当前状态? [英] What is the current state of sub-pixel accuracy in the major browsers?

查看:321
本文介绍了什么是亚像素精度的主流浏览器的当前状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的绘图应用程序要求高精确度的,我不知道它的主要浏览器平台(包括HTML Canvas元素,和Flash)给予最好的子像素布局的准确性,无论是绘制的元素(在画布或Flash矩形,绝对定位在浏览器中的DIV),以及文本。

I'm working on a drawing application which requires high levels of accuracy, and I'm wondering which of the major browser platforms (including the HTML Canvas element, and Flash) give the best sub-pixel layout accuracy, both for drawn elements (rectangles in the Canvas or Flash, absolutely positioned DIVs in the browser), and for text.

有一些与此有关,都在这个网站和其他人(见下方列表)的职位,但很多都是很旧,没有总结了目前的状况。

There are a number of posts related to this, both on this site and others, (see list at bottom), but many are quite old, and none summarises the current situation.

我的理解是,Flash有子像素定位的原生支持,使用缇放置对象到一个像素的二十分之一,而且所使用的TextLayoutFramework的时候,这样的精度也延伸到文本。然而有至少一个报告,这不会在铬正常工作。任何人都可以证实这一点?

My understanding is that Flash has native support for sub-pixel positioning, using twips to position objects to one twentieth of a pixel, and that when the TextLayoutFramework is used, this accuracy also extends to text. There is at least one report, however, that this doesn't work properly in Chrome. Can anyone confirm this?

我在浏览器中了解的情况是,火狐14+支持文本和绘制的元素的子像素定位,无论是在页面布局和画布中,但我一直没能确定,如何准确,这是。

My understanding of the situation in the browsers is that Firefox 14+ supports sub-pixel positioning for text and drawn elements, both in page layout and within the Canvas, but I haven't been able to ascertain how accurate this is.

我明白歌浏览器(如V21的)不支持子像素定位的。

I understand Chrome (as of v21) does not support sub-pixel positioning at all.

据我了解IE9不支持子像素定位,但它从IE10下面链接的MS博客帖子出现会。

I understand IE9 doesn't support sub-pixel positioning, but it appears from the MS blog post linked below that IE10 will.

我不知道是否有在这任何一台Mac / PC差异,我不也知道,如果闪存的准确性平台和/或浏览器之间。

I don't know if there's any Mac/PC variance in this, and I don't know also if the accuracy of Flash varies between platforms and/or browsers.

我的理解是这样总结的问题可能会引起一些争论,但我相信这是不够具体,为人们提供有用的答案,并希望这个线程可以为定位精度的状态到现在的参考。

I understand a summary question like this may provoke some debate, but I believe this is specific enough for people to provide useful answers, and hope that this thread can be a reference for the state of positioning accuracy up to now.

一些参考文献:

<一个href=\"http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx\">http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx

在子像素渲染铬帆布

<一个href=\"http://johnblackburne.blogspot.co.uk/2011/11/twips.html\">http://johnblackburne.blogspot.co.uk/2011/11/twips.html

<一个href=\"http://ejohn.org/blog/sub-pixel-problems-in-css/\">http://ejohn.org/blog/sub-pixel-problems-in-css/

子像素CSS定位

<一个href=\"https://productforums.google.com/forum/?fromgroups=#!topic/chrome/pRt3tiVIkSI\">https://productforums.google.com/forum/?fromgroups=#!topic/chrome/pRt3tiVIkSI

推荐答案

目前,你可以期望的最好的舍入和子像素支持,IE来自Mozilla的作为亚军。 IE浏览器可能最终会被更多的微调,但其释放周期是如此之久,Mozilla是可能留他们中的领先地位。

Currently, you can expect the best rounding and sub-pixel support to come from Mozilla with IE as the runner up. IE might end up being more fine tuned, but their release cycles are so long that Mozilla is likely to stay ahead of them.

至于做子像素布局,你可能会被追一缕的,因为子像素的优势提高抗锯齿的问题,而不是屏幕定位精度。你的形象将永远不会比真实位置,1个像素更精确,无论子像素的支持。

As far as doing sub-pixel layout, you may be chasing a wisp, because the sub-pixel advantage improves anti-aliasing issues, not screen location accuracy. Your image will never be more accurate than 1 pixel from the true position, regardless of sub-pixel support.

为什么有些浏览器不正确变焦无关与子像素支持的原因,那是因为他们不记得确切的位置并正确四舍五入。换言之,它们是prematurely四舍五入的位置和使该图像是不对准

The reason why some browsers don't zoom properly has nothing to do with sub-pixel support, it is because they are not remembering the exact position and rounding correctly. In other words, they are prematurely rounding the position and that causes the image to be mis-aligned.

这篇关于什么是亚像素精度的主流浏览器的当前状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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