diff options
author | Tor Lillqvist <tml@novell.com> | 2005-04-28 17:20:05 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-04-28 17:20:05 +0000 |
commit | 3fc02e41c1efd23af4eb0e34af0fd6fa2783ead6 (patch) | |
tree | f65fd16983d0eae7d3d4fcc2fcf5dce17e2b133d /pango/pangowin32-fontmap.c | |
parent | 6aee1049a38fc25f25e2ed14a6ed303cc647556a (diff) | |
download | pango-3fc02e41c1efd23af4eb0e34af0fd6fa2783ead6.tar.gz |
Correct parameters passed to MultiByteToWideChar(). Pass -1 as source
2005-04-28 Tor Lillqvist <tml@novell.com>
* pango/pangocairo-win32font.c (pango_cairo_win32_font_get_font_face):
Correct parameters passed to MultiByteToWideChar(). Pass -1 as
source string length so that the target string gets
zero-terminated. Size of target array is in number of WCHARs, not
number of bytes.
Add support to pangowin32 for TrueType fonts with coverage outside
the BMP. Fix handling of surrogate pairs in the Uniscribe
shaper. (#302238)
* pango/pangowin32-private.h (PangoWin32Face): Rename the
unicode_table field to cmap. Keep track of its format (4 or 12).
(format_12_cmap): Add struct for a format 12 cmap.
* pango/pangowin32.c: Corresponding changes. Rename internal
functions a bit.
(get_format_12_cmap): New function, reads a format 12 cmap.
(font_get_cmap): Look for both format 12 (which is preferred) and
format 4 cmaps.
(pango_win32_font_get_glyph_index,
pango_win32_font_calc_coverage): Handle also format 12 cmaps.
* modules/basic/basic-win32.c: Handle surrogate pairs in wchar_t
strings properly.
(unichar_index): New function. Given a wchar_t string and an index
into it, calculate the index of the corresponding Unicode
character. Each surrogate pair in the wchar_t is just one Unicode
character.
(set_up_pango_log_clusters, itemize_shape_and_place): Use
unichar_index() instead of direct index into wchar_t string.
Diffstat (limited to 'pango/pangowin32-fontmap.c')
-rw-r--r-- | pango/pangowin32-fontmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c index 98057170..a618c0ae 100644 --- a/pango/pangowin32-fontmap.c +++ b/pango/pangowin32-fontmap.c @@ -143,12 +143,13 @@ pango_win32_enum_proc (LOGFONT *lfp, { LOGFONT lf; + PING(("%s", lfp->lfFaceName)); + if (fontType != TRUETYPE_FONTTYPE) return 1; lf = *lfp; - PING(("%s", lf.lfFaceName)); EnumFontFamiliesExA (pango_win32_hdc, &lf, (FONTENUMPROC) pango_win32_inner_enum_proc, lParam, 0); @@ -755,7 +756,8 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap, for (i = 0; i < PANGO_WIN32_N_COVERAGES; i++) win32face->coverages[i] = NULL; win32face->logfont = *lfp; - win32face->unicode_table = NULL; + win32face->cmap_format = 0; + win32face->cmap = NULL; font_family->font_entries = g_slist_append (font_family->font_entries, win32face); win32fontmap->n_fonts++; |