Author: toshok
Date: 2007-01-02 11:56:55 -0500 (Tue, 02 Jan 2007)
New Revision: 70370
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/general.c
Log:
2007-01-02 Chris Toshok <[EMAIL PROTECTED]>
* general.c (gdip_get_display_dpi): we don't want to get what the
rest of X assumes is the dpi. we want the actual dpi of the
screen, so that we can correctly map to the actual size of fonts
when the user asks for a particular size. This removes the need
for the hack of setting the SWF DefaultFont to be 8pt instead of
8.25pt to get things to line up.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2007-01-02 16:45:11 UTC (rev 70369)
+++ trunk/libgdiplus/src/ChangeLog 2007-01-02 16:56:55 UTC (rev 70370)
@@ -1,3 +1,12 @@
+2007-01-02 Chris Toshok <[EMAIL PROTECTED]>
+
+ * general.c (gdip_get_display_dpi): we don't want to get what the
+ rest of X assumes is the dpi. we want the actual dpi of the
+ screen, so that we can correctly map to the actual size of fonts
+ when the user asks for a particular size. This removes the need
+ for the hack of setting the SWF DefaultFont to be 8pt instead of
+ 8.25pt to get things to line up.
+
2006-12-21 Sebastien Pouliot <[EMAIL PROTECTED]>
* imageattributes.c: Fix bug #80323 for ColorMatrix containing alpha
Modified: trunk/libgdiplus/src/general.c
===================================================================
--- trunk/libgdiplus/src/general.c 2007-01-02 16:45:11 UTC (rev 70369)
+++ trunk/libgdiplus/src/general.c 2007-01-02 16:56:55 UTC (rev 70370)
@@ -220,13 +220,8 @@
display = XOpenDisplay (0);
/* If the display is openable lets try to read dpi from it;
otherwise use a default of 96.0f */
if (display) {
- /* the val pointer is owned by X (do not free) */
- val = XGetDefault (display, "Xft", "dpi");
- if (val) {
- dpis = atof (val);
- } else {
- dpis = 96.0f;
- }
+ dpis = (((float) DisplayHeight (display, 0) * 25.4f) /
+ (float) DisplayHeightMM (display, 0));
XCloseDisplay (display);
} else {
dpis = 96.0f;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches