- // So pixelHeight = (pointSize / 20) (inches) * 2.541 (for cm) * yPixelsPerCM (for pixels)
-
- int pixelHeight = (int) ( (((float)pointSize) / 20.0) * 2.541 * (float) yPixelsPerCM) ;
+ // So pixelHeight = (pointSize / 72) (inches) * 2.541 (for cm) * yPixelsPerCM (for pixels)
+ // In fact pointSize is 10 * the normal point size so
+ // divide by 10.
+
+ int pixelHeight = (int) ( (((float)pointSize) / 720.0) * 2.541 * (float) yPixelsPerCM) ;
+
+ // An alternative: assume that the screen is 72 dpi.
+ //int pixelHeight = (int) (((float)pointSize / 720.0) * 72.0) ;
+ //int pixelHeight = (int) ((float)pointSize / 10.0) ;