diff options
author | Tor Lillqvist <tml@iki.fi> | 2000-07-18 06:06:41 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2000-07-18 06:06:41 +0000 |
commit | 5232745f652495ec1ab73fcb7368fe858cc0099c (patch) | |
tree | 0ef350a68f35220a40eb6dd61a8c1bd991df7ece /pango/pangowin32-fontmap.c | |
parent | ca5b24d14066ce35f5b92d117beee0e3605b2f4b (diff) | |
download | pango-5232745f652495ec1ab73fcb7368fe858cc0099c.tar.gz |
Add the pangowin32 sources.
2000-07-18 Tor Lillqvist <tml@iki.fi>
* pango/Makefile.am (EXTRA_DIST): Add the pangowin32 sources.
* pango/pangox.c (lang_texts): Add some Latin-1 to the
Finnish and Swedish strings.
* modules/module.def: New file.
* modules/Makefile.am (EXTRA_DIST): Add it.
* modules/basic/Makefile.am (EXTRA_DIST): Add basic-win32.c.
* */makefile.mingw: Small updates.
* pango/pangowin32.c
* pango/pangowin32-fontmap.c
* modules/basic/basic-win32.c
* examples/viewer-win32.c: Bug fixes. Remove dead code.
Now the Win32 implementation seems to work, except
for a few glitches.
Diffstat (limited to 'pango/pangowin32-fontmap.c')
-rw-r--r-- | pango/pangowin32-fontmap.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c index a7b6cde4..85298885 100644 --- a/pango/pangowin32-fontmap.c +++ b/pango/pangowin32-fontmap.c @@ -235,6 +235,7 @@ PangoFontMap * pango_win32_font_map_for_display (void) { LOGFONT logfont; + RECT rect; /* Make sure that the type system is initialized */ g_type_init(); @@ -253,7 +254,10 @@ pango_win32_font_map_for_display (void) pango_win32_font_map_read_aliases (fontmap); - fontmap->resolution = 0; /* ??? */ + SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0); + fontmap->resolution = + (PANGO_SCALE * 72.27 / 25.4) * ((double) GetDeviceCaps (pango_win32_hdc, HORZSIZE) / + (rect.right - rect.left)); return PANGO_FONT_MAP (fontmap); } @@ -1056,6 +1060,8 @@ pango_win32_font_map_read_alias_file (PangoWin32FontMap *win32fontmap, else font_entry->lfp[i].lfWeight = FW_HEAVY; + font_entry->lfp[i].lfQuality = ANTIALIASED_QUALITY; + /* Stretch ? */ /* Charset is ignored anyway when used with the widechar @@ -1324,7 +1330,9 @@ pango_win32_make_matching_logfont (PangoFontMap *fontmap, /* OK, we have a match; let's modify it to fit this size */ result = g_new (LOGFONT, 1); + *result = *closest_match; result->lfHeight = (int)((double)size / win32fontmap->resolution + 0.5); + result->lfWidth = 0; } return result; |