<p>It appears that Microsoft has punted on this in Windows 7:</p>

<p><a href="https://i.sstatic.net/KbzW2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KbzW2.png" alt="ClearType Text Tuner"></a></p>

<p>This is the method available in the control panel for selecting what layout ClearType uses.</p>

<p>Additionally, it seems that iOS and the Windows modern UI style de-emphasize subpixel antialiasing heavily, due to the prevalence of animations and screen rotations. As a result I expect the OS vendors to not spend a lot of effort trying to figure out the subpixel layout of every screen.</p>

CC BY-SA 3.0
2015-08-11T05:26:44.280Z
2015-08-11T05:26:44.280Z
John Calsbeek
<p>Different screens can have different <a href="https://en.wikipedia.org/wiki/Pixel_geometry">pixel geometry</a>, so that the red, green and blue components are arranged in different patterns. Using sub-pixel rendering to give a higher apparent resolution is only possible if the pixel geometry is known (what will give an improvement in clarity on one type of monitor will make things worse on another).</p>

<p>This is particularly relevant if an application needs to run on both a desktop/laptop and a mobile screen, as different pixel geometry is quite common in mobile screens.</p>

<p>Is there a way to determine which geometry the screen uses at runtime, without having to ask the user? I'm interested in whether this is possible in general, but ideally I'd like to know whether this is possible when using JavaScript with WebGL.</p>

CC BY-SA 3.0
2015-08-10T13:18:39.680Z
You won't find anything relevant just looking at OpenGL, maybe a JavaScript library can do that
Ryp
CC BY-SA 3.0
2015-08-10T13:50:34.907Z
I dont think you can, that's why Microsoft asks the user.
joojaa
CC BY-SA 3.0
2015-08-10T13:58:40.427Z
I wonder if that means there is never a way to determine this, or just that some monitors do not provide that information.
trichoplax is on Codidact now
CC BY-SA 3.0
2015-08-10T14:15:14.630Z
well, i think you can get the model and make of your monitor maybe there is some repository that lists this? If there is not what stops anybody of us form building it?
joojaa
<webgl><javascript>
Can I determine the pixel geometry programmatically?
trichoplax is on Codidact now
# Can I determine the pixel geometry programmatically?

(Asked by: username_0 on 2015-08-10)

Different screens can have different [pixel geometry](https://en.wikipedia.org/wiki/Pixel_geometry), so that the red, green and blue components are arranged in different patterns. Using sub-pixel rendering to give a higher apparent resolution is only possible if the pixel geometry is known (what will give an improvement in clarity on one type of monitor will make things worse on another).

This is particularly relevant if an application needs to run on both a desktop/laptop and a mobile screen, as different pixel geometry is quite common in mobile screens.

Is there a way to determine which geometry the screen uses at runtime, without having to ask the user? I'm interested in whether this is possible in general, but ideally I'd like to know whether this is possible when using JavaScript with WebGL.

**Tags:** webgl, javascript

> **Comments:**
> **username_1**: You won't find anything relevant just looking at OpenGL, maybe a JavaScript library can do that  
> **username_2**: I dont think you can, that's why Microsoft asks the user.  
> **username_0**: I wonder if that means there is never a way to determine this, or just that some monitors do not provide that information.  
> **username_2**: well, i think you can get the model and make of your monitor maybe there is some repository that lists this? If there is not what stops anybody of us form building it?  

---

## 1 answers

### Answer by username_3 on 2015-08-11. Score: 2 | Accepted answer

It appears that Microsoft has punted on this in Windows 7:

[![ClearType Text Tuner](https://i.sstatic.net/KbzW2.png)](https://i.sstatic.net/KbzW2.png)

This is the method available in the control panel for selecting what layout ClearType uses.

Additionally, it seems that iOS and the Windows modern UI style de-emphasize subpixel antialiasing heavily, due to the prevalence of animations and screen rotations. As a result I expect the OS vendors to not spend a lot of effort trying to figure out the subpixel layout of every screen.


---

