summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2002-05-26 00:19:10 +0000
committerTor Lillqvist <tml@src.gnome.org>2002-05-26 00:19:10 +0000
commit25878a0341a8076296ab4ae88ee972641e6f963c (patch)
tree6b65ac21b13ca2948c94a2504efc88e9160e5c12 /pango
parent2ae219a829b3b2c77f27b93cc4b03a2ddde23fd5 (diff)
downloadpango-25878a0341a8076296ab4ae88ee972641e6f963c.tar.gz
Use complete PANGO_VERSION in zip file names.
2002-05-26 Tor Lillqvist <tml@iki.fi> * pango-zip.sh.in: Use complete PANGO_VERSION in zip file names. * pango/Makefile.am: (Win32) Compile resource files and link with them. * pango/pango.rc.in * pango/pangoft2.rc.in * pango/pangowin32.rc.in: Include also the micro version number. * pango/pangowin32-fontcache.c (logfont_hash): Use absolute value of lfHeight. * pango/pangowin32-fontmap.c (pango_win32_font_map_for_display): Instead of HORZSIZE which is Windows idea of physical monitor width (but which can be *very* wrong), use LOGPIXELSY (the "logical" dpi). This can be set by the user by choosing "small fonts", "large fonts", or a custom dpi in the Display Settings. Thanks to Joaquin Cuenca Abela. (pango_win32_make_matching_logfont): Set lfHeight to the negative of the requested size. Positive lfHeight indicates "cell height", negative "character height" (?), which is closer to what we want, says Joaquin Cuenca Abela.
Diffstat (limited to 'pango')
-rw-r--r--pango/Makefile.am24
-rw-r--r--pango/pango.rc.in8
-rw-r--r--pango/pangoft2.rc.in8
-rw-r--r--pango/pangowin32-fontcache.c2
-rw-r--r--pango/pangowin32-fontmap.c10
-rw-r--r--pango/pangowin32.rc.in8
6 files changed, 35 insertions, 25 deletions
diff --git a/pango/Makefile.am b/pango/Makefile.am
index 1de42abb..08093ee8 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -72,6 +72,10 @@ pango_export_symbols = -export-symbols pango.def
pangowin32_export_symbols = -export-symbols pangowin32.def
pangoft2_export_symbols = -export-symbols pangoft2.def
+pango_win32res = pango-win32res.lo
+pangowin32_win32res = pangowin32-win32res.lo
+pangoft2_win32res = pangoft2-win32res.lo
+
install-libtool-import-lib:
$(INSTALL) .libs/libpango-$(PANGO_API_VERSION).dll.a $(DESTDIR)$(libdir)
if HAVE_FREETYPE
@@ -154,14 +158,19 @@ libpango_1_0_la_LDFLAGS = \
$(no_undefined) $(pango_export_symbols)
if HAVE_FRIBIDI
+libpango_1_0_la_LIBADD = $(pango_win32res)
else
-libpango_1_0_la_LIBADD = mini-fribidi/libmini-fribidi.la
+libpango_1_0_la_LIBADD = mini-fribidi/libmini-fribidi.la $(pango_win32res)
endif
+libpango_1_0_la_DEPENDENCIES = $(pango_win32res)
libpangox_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
libpangox_1_0_la_LIBADD = libpango-$(PANGO_API_VERSION).la $(INCLUDED_X_MODULES) $(X_LIBS) $(X_EXTRA_LIBS)
libpangox_1_0_la_DEPENDENCIES = $(INCLUDED_X_MODULES) libpango-$(PANGO_API_VERSION).la
+pango-win32res.lo : pango.rc
+ $(top_srcdir)/../glib/build/win32/lt-compile-resource pango.rc pango-win32res.lo
+
libpangowin32_1_0_la_SOURCES = \
pangowin32.h \
pangowin32.c \
@@ -173,9 +182,11 @@ libpangowin32_1_0_la_SOURCES = \
libpangowin32_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) \
$(GLIB_LIBS) \
$(no_undefined) $(pangowin32_export_symbols)
-libpangowin32_1_0_la_LIBADD = libpango-$(PANGO_API_VERSION).la $(INCLUDED_WIN32_MODULES) $(WIN32_LIBS)
-libpangowin32_1_0_la_DEPENDENCIES = libpango-$(PANGO_API_VERSION).la
+libpangowin32_1_0_la_LIBADD = libpango-$(PANGO_API_VERSION).la $(INCLUDED_WIN32_MODULES) $(WIN32_LIBS) $(pangowin32_win32res)
+libpangowin32_1_0_la_DEPENDENCIES = libpango-$(PANGO_API_VERSION).la $(pangowin32_win32res)
+pangowin32-win32res.lo : pangowin32.rc
+ $(top_srcdir)/../glib/build/win32/lt-compile-resource pangowin32.rc pangowin32-win32res.lo
libpangoxft_1_0_la_SOURCES = \
pangoxft-font.c \
@@ -197,8 +208,11 @@ libpangoft2_1_0_la_SOURCES = \
libpangoft2_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) \
$(GLIB_LIBS) \
$(no_undefined) $(pangoft2_export_symbols)
-libpangoft2_1_0_la_LIBADD = mini-xft/libmini-xft.la opentype/libpango-ot.la libpango-$(PANGO_API_VERSION).la $(INCLUDED_FT2_MODULES) $(FREETYPE_LIBS)
-libpangoft2_1_0_la_DEPENDENCIES = $(INCLUDED_FT2_MODULES) libpango-$(PANGO_API_VERSION).la
+libpangoft2_1_0_la_LIBADD = mini-xft/libmini-xft.la opentype/libpango-ot.la libpango-$(PANGO_API_VERSION).la $(INCLUDED_FT2_MODULES) $(FREETYPE_LIBS) $(pangoft2_win32res)
+libpangoft2_1_0_la_DEPENDENCIES = $(INCLUDED_FT2_MODULES) libpango-$(PANGO_API_VERSION).la $(pangoft2_win32res)
+
+pangoft2-win32res.lo : pangoft2.rc
+ $(top_srcdir)/../glib/build/win32/lt-compile-resource pangoft2.rc pangoft2-win32res.lo
pangoincludedir=$(includedir)/pango-1.0/pango
diff --git a/pango/pango.rc.in b/pango/pango.rc.in
index de051b0a..814e9a42 100644
--- a/pango/pango.rc.in
+++ b/pango/pango.rc.in
@@ -1,8 +1,8 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,0,BUILDNUMBER
- PRODUCTVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,0,0
+ FILEVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,@PANGO_MICRO_VERSION@,BUILDNUMBER
+ PRODUCTVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,@PANGO_MICRO_VERSION@,0
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS__WINDOWS32
@@ -15,12 +15,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "Red Hat Software"
VALUE "FileDescription", "Pango"
- VALUE "FileVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.0.BUILDNUMBER"
+ VALUE "FileVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.@PANGO_MICRO_VERSION@.BUILDNUMBER"
VALUE "InternalName", "pango-@PANGO_API_VERSION@-@LT_CURRENT_MINUS_AGE@"
VALUE "LegalCopyright", "Copyright © 1999 Red Hat Software."
VALUE "OriginalFilename", "pango-@PANGO_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll"
VALUE "ProductName", "Pango"
- VALUE "ProductVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@"
+ VALUE "ProductVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.@PANGO_MICRO_VERSION@"
END
END
BLOCK "VarFileInfo"
diff --git a/pango/pangoft2.rc.in b/pango/pangoft2.rc.in
index 733a8390..c6438004 100644
--- a/pango/pangoft2.rc.in
+++ b/pango/pangoft2.rc.in
@@ -1,8 +1,8 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,0,BUILDNUMBER
- PRODUCTVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,0,0
+ FILEVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,@PANGO_MICRO_VERSION@,BUILDNUMBER
+ PRODUCTVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,@PANGO_MICRO_VERSION@,0
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS__WINDOWS32
@@ -15,12 +15,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "Red Hat Software"
VALUE "FileDescription", "PangoFT2"
- VALUE "FileVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.0.BUILDNUMBER"
+ VALUE "FileVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.@PANGO_MICRO_VERSION@.BUILDNUMBER"
VALUE "InternalName", "pangoft2-@PANGO_API_VERSION@-@LT_CURRENT_MINUS_AGE@"
VALUE "LegalCopyright", "Copyright © 1999 Red Hat Software. Copyright © 2000 Tor Lillqvist"
VALUE "OriginalFilename", "pangoft2-@PANGO_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll"
VALUE "ProductName", "PangoFT2"
- VALUE "ProductVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@"
+ VALUE "ProductVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.@PANGO_MICRO_VERSION@"
END
END
BLOCK "VarFileInfo"
diff --git a/pango/pangowin32-fontcache.c b/pango/pangowin32-fontcache.c
index 6dd87c5b..9d8db725 100644
--- a/pango/pangowin32-fontcache.c
+++ b/pango/pangowin32-fontcache.c
@@ -91,7 +91,7 @@ logfont_hash (gconstpointer v)
lfp->lfItalic +
lfp->lfWeight/10 +
lfp->lfOrientation +
- lfp->lfHeight * 10;
+ abs (lfp->lfHeight) * 10;
}
static gint
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index 31a945d6..01227d04 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -244,7 +244,6 @@ PangoFontMap *
pango_win32_font_map_for_display (void)
{
LOGFONT logfont;
- RECT rect;
/* Make sure that the type system is initialized */
g_type_init ();
@@ -265,10 +264,7 @@ pango_win32_font_map_for_display (void)
pango_win32_font_map_read_aliases (fontmap);
#endif
- SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
- fontmap->resolution =
- (PANGO_SCALE * 72.27 / 25.4) * ((double) GetDeviceCaps (pango_win32_hdc, HORZSIZE) /
- (rect.right - rect.left));
+ fontmap->resolution = PANGO_SCALE / GetDeviceCaps (pango_win32_hdc, LOGPIXELSY) * 72.0;
return PANGO_FONT_MAP (fontmap);
}
@@ -888,7 +884,7 @@ pango_win32_make_matching_logfont (PangoFontMap *fontmap,
while (tmp_list)
{
LOGFONT *tmp_logfont = tmp_list->data;
- int font_size = tmp_logfont->lfHeight;
+ int font_size = abs (tmp_logfont->lfHeight);
if (size != -1)
{
@@ -911,7 +907,7 @@ pango_win32_make_matching_logfont (PangoFontMap *fontmap,
/* OK, we have a match; let's modify it to fit this size */
*out = *closest_match;
- out->lfHeight = (int)((double)size / win32fontmap->resolution + 0.5);
+ out->lfHeight = -(int)((double)size / win32fontmap->resolution + 0.5);
out->lfWidth = 0;
}
else
diff --git a/pango/pangowin32.rc.in b/pango/pangowin32.rc.in
index 4ca3aced..b7e87fd9 100644
--- a/pango/pangowin32.rc.in
+++ b/pango/pangowin32.rc.in
@@ -1,8 +1,8 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,0,BUILDNUMBER
- PRODUCTVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,0,0
+ FILEVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,@PANGO_MICRO_VERSION@,BUILDNUMBER
+ PRODUCTVERSION @PANGO_MAJOR_VERSION@,@PANGO_MINOR_VERSION@,@PANGO_MICRO_VERSION@,0
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS__WINDOWS32
@@ -15,12 +15,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "Red Hat Software"
VALUE "FileDescription", "PangoWin32"
- VALUE "FileVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.0.BUILDNUMBER"
+ VALUE "FileVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.@PANGO_MICRO_VERSION@.BUILDNUMBER"
VALUE "InternalName", "pangowin32-@PANGO_API_VERSION@-@LT_CURRENT_MINUS_AGE@"
VALUE "LegalCopyright", "Copyright © 1999 Red Hat Software. Copyright © 2000 Tor Lillqvist"
VALUE "OriginalFilename", "pangowin32-@PANGO_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll"
VALUE "ProductName", "PangoWin32"
- VALUE "ProductVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@"
+ VALUE "ProductVersion", "@PANGO_MAJOR_VERSION@.@PANGO_MINOR_VERSION@.@PANGO_MICRO_VERSION@"
END
END
BLOCK "VarFileInfo"