summaryrefslogtreecommitdiff
path: root/examples/viewer-win32.c
Commit message (Collapse)AuthorAgeFilesLines
* Use g_file_test().Tor Lillqvist2000-11-301-2/+2
| | | | | | | | | | 2000-12-01 Tor Lillqvist <tml@iki.fi> * pango/pango-utils.c (pango_get_sysconf_subdirectory): Use g_file_test(). * examples/viewer-win32.c (main): Disable double buffering on the layout widget only when building with GTK+ 1.3.2 or newer.
* Define PANGO_VERSION.Tor Lillqvist2000-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-30 Tor Lillqvist <tml@iki.fi> * pango/makefile.mingw.in (DEFINES): Define PANGO_VERSION. Changes by Hans Breuer: * pango/pango-layout.c (shape_tab): Add a FIXME comment. * pango/pango-markup.c (compare_xcolor_entries): Use g_strcasecmp. * pango/pango-utils.c (pango_get_sysconf_subdirectory): Use second fallback location if there is no pango subdir in the Windows directory. * pango/pangowin32-fontmap.c (pango_win32_font_entry_get_coverage): Check if fopen succeeded. * pango/pangowin32-private.h (DEBUGGING): Turn off. * pango/pangowin32.c (pango_win32_unicode_classify): We can in fact get out of the loop. Return invalid value in that case. (subfont_has_glyph): Improve performance a bit. * pango/querymodules.c: Small change for MSVC build. * modules/basic/basic-win32.c (basic_engine_get_coverage): Performance improvement. * examples/viewer-win32.c (main): Disable double buffering on the layout widget.
* Handle also ft_pixel_mode_mono glyphs.Tor Lillqvist2000-08-201-1/+1
| | | | | | | | | | | | | | | 2000-08-21 Tor Lillqvist <tml@iki.fi> * pango/pangoft2.c (pango_ft2_render): Handle also ft_pixel_mode_mono glyphs. * pango/pangoft2*: Portability enhancements (non-gcc). * examples/viewer-{ft2,win32}.c: One more 1000 vs. PANGO_SCALE fix. * pango/module-defs.c.win32: New file. * pango/Makefile.am: Distribute it.
* examples/viewer-ft2.c Replace division or multiplication with 1000 (whichTor Lillqvist2000-08-201-8/+10
| | | | | | | | | 2000-08-20 Tor Lillqvist <tml@iki.fi> * examples/viewer-ft2.c * examples/viewer-win32.c: Replace division or multiplication with 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and PANGO_PIXELS instead.
* Add parameter telling whether to print warning or not if string isn'tTor Lillqvist2000-08-201-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-20 Tor Lillqvist <tml@iki.fi> * pango/pango-utils.c (pango_parse_*): Add parameter telling whether to print warning or not if string isn't recognised. Use g_strncasecmp(). * pango/pango-utils.h: Change prototype accordingly. * pango/pangox-fontmap.c * pango/pangowin32-fontmap.c: Change calls correspondingly. * pango/pangowin32.h: * pango/pangowin32.c: Cosmetic changes, dead code removal. * pango/pangoft2.h * pango/pangoft2-private.h * pango/pangoft2.c * pango/pangoft2-fontmap.c * pango/pangoft2-fontcache.c: New files implementing a FreeType2 backend. Used only on Win32 so far, but doesn't contain Win32-specific code per se, so if somebody wants to try it out on X11, too, be my guest. It works, more or less, but there are some details still to sort out. Performance needs to be improved. Debugging printouts still present. Font path currently hardcoded to C:\windows\fonts, heh. Owen says he doesn't think it's a good idea to use ths on Win32, but I'll try anyway. If it turns out using the native Win32 GDI backend is better after all, oh well. * pango/makefile.mingw: Delete. Move contents to makefile.mingw.in. * pango/makefile.mingw.in: New file. Add rules for FreeType2 backend. Add FreeType2 CFLAGS and LIBS. * pango/Makefile.am: Generate makefile.mingw. (EXTRA_DIST): Add FreeType2 backend sources, and makefile.mingw{,.in} * modules/basic/basic-win32.c: Couple of cosmetic changes. * modules/basic/Makefile.am: Generate makefile.mingw. (EXTRA_DIST): Add basic-ft2.c, and makefile.mingw{,.in} * modules/basic/makefile.mingw: Delete. Move contents to makefile.mingw.in. * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. * examples/viewer-win32.c (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the GtkLayout window using gdk_draw_gray_image from GdkRGB (!). Yes, this is kinda circular dependency between Pango and GTK+. * examples/makefile.mingw: Delete. Move contents to makefile.mingw.in. * examples/makefile.mingw.in: New file. Add rules for viewer-ft2. Add FreeType2 CFLAGS and LIBS. * examples/Makefile.am: Generate makefile.mingw. (EXTRA_DIST): Add viewer-win32.c and viewer-ft2.c, and makefile.mingw{,.in}
* Add the pangowin32 sources.Tor Lillqvist2000-07-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* pango/pango-utils.h pango/pango-utils.c pango/pangox-fontmap.c Move theTor Lillqvist2000-07-161-35/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-07-16 Tor Lillqvist <tml@iki.fi> * pango/pango-utils.h * pango/pango-utils.c * pango/pangox-fontmap.c * pango/pangowin32-fontmap.c: Move the get_{style,variant, weight,stretch} functions to pango-utils.c, and rename them to pango_parse_*. Would otherwise be duplicated in pangox and angowin32. * pango/pango.def: Export them. * pango/pango-font.h: Add PANGO_WEIGHT_ULTRALIGHT, PANGO_WEIGHT_LIGHT, PANGO_WEIGHT_EXTRABOLD and PANGO_WEIGHT_HEAVY values to PangoWeight. * pango/pango-utils.c: Recognize the new weight strings. * pango/pangowin32.c (pango_win32_list_subfonts): Don't g_free the subfont_list from the subfonts_by_subrange hash table... * pango/pangowin32-fontmap.c (pango_win32_font_map_read_alias_file): Also set the other properties in the LOGFONT, not only the face name. (pango_win32_insert_font): Insert a pointer to a freshly allocated LOGFONT in the hash table, not the one passed in as a parameter, which could be (and in fact, *is*) a pointer to an auto variable. Quantize the description weight values to exact PANGO_WEIGHT_* values. (pango_win32_get_unknown_glyph): Use subfont 1. * examples/viewer-win32.c: (split_paragraphs): Don't include the newline. (draw): Correct 1st parameter to gdk_win32_hdc_{get,release}.
* pango/pangowin32.h pango/pangowin32-private.h pango/pangowin32-fontcache.cTor Lillqvist2000-07-151-0/+742
2000-07-15 Tor Lillqvist <tml@iki.fi> * pango/pangowin32.h * pango/pangowin32-private.h * pango/pangowin32-fontcache.c * pango/pangowin32-fontmap.c * modules/basic/basic-win32.c * examples/viewer-win32.c * examples/pangowin32.aliases: New files. Start of a Win32 implementation. Does not work yet. * configure.in: Chek for dirent.h and unistd.h. * pango/pango-utils.h * pango/pango-utils.c (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory): New functions, for better portability, to enable installation-time choice of directory (on Windows) instead of compile-time. Use these instead of SYSCONFDIR "/pango" and LIBDIR "/pango". (pango_split_file_list): Fix comment, the function splits on searchpath separators, not commas. Use G_SEARCHPATH_SEPARATOR_S for portability. Don't try to expand '~' as home directory on Windows. (read_config): Use pango_get_sysconf_subdirectory(). * pango/modules.c (read_modules): Use pango_get_sysconf_subdirectory(). Don't crash if a module file cannot be opened. * pango/querymodules.c: Include config.h Conditionalize inclusion of dirent.h and unistd.h. Use platform-specific shared library extension. Use pango_get_lib_subdirectory().