I'm doing some graphics (in Javascript, if that's relevant), and I know you can size fonts with `pt`, `px`, `%`, etc. When looking up what `px` means, every site seems to have the same vague answer -- the size of the font in pixels. I'm wondering what *exactly* `px` represents. For example, if I have `20px`, will 20 pixels represent the height of a capital `A`, a small `e`, a lowercase `g` or the difference between the bottom of the `g` and the top of the `A`? (I'm assuming it's the size of the `A`, but I just want to double check).

Furthermore, `px` is apparently relative to the view size. So if I do a `fillRect(1,1,20,20)`, will this be the size of a capital A at 20px, or does the font size change on different devices independent of the graphics?