diff options
author | Alexander Larsson <alexl@redhat.com> | 2001-08-09 05:01:15 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2001-08-09 05:01:15 +0000 |
commit | 94d2ab7165c8ce889cfd6d237c74b96031ffdb9a (patch) | |
tree | 4cfffc75e1d4a8c4645f2d72693672802c1b0bf9 /pango/pangowin32-private.h | |
parent | 53fd91c02a3433a99a1797cc20f5bd7527db414f (diff) | |
download | pango-94d2ab7165c8ce889cfd6d237c74b96031ffdb9a.tar.gz |
Large rewrite of the win32 backend to use real glyph indexes instead of
2001-08-09 Alexander Larsson <alexl@redhat.com>
* pango/pangowin32.h:
* pango/pangowin32-private.h:
* pango/pangowin32.c:
* pango/pangowin32-fontmap.c:
* modules/basic/basic-win32.c:
* pango/pangowin32.def:
Large rewrite of the win32 backend to use real glyph indexes
instead of unicode codes. Also drops the subfont thing, thereby
simplifying the code immensely. This looses some functionality,
but i will add that back soon using global (non backend-specific)
aliases.
This is the first cut, and is not perfect. It still has some issues
and imperfections, but it so clearly better than the current
imlementation that I'm checking it in anyway.
Diffstat (limited to 'pango/pangowin32-private.h')
-rw-r--r-- | pango/pangowin32-private.h | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/pango/pangowin32-private.h b/pango/pangowin32-private.h index 238326d2..2970fb49 100644 --- a/pango/pangowin32-private.h +++ b/pango/pangowin32-private.h @@ -3,6 +3,7 @@ * * Copyright (C) 1999 Red Hat Software * Copyright (C) 2000 Tor Lillqvist + * Copyright (C) 2001 Alexander Larsson * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -50,61 +51,61 @@ typedef struct _PangoWin32Font PangoWin32Font; typedef struct _PangoWin32FontEntry PangoWin32FontEntry; -typedef struct _PangoWin32SubfontInfo PangoWin32SubfontInfo; +typedef struct _PangoWin32GlyphInfo PangoWin32GlyphInfo; struct _PangoWin32Font { PangoFont font; - LOGFONT *logfonts; - int n_logfonts; + LOGFONT logfont; int size; - /* hash table mapping from Unicode subranges to array of PangoWin32Subfont - * ids, of length n_subfonts - */ - GHashTable *subfonts_by_subrange; - - PangoWin32SubfontInfo **subfonts; + PangoFontMap *fontmap; - int n_subfonts; - int max_subfonts; + /* Written by pango_win32_get_hfont: */ + HFONT hfont; + gint tm_ascent; + gint tm_descent; + gint tm_overhang; - GSList *metrics_by_lang; + PangoWin32FontEntry *entry; - PangoFontMap *fontmap; /* If TRUE, font is in cache of recently unused fonts and not otherwise * in use. */ gboolean in_cache; - - PangoWin32FontEntry *entry; + GHashTable *glyph_info; }; struct _PangoWin32FontEntry { - LOGFONT *lfp; - int n_fonts; + LOGFONT logfont; PangoFontDescription description; PangoCoverage *coverage; + gpointer unicode_table; + GSList *cached_fonts; }; +struct _PangoWin32GlyphInfo +{ + PangoRectangle logical_rect; + PangoRectangle ink_rect; +}; + + PangoWin32Font *pango_win32_font_new (PangoFontMap *fontmap, const LOGFONT *lfp, - int n_fonts, int size); PangoMap * pango_win32_get_shaper_map (PangoLanguage *lang); -gboolean pango_win32_logfont_has_subrange (PangoFontMap *fontmap, - LOGFONT *lfp, - PangoWin32UnicodeSubrange subrange); -LOGFONT * pango_win32_make_matching_logfont (PangoFontMap *fontmap, - LOGFONT *lfp, - int size); -PangoCoverage * pango_win32_font_entry_get_coverage (PangoWin32FontEntry *entry, - PangoFont *font, - PangoLanguage *lang); +void pango_win32_make_matching_logfont (PangoFontMap *fontmap, + const LOGFONT *lfp, + int size, + LOGFONT *out); +PangoCoverage * pango_win32_font_entry_get_coverage (PangoWin32FontEntry *entry); +void pango_win32_font_entry_set_coverage (PangoWin32FontEntry *entry, + PangoCoverage *coverage); void pango_win32_font_entry_remove (PangoWin32FontEntry *entry, PangoFont *font); |