Commit d8fe8eaf authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

use #if HAVE_DECL_XXX instead of #ifdef HAVE_DECL_XXX, noted by Bob Doan.

* src/vteglyph.c: use #if HAVE_DECL_XXX instead of #ifdef HAVE_DECL_XXX, noted
	by Bob Doan.
parent e5a1bd96
2003-04-21 nalin
* src/vteglyph.c: use #if HAVE_DECL_XXX instead of #ifdef HAVE_DECL_XXX,
noted by Bob Doan.
2003-04-20 nalin
* src/vtexft.c: work around for garbled glyphs when drawing runs of
text using multiple fonts while mixing bitmap and antialiased fonts
......
......@@ -513,10 +513,10 @@ _vte_glyph_get(struct _vte_glyph_cache *cache, gunichar c)
ioffset *= (-face->glyph->bitmap.pitch);
}
switch (face->glyph->bitmap.pixel_mode) {
#ifdef HAVE_DECL_FT_PIXEL_MODE_MONO
#if HAVE_DECL_FT_PIXEL_MODE_MONO
case FT_PIXEL_MODE_MONO:
#else
#ifdef HAVE_DECL_ft_pixel_mode_mono
#if HAVE_DECL_ft_pixel_mode_mono
case ft_pixel_mode_mono:
#else
#error Neither ft_pixel_mode_mono nor FT_PIXEL_MODE_MONO is defined!
......@@ -526,21 +526,21 @@ _vte_glyph_get(struct _vte_glyph_cache *cache, gunichar c)
t = (face->glyph->bitmap.buffer[ioffset] << (x % 8));
r = g = b = (t >> 7) ? 0xff : 0;
break;
#ifdef HAVE_DECL_FT_PIXEL_MODE_GRAY2
#if HAVE_DECL_FT_PIXEL_MODE_GRAY2
case FT_PIXEL_MODE_GRAY2:
ioffset += (x / 4);
t = (face->glyph->bitmap.buffer[ioffset] << ((x % 4) * 2));
r = g = b = CLAMP((t >> 6) * 0x55, 0, 0xff);
break;
#endif
#ifdef HAVE_DECL_FT_PIXEL_MODE_GRAY4
#if HAVE_DECL_FT_PIXEL_MODE_GRAY4
case FT_PIXEL_MODE_GRAY4:
ioffset += (x / 2);
t = (face->glyph->bitmap.buffer[ioffset] << ((x % 2) * 4)) & 7;
r = g = b = CLAMP((t >> 4) * 0x25, 0, 0xff);
break;
#endif
#ifdef HAVE_DECL_FT_PIXEL_MODE_LCD
#if HAVE_DECL_FT_PIXEL_MODE_LCD
case FT_PIXEL_MODE_LCD:
case FT_PIXEL_MODE_LCD_V:
ioffset += (x * 3);
......@@ -549,10 +549,10 @@ _vte_glyph_get(struct _vte_glyph_cache *cache, gunichar c)
b = face->glyph->bitmap.buffer[ioffset++];
break;
#endif
#ifdef HAVE_DECL_FT_PIXEL_MODE_GRAY
#if HAVE_DECL_FT_PIXEL_MODE_GRAY
case FT_PIXEL_MODE_GRAY:
#else
#ifdef HAVE_DECL_ft_pixel_mode_grays
#if HAVE_DECL_ft_pixel_mode_grays
case ft_pixel_mode_grays:
#else
#error Neither FT_PIXEL_MODE_GRAY nor ft_pixel_mode_grays is defined!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment