The problem: There is a need to design web pages that render reliably
(identically) on different browsers and at different screen resolutions.
Also, we'd like users to be able to scale the whole web page (fonts and
graphics),
or to just scale the fonts (at their own risk, of course).
Possible solution number 1: Use PDF for everything. (Just kidding.)
Possible solution number 2 (my humbly-submitted solution):
1. Design your HTML documents with a specific screen resolution (DPI) in
mind.
Dpecified the DPI with a certain tag in the document. If no DPI is
specified,
default to some standard value, like 96 dpi. (The specific tag and the
default DPI would have to go into the HTML standard.)
2. Specify all sizes and positions in pixels, because everybody knows what
a pixel is.
3. Use embedded fonts instead of relying on the browser's default fonts.
(Or, somebody create a well-defined set of default fonts that every
browser should use.)
OK, with (1) through (3) we have a document that will always render the same
if
the browser is working correctly... Now for the scaling issues.
4. By default, the browser should scale the entire HTML document according
to the local screen DPI and the HTML document's DPI. This is, if the
HTML document uses 72 dpi, and the screen is 96 dpi, then the browser
should scale the page by 1.33. It should resample the images, and scale
the font sizes appropriately before re-rendering them. It should NOT
just
create a bitmap of the whole page and scale the bitmap, because that
would suck.
5. Because resampling images loses information, the browser should also be
able to display the page without scaling, that is, pixel-for-pixel.
Resampling images is not the best solution, but it is an easy one.
But here's another idea on how to better handle scaled images:
6. Have the web server do the work. Create the original images in a high
resolution,
like 200 or 300 dpi. When the browser asks for an image, it will have to
tell
the web server what DPI it wants it in. (This could be implemented as an
extra
line in the HTTP command or as part of the actual URL. Either way, it
will
require a change to the standards, the web servers, and the browsers. A
hassle,
yes, but we'll be better off in the long run.) OK, so now the web server
has
to send the image. If it's smart then it will have a cache of the image
rendered
at the most popular sizes. If it's not, then it will have to resize
(resample)
the image before sending it.
That's about it. In a perfect world, this is how it would work. But I
doubt
it will ever happen.