summaryrefslogtreecommitdiff
path: root/pango/pangoxft-font.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-03-15 01:32:36 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-03-15 01:32:36 +0000
commitbb3e77cc890eb14c9a3973b0c856ef5dc30aa606 (patch)
tree1b4fd3424b626b90ce1ad5584d44e32482aa31b3 /pango/pangoxft-font.c
parentca30a4175066d693135eb035c4546e9a519054c4 (diff)
downloadpango-bb3e77cc890eb14c9a3973b0c856ef5dc30aa606.tar.gz
Check for FT_Get_First_Char from FreeType-2.0.9.
Thu Mar 14 20:28:59 2002 Owen Taylor <otaylor@redhat.com> * configure.in: Check for FT_Get_First_Char from FreeType-2.0.9. * pango/pangoft2.c pango/pangoxft-font.c: Use FT_Get_First_Char/Get_Next_Char to accelerate coverage calculation.
Diffstat (limited to 'pango/pangoxft-font.c')
-rw-r--r--pango/pangoxft-font.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 6600bd78..4ec646ac 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -19,6 +19,8 @@
* Boston, MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <stdlib.h>
#include "pangoxft-private.h"
@@ -471,8 +473,8 @@ pango_xft_font_get_coverage (PangoFont *font,
coverage = pango_coverage_new ();
#ifdef HAVE_FT_GET_FIRST_CHAR
{
- FT_ULong gindex;
- FT_Ulong charcode;
+ FT_UInt gindex;
+ FT_ULong charcode;
charcode = FT_Get_First_Char (face, &gindex);
while (gindex)
@@ -484,14 +486,14 @@ pango_xft_font_get_coverage (PangoFont *font,
#else
/* Ugh, this is going to be SLOW */
{
- int i;
+ gunichar wc;
- for (i = 0; i < G_MAXUSHORT; i++)
+ for (wc = 0; wc < G_MAXUSHORT; wc++)
{
- FT_UInt glyph = FT_Get_Char_Index (face, i);
+ FT_UInt glyph = FT_Get_Char_Index (face, wc);
if (glyph && glyph < face->num_glyphs)
- pango_coverage_set (coverage, i, PANGO_COVERAGE_EXACT);
+ pango_coverage_set (coverage, wc, PANGO_COVERAGE_EXACT);
}
}
#endif