5 ms·
Makes me wonder - is it possible to make an algorithm that does automatic pixel fitting?
by spion 14y ago
Makes me wonder - is it possible to make an algorithm that does automatic pixel fitting?
- wmf 14y agoThere's automatic hinting for type rendering, so I guess those algorithms could be generalized. But you can probably go far by just fitting everything in your 2x version to even pixels and using even-width lines; then the scaled-down 1x version will be sharp.
- baddox 14y agoFont hinting is precisely that, and it works quite well, at least for body text. I'm sure that more critical applications like logo design still require some hands-on work to get the best results. As with any vector rasterization, you do trade accuracy for pixel fitting, but for things like small body text you almost always want that. For example, if the 1 pixel wide vertical stem of a "b" is supposed to be between two columns of pixels, the hinting algorithm can push the stem either left or right so it is rendered as a single black column of pixels, rather than two gray columns of pixels. This will look less fuzzy, but it will technically cause the "b" to be closer than it should be to an adjacent character. http://en.wikipedia.org/wiki/Font_hinting http://en.wikipedia.org/wiki/Font_hinting
- spion 14y agoYes, after I wrote that it hit me: font hinting would qualify as automatic pixel fitting. I was thinking about something more elaborate, like an algorithm that takes distances between neighboring elements, proportions and other factors into account (and which can be tuned to include/exclude factors). An example "smart" rule would be: If a group of elements are aligned, the same size and the same distance, they must remain aligned, the same size and the same distance after the processing Ideally it would be a plugin for a vector graphics application which could then allow the designer to add finishing touches to the places where the algorithm got it wrong.