summaryrefslogtreecommitdiff
path: root/pango/pangocairo-win32fontmap.c
Commit message (Collapse)AuthorAgeFilesLines
* win32: Use GPrivate-managed display device contextYongsu Park2020-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | The document of [CreateDCA][1] says: > If lpszDriver or lpszDevice is DISPLAY, the thread that calls > CreateDC owns the HDC that is created. When this thread is > destroyed, the HDC is no longer valid. Thus, if you create the HDC > and pass it to another thread, then exit the first thread, > the second thread will not be able to use the HDC. So this change introduces GPrivate to fix potential problem. This also fixes the problem caused by accessing the global variable DC directly, which makes some early call to Pango functions fail. (e.g., failure of calling pango_win32_font_description_from_logfontw from _get_system_font_name in GTK.) [1]: https://docs.microsoft.com/windows/win32/api/wingdi/nf-wingdi-createdca
* Bug 682846 - Use G_DEFINE_TYPE in pangowin32-fontmapBehdad Esfahbod2013-03-151-2/+0
| | | | Based on patch from Chun-wei Fan.
* Add pango_font_map_changed()Alexander Larsson2013-02-261-0/+11
| | | | | | | This is needed as a base class sometimes needs to invalidate the fontmap. https://bugzilla.gnome.org/show_bug.cgi?id=694626
* Track changes in FontMaps using a serialAlexander Larsson2012-12-061-0/+14
| | | | | | | | This adds the pango_font_map_get_serial method that lets you see if a fontmap has changes since the last check. It adds implementations to all current fontmaps. https://bugzilla.gnome.org/show_bug.cgi?id=340066
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Behdad svn path=/trunk/; revision=2657
* Part of Bug 474708 – pangocairo leaks memoryBehdad Esfahbod2007-09-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 2007-09-07 Behdad Esfahbod <behdad@gnome.org> Part of Bug 474708 – pangocairo leaks memory * pango/pangocairo-font.c (_pango_cairo_font_private_get_hex_box_info): Fix a couple leaks. * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifontmap.c (pango_cairo_atsui_font_map_finalize): * pango/pangocairo-fc.h: * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_finalize): * pango/pangocairo-win32.h: * pango/pangocairo-win32fontmap.c (pango_cairo_win32_font_map_finalize): Remove unused leftover renderer variable. * pango/pangofc-fontmap.c (pango_fc_font_map_finalize): Fix thinko. svn path=/trunk/; revision=2424
* Implement PangoCairoWin32FontMap::get_font_type().Tor Lillqvist2007-06-121-0/+7
| | | | | | | | | | 2007-06-12 Tor Lillqvist <tml@novell.com> * pango/pangowin32-fontmap.c: Implement PangoCairoWin32FontMap::get_font_type(). svn path=/trunk/; revision=2349
* Add is_synthetic field.Tor Lillqvist2007-06-121-12/+0
| | | | | | | | | | | | | | | | 2007-06-12 Tor Lillqvist <tml@novell.com> * pango/pangowin32-private.h (struct PangoWin32Face: Add is_synthetic field. * pango/pangowin32-fontmap.c: Implement is_synthesized. * pango/pangocairo-win32font.c * pango/pangocairo-win32fontmap.c: Update for the changes to PangoCairoFontMap and PangoCairoFont. svn path=/trunk/; revision=2347
* *.c, *.h: Drop trailing whitespace.Behdad Esfahbod2007-01-161-3/+3
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Make sure #include <config.h> is the first include in the file. (bugBehdad Esfahbod2006-01-141-0/+2
| | | | | | | 2006-01-14 Behdad Esfahbod <behdad@gnome.org> * */*.c, */*/*.c: Make sure #include <config.h> is the first include in the file. (bug #158870, based on patch by Luis Menina)
* Move the calculation of dpi and size earlier. Use the size variable instadTor Lillqvist2005-09-221-1/+1
| | | | | | | | | | | | | | | | | 2005-09-22 Tor Lillqvist <tml@novell.com> * pango/pangocairo-win32font.c (_pango_cairo_win32_font_new): Move the calculation of dpi and size earlier. Use the size variable instad of isize when looking for a matching cached font. Isize was supposed to be the same as size anyway. (Actually it was the same only when LOGPIXELSY equalled 96 (which often is the default value), see below.) * pango/pangocairo-win32fontmap.c (pango_cairo_win32_font_map_init): Set dpi to the LOGPIXELSY value instead of hardcoding 96. * pango/Makefile.am (libpangocairo_1_0_la_LIBADD): Need WIN32_LIBS now.
* PangoCairoFontMap for win32 fonts.Owen Taylor2005-02-241-0/+108
2005-02-24 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-win32.h pango/pangocairo-win32font.c pango/pangocairo-win32fontmap.c pango/Makefile.am: PangoCairoFontMap for win32 fonts. * pango/pangocairo-fontmap.c: Use PangoCairoWin32FontMap when available. * pango/pangowin32.h pango/pangowin32-fontmap.h pango/pangowin32.c: Add virtual pango_win32_font_select_font() to prepare a DC for use with a PangoWin32Font, and to release, pango_win32_font_scale_font() to get logical unit => Pango units scale, pango_win32_font_done_font() to release resources. * pango/pangowin32-fontmap.[ch]: Add a find_font() virtual method to allow subclasses that change how PangoFont lookup and creation happens. * pango/pangowin32-fontmap.c: Move initialization into pango_win32_font_map_init() to facilitate derivation. * pango/pangowin2.c pango/pangowin32-fontmap.c pango/pangowin32-private.h: Move PangoWin32Font/PangoWin32FontMap definitions into pangowin32-private.h to allow derivation for PangoCairoWin32Font. * modules/basic/basic-win32.c: Use pango_win32_font_select_font() and friends. * modules/basic/basic-win32.c: Use g_utf8_to_utf16 instead of g_convert for simplicity and speed. * pango/fonts.c (pango_font_get_font_map) pango/pango-font.h pango/pangofc-font.c pango/pangowin32.c pango/pango.c pango/pango.def docs/pango-sections.txt: Add a virtual function to get the fontmap for a font. * pango/pangocairo-render.c: Use pango_font_get_font_map() rather than PangoFcFontMap hack. * pango/pango-types.h: Move the declaration of PangoFontMap here to avoid interactions between pango-font.h and pango-fontmap.h. * pango/pangocairo.h: Remove accidental include of pangofc-fontmap.h.