Emacs Font is wider
Emacs Font is wider than other applications. Most people don't notice the difference. If you can perceive it, you are not hallucinating. This can be attributed to the following:
Points per inch
#ifndef HAVE_ANDROID
/* Number of pt per inch (from the TeXbook). */
#define PT_PER_INCH 72.27
#else
/* Android uses this value instead to compensate for different device
dimensions. */
#define PT_PER_INCH 160.00
#endif
/* Number of pt per inch (from the TeXbook). */
#define PT_PER_INCH 72.27
#else
/* Android uses this value instead to compensate for different device
dimensions. */
#define PT_PER_INCH 160.00
#endif
Emacs definition is larger than the standard definition. The DTP point is defined as 1⁄72 of an inch.
Round-off error
Emacs definition:
/* Return a pixel size (integer) corresponding to POINT size (double)
on resolution DPI. */
#define POINT_TO_PIXEL(POINT, DPI) ((POINT) * (DPI) / PT_PER_INCH + 0.5)
/* Return a point size corresponding to POINT size (integer)
on resolution DPI. Note that though point size is a double, we expect
it to be rounded to an int, so we add 0.5 here. If the desired value
is tenths of points (as in xfld specs), then the pixel size should
be multiplied BEFORE the conversion to avoid magnifying the error. */
#define PIXEL_TO_POINT(PIXEL, DPI) ((PIXEL) * PT_PER_INCH / (DPI) + 0.5)
on resolution DPI. */
#define POINT_TO_PIXEL(POINT, DPI) ((POINT) * (DPI) / PT_PER_INCH + 0.5)
/* Return a point size corresponding to POINT size (integer)
on resolution DPI. Note that though point size is a double, we expect
it to be rounded to an int, so we add 0.5 here. If the desired value
is tenths of points (as in xfld specs), then the pixel size should
be multiplied BEFORE the conversion to avoid magnifying the error. */
#define PIXEL_TO_POINT(PIXEL, DPI) ((PIXEL) * PT_PER_INCH / (DPI) + 0.5)
Rounding-off error is unavoidable. While looking for its source, look for how it's compensated in the application being compared.
Comments
Post a Comment