aboutsummaryrefslogtreecommitdiff
path: root/libXft/src
diff options
context:
space:
mode:
Diffstat (limited to 'libXft/src')
-rw-r--r--libXft/src/xftcolor.c6
-rw-r--r--libXft/src/xftcore.c86
-rw-r--r--libXft/src/xftdpy.c36
-rw-r--r--libXft/src/xftdraw.c44
-rw-r--r--libXft/src/xftextent.c14
-rw-r--r--libXft/src/xftfont.c16
-rw-r--r--libXft/src/xftfreetype.c116
-rw-r--r--libXft/src/xftglyphs.c52
-rw-r--r--libXft/src/xftint.h10
-rw-r--r--libXft/src/xftlist.c6
-rw-r--r--libXft/src/xftname.c8
-rw-r--r--libXft/src/xftrender.c54
-rw-r--r--libXft/src/xftswap.c2
-rw-r--r--libXft/src/xftxlfd.c28
14 files changed, 239 insertions, 239 deletions
diff --git a/libXft/src/xftcolor.c b/libXft/src/xftcolor.c
index 77872efa4..a323822bd 100644
--- a/libXft/src/xftcolor.c
+++ b/libXft/src/xftcolor.c
@@ -30,7 +30,7 @@ XftColorAllocName (Display *dpy,
XftColor *result)
{
XColor screen, exact;
-
+
if (!XAllocNamedColor (dpy, cmap, name, &screen, &exact))
{
/* XXX stick standard colormap stuff here */
@@ -97,7 +97,7 @@ XftColorAllocValue (Display *dpy,
else
{
XColor xcolor;
-
+
xcolor.red = color->red;
xcolor.green = color->green;
xcolor.blue = color->blue;
@@ -112,7 +112,7 @@ XftColorAllocValue (Display *dpy,
return True;
}
-_X_EXPORT void
+_X_EXPORT void
XftColorFree (Display *dpy,
Visual *visual,
Colormap cmap,
diff --git a/libXft/src/xftcore.c b/libXft/src/xftcore.c
index a0103cf26..85b58c3f3 100644
--- a/libXft/src/xftcore.c
+++ b/libXft/src/xftcore.c
@@ -25,7 +25,7 @@
_X_HIDDEN void
XftRectCore (XftDraw *draw,
_Xconst XftColor *color,
- int x,
+ int x,
int y,
unsigned int width,
unsigned int height)
@@ -63,10 +63,10 @@ _XftSharpGlyphMono (XftDraw *draw,
src = srcLine;
srcLine += stride;
w = width;
-
+
bitsMask = 0x80; /* FreeType is always MSB first */
bits = *src++;
-
+
xspan = x;
while (w)
{
@@ -85,7 +85,7 @@ _XftSharpGlyphMono (XftDraw *draw,
bitsMask = 0x80;
}
} while (bits & bitsMask);
- XFillRectangle (draw->dpy, draw->drawable,
+ XFillRectangle (draw->dpy, draw->drawable,
draw->core.gc, xspan, y, lenspan, 1);
xspan += lenspan;
w -= lenspan;
@@ -135,7 +135,7 @@ _XftSharpGlyphGray (XftDraw *draw,
src = srcLine;
srcLine += stride;
w = width;
-
+
bits = *src++;
xspan = x;
while (w)
@@ -150,7 +150,7 @@ _XftSharpGlyphGray (XftDraw *draw,
break;
bits = *src++;
} while (bits >= 0x80);
- XFillRectangle (draw->dpy, draw->drawable,
+ XFillRectangle (draw->dpy, draw->drawable,
draw->core.gc, xspan, y, lenspan, 1);
xspan += lenspan;
w -= lenspan;
@@ -191,7 +191,7 @@ _XftSharpGlyphRgba (XftDraw *draw,
src = srcLine;
srcLine += stride;
w = width;
-
+
bits = *src++;
xspan = x;
while (w)
@@ -206,7 +206,7 @@ _XftSharpGlyphRgba (XftDraw *draw,
break;
bits = *src++;
} while (bits >= 0x80000000);
- XFillRectangle (draw->dpy, draw->drawable,
+ XFillRectangle (draw->dpy, draw->drawable,
draw->core.gc, xspan, y, lenspan, 1);
xspan += lenspan;
w -= lenspan;
@@ -257,7 +257,7 @@ _XftSharpGlyphFind (XftDraw *draw, XftFont *public)
/*
* Primitives for converting between RGB values and TrueColor pixels
*/
-
+
static void
_XftExamineBitfield (unsigned long mask, int *shift, int *len)
{
@@ -283,7 +283,7 @@ static CARD32
_XftGetField (unsigned long l_pixel, int shift, int len)
{
CARD32 pixel = (CARD32) l_pixel;
-
+
pixel = pixel & (((1 << (len)) - 1) << shift);
pixel = pixel << (32 - (shift + len)) >> 24;
while (len < 8)
@@ -346,10 +346,10 @@ _XftSmoothGlyphMono (XImage *image,
src = srcLine;
srcLine += stride;
w = width;
-
+
bitsMask = 0x80; /* FreeType is always MSB first */
bits = *src++;
-
+
xspan = x;
while (w--)
{
@@ -465,7 +465,7 @@ _XftSmoothGlyphGray8888 (XImage *image,
int w;
srca = color->color.alpha >> 8;
-
+
/* This handles only RGB and BGR */
g = (color->color.green & 0xff00);
if (image->red_mask == 0xff0000)
@@ -479,10 +479,10 @@ _XftSmoothGlyphGray8888 (XImage *image,
b = (color->color.blue & 0xff00) << 8;
}
src = (srca << 24) | r | g | b;
-
+
width = xftg->metrics.width;
height = xftg->metrics.height;
-
+
x -= xftg->metrics.x;
y -= xftg->metrics.y;
@@ -490,7 +490,7 @@ _XftSmoothGlyphGray8888 (XImage *image,
dstStride = image->bytes_per_line >> 2;
maskLine = (unsigned char *) xftg->bitmap;
maskStride = (width + 3) & ~3;
-
+
while (height--)
{
dst = dstLine;
@@ -536,7 +536,7 @@ _XftSmoothGlyphGray565 (XImage *image,
int w;
srca = color->color.alpha >> 8;
-
+
/* This handles only RGB and BGR */
g = (color->color.green & 0xff00);
if (image->red_mask == 0xf800)
@@ -550,10 +550,10 @@ _XftSmoothGlyphGray565 (XImage *image,
b = (color->color.blue & 0xff00) << 8;
}
src = (srca << 24) | r | g | b;
-
+
width = xftg->metrics.width;
height = xftg->metrics.height;
-
+
x -= xftg->metrics.x;
y -= xftg->metrics.y;
@@ -561,7 +561,7 @@ _XftSmoothGlyphGray565 (XImage *image,
dstStride = image->bytes_per_line >> 1;
maskLine = (unsigned char *) xftg->bitmap;
maskStride = (width + 3) & ~3;
-
+
while (height--)
{
dst = dstLine;
@@ -612,7 +612,7 @@ _XftSmoothGlyphGray555 (XImage *image,
int w;
srca = color->color.alpha >> 8;
-
+
/* This handles only RGB and BGR */
g = (color->color.green & 0xff00);
if (image->red_mask == 0xf800)
@@ -626,10 +626,10 @@ _XftSmoothGlyphGray555 (XImage *image,
b = (color->color.blue & 0xff00) << 8;
}
src = (srca << 24) | r | g | b;
-
+
width = xftg->metrics.width;
height = xftg->metrics.height;
-
+
x -= xftg->metrics.x;
y -= xftg->metrics.y;
@@ -637,7 +637,7 @@ _XftSmoothGlyphGray555 (XImage *image,
dstStride = image->bytes_per_line >> 1;
maskLine = (unsigned char *) xftg->bitmap;
maskStride = (width + 3) & ~3;
-
+
while (height--)
{
dst = dstLine;
@@ -688,7 +688,7 @@ _XftSmoothGlyphGray (XImage *image,
unsigned long pixel;
int width, height;
int w, tx;
-
+
srca = color->color.alpha >> 8;
src = (srca << 24 |
(color->color.red & 0xff00) << 8 |
@@ -698,7 +698,7 @@ _XftSmoothGlyphGray (XImage *image,
y -= xftg->metrics.y;
width = xftg->metrics.width;
height = xftg->metrics.height;
-
+
maskLine = (unsigned char *) xftg->bitmap;
maskStride = (width + 3) & ~3;
@@ -711,7 +711,7 @@ _XftSmoothGlyphGray (XImage *image,
maskLine += maskStride;
w = width;
tx = x;
-
+
while (w--)
{
m = *mask++;
@@ -766,7 +766,7 @@ _XftSmoothGlyphRgba (XImage *image,
unsigned long pixel;
int width, height;
int w, tx;
-
+
srca = color->color.alpha >> 8;
src = (srca << 24 |
(color->color.red & 0xff00) << 8 |
@@ -776,7 +776,7 @@ _XftSmoothGlyphRgba (XImage *image,
y -= xftg->metrics.y;
width = xftg->metrics.width;
height = xftg->metrics.height;
-
+
mask = (CARD32 *) xftg->bitmap;
_XftExamineBitfield (image->red_mask, &r_shift, &r_len);
@@ -786,7 +786,7 @@ _XftSmoothGlyphRgba (XImage *image,
{
w = width;
tx = x;
-
+
while (w--)
{
ma = *mask++;
@@ -849,7 +849,7 @@ _XftSmoothGlyphPossible (XftDraw *draw)
return FcTrue;
}
-typedef void (*XftSmoothGlyph) (XImage *image,
+typedef void (*XftSmoothGlyph) (XImage *image,
_Xconst XftGlyph *xftg,
int x,
int y,
@@ -960,7 +960,7 @@ XftGlyphCore (XftDraw *draw,
glyphs_loaded = FcTrue;
if (nmissing)
XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing);
-
+
g = glyphs;
n = nglyphs;
if ((font->info.antialias || color->color.alpha != 0xffff) &&
@@ -971,7 +971,7 @@ XftGlyphCore (XftDraw *draw,
unsigned int depth;
int ox, oy;
XftSmoothGlyph smooth = _XftSmoothGlyphFind (draw, public);
-
+
XftGlyphExtents (dpy, public, glyphs, nglyphs, &gi);
if (!gi.width || !gi.height)
goto bail1;
@@ -1090,7 +1090,7 @@ XftGlyphSpecCore (XftDraw *draw,
{
XGlyphInfo gi;
int g_x1, g_x2, g_y1, g_y2;
-
+
nmissing = 0;
if (XftFontCheckGlyph (dpy, public, FcTrue, glyphs[i].glyph, missing, &nmissing))
glyphs_loaded = FcTrue;
@@ -1121,7 +1121,7 @@ XftGlyphSpecCore (XftDraw *draw,
y2 = g_y2;
}
}
-
+
if (x1 == x2 || y1 == y2)
goto bail1;
@@ -1186,7 +1186,7 @@ XftGlyphSpecCore (XftDraw *draw,
xftg = _XftGlyphDefault (dpy, public);
if (xftg)
{
- (*smooth) (image, xftg, glyphs[i].x - x1,
+ (*smooth) (image, xftg, glyphs[i].x - x1,
glyphs[i].y - y1, color);
}
}
@@ -1238,13 +1238,13 @@ XftGlyphFontSpecCore (XftDraw *draw,
XftFont *public = glyphs[i].font;
XGlyphInfo gi;
int g_x1, g_x2, g_y1, g_y2;
-
+
nmissing = 0;
if (XftFontCheckGlyph (dpy, public, FcTrue, glyphs[i].glyph, missing, &nmissing))
glyphs_loaded = FcTrue;
if (nmissing)
XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing);
-
+
XftGlyphExtents (dpy, public, &glyphs[i].glyph, 1, &gi);
g_x1 = glyphs[i].x - gi.x;
g_y1 = glyphs[i].y - gi.y;
@@ -1279,14 +1279,14 @@ XftGlyphFontSpecCore (XftDraw *draw,
y2 = g_y2;
}
}
-
+
if (x1 == x2 || y1 == y2)
goto bail1;
for (i = 0; i < nglyphs; i++)
if (((XftFontInt *) glyphs[i].font)->info.antialias)
break;
-
+
if ((i != nglyphs || color->color.alpha != 0xffff) &&
_XftSmoothGlyphPossible (draw))
{
@@ -1346,12 +1346,12 @@ XftGlyphFontSpecCore (XftDraw *draw,
XftFontInt *font = (XftFontInt *) public;
XftSmoothGlyph smooth = _XftSmoothGlyphFind (draw, public);
FT_UInt glyph = glyphs[i].glyph;
-
+
if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph]))
xftg = _XftGlyphDefault (dpy, public);
if (xftg)
{
- (*smooth) (image, xftg, glyphs[i].x - x1,
+ (*smooth) (image, xftg, glyphs[i].x - x1,
glyphs[i].y - y1, color);
}
}
@@ -1369,7 +1369,7 @@ XftGlyphFontSpecCore (XftDraw *draw,
XftFontInt *font = (XftFontInt *) public;
XftSharpGlyph sharp = _XftSharpGlyphFind (draw, public);
FT_UInt glyph = glyphs[i].glyph;
-
+
if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph]))
xftg = _XftGlyphDefault (dpy, public);
if (xftg)
diff --git a/libXft/src/xftdpy.c b/libXft/src/xftdpy.c
index cd50358d2..747b8db81 100644
--- a/libXft/src/xftdpy.c
+++ b/libXft/src/xftdpy.c
@@ -32,19 +32,19 @@ _XftCloseDisplay (Display *dpy, XExtCodes *codes)
info = _XftDisplayInfoGet (dpy, FcFalse);
if (!info)
return 0;
-
+
/*
* Get rid of any dangling unreferenced fonts
*/
info->max_unref_fonts = 0;
XftFontManageMemory (dpy);
-
+
/*
* Clean up the default values
*/
if (info->defaults)
FcPatternDestroy (info->defaults);
-
+
/*
* Unhook from the global list
*/
@@ -52,7 +52,7 @@ _XftCloseDisplay (Display *dpy, XExtCodes *codes)
if (info->display == dpy)
break;
*prev = info->next;
-
+
free (info);
return 0;
}
@@ -126,8 +126,8 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
{
Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy));
XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual);
-
- printf ("XftDisplayInfoGet Default visual 0x%x ",
+
+ printf ("XftDisplayInfoGet Default visual 0x%x ",
(int) visual->visualid);
if (format)
{
@@ -146,7 +146,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
}
else
printf ("No Render format for default visual\n");
-
+
printf ("XftDisplayInfoGet initialized, hasRender set to \"%s\"\n",
info->hasRender ? "True" : "False");
}
@@ -156,7 +156,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
info->colors[i].pict = 0;
}
info->fonts = NULL;
-
+
info->next = _XftDisplayInfo;
_XftDisplayInfo = info;
@@ -167,7 +167,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
if (XftDebug () & XFT_DBG_CACHE)
printf ("global max cache memory %ld\n", info->max_glyph_memory);
-
+
info->num_unref_fonts = 0;
info->max_unref_fonts = XftDefaultGetInteger (dpy,
XFT_MAX_UNREF_FONTS, 0,
@@ -177,7 +177,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
memset (info->fontHash, '\0', sizeof (XftFont *) * XFT_NUM_FONT_HASH);
return info;
-
+
bail1:
free (info);
bail0:
@@ -387,9 +387,9 @@ _XftDefaultInit (Display *dpy)
goto bail1;
if (!_XftDefaultInitInteger (dpy, pat, XFT_MAX_GLYPH_MEMORY))
goto bail1;
-
+
return pat;
-
+
bail1:
FcPatternDestroy (pat);
bail0:
@@ -404,7 +404,7 @@ _XftDefaultGet (Display *dpy, const char *object, int screen, FcValue *v)
if (!info)
return FcResultNoMatch;
-
+
if (!info->defaults)
{
info->defaults = _XftDefaultInit (dpy);
@@ -462,7 +462,7 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
if (FcPatternGet (pattern, XFT_RENDER, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, XFT_RENDER,
- XftDefaultGetBool (dpy, XFT_RENDER, screen,
+ XftDefaultGetBool (dpy, XFT_RENDER, screen,
XftDefaultHasRender (dpy)));
}
if (FcPatternGet (pattern, FC_ANTIALIAS, 0, &v) == FcResultNoMatch)
@@ -518,7 +518,7 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
}
#endif
FcPatternAddInteger (pattern, FC_RGBA,
- XftDefaultGetInteger (dpy, FC_RGBA, screen,
+ XftDefaultGetInteger (dpy, FC_RGBA, screen,
subpixel));
}
if (FcPatternGet (pattern, FC_MINSPACE, 0, &v) == FcResultNoMatch)
@@ -529,10 +529,10 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
}
if (FcPatternGet (pattern, FC_DPI, 0, &v) == FcResultNoMatch)
{
- dpi = (((double) DisplayHeight (dpy, screen) * 25.4) /
+ dpi = (((double) DisplayHeight (dpy, screen) * 25.4) /
(double) DisplayHeightMM (dpy, screen));
- FcPatternAddDouble (pattern, FC_DPI,
- XftDefaultGetDouble (dpy, FC_DPI, screen,
+ FcPatternAddDouble (pattern, FC_DPI,
+ XftDefaultGetDouble (dpy, FC_DPI, screen,
dpi));
}
if (FcPatternGet (pattern, FC_SCALE, 0, &v) == FcResultNoMatch)
diff --git a/libXft/src/xftdraw.c b/libXft/src/xftdraw.c
index 21f8538a3..186bcb876 100644
--- a/libXft/src/xftdraw.c
+++ b/libXft/src/xftdraw.c
@@ -88,7 +88,7 @@ XftDrawDepth (XftDraw *draw)
Window root;
int x, y;
unsigned int width, height, borderWidth, depth;
- if (XGetGeometry (draw->dpy, draw->drawable,
+ if (XGetGeometry (draw->dpy, draw->drawable,
&root, &x, &y, &width, &height,
&borderWidth, &depth))
draw->depth = depth;
@@ -104,7 +104,7 @@ XftDrawBitsPerPixel (XftDraw *draw)
XPixmapFormatValues *formats;
int nformats;
unsigned int depth;
-
+
if ((depth = XftDrawDepth (draw)) &&
(formats = XListPixmapFormats (draw->dpy, &nformats)))
{
@@ -135,7 +135,7 @@ XftDrawCreate (Display *dpy,
draw = (XftDraw *) malloc (sizeof (XftDraw));
if (!draw)
return NULL;
-
+
draw->dpy = dpy;
draw->drawable = drawable;
draw->screen = _XftDrawScreen (dpy, drawable, visual);
@@ -303,7 +303,7 @@ XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color)
if (!info || !info->solidFormat)
return 0;
-
+
/*
* Monochrome targets require special handling; the PictOp controls
* the color, and the color must be opaque
@@ -322,9 +322,9 @@ XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color)
*/
for (i = 0; i < XFT_NUM_SOLID_COLOR; i++)
{
- if (info->colors[i].pict &&
+ if (info->colors[i].pict &&
info->colors[i].screen == draw->screen &&
- !memcmp ((void *) &color->color,
+ !memcmp ((void *) &color->color,
(void *) &info->colors[i].color,
sizeof (XRenderColor)))
return info->colors[i].pict;
@@ -348,7 +348,7 @@ XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color)
{
Pixmap pix;
XRenderPictureAttributes pa;
-
+
pix = XCreatePixmap (dpy, RootWindow (dpy, draw->screen), 1, 1,
info->solidFormat->depth);
pa.repeat = True;
@@ -391,7 +391,7 @@ _XftDrawRenderPrepare (XftDraw *draw)
format = _XftDrawFormat (draw);
if (!format)
return FcFalse;
-
+
if (draw->subwindow_mode == IncludeInferiors)
{
pa.subwindow_mode = IncludeInferiors;
@@ -454,7 +454,7 @@ _XftDrawCorePrepare (XftDraw *draw, _Xconst XftColor *color)
XSetForeground (draw->dpy, draw->core.gc, color->pixel);
return FcTrue;
}
-
+
_X_EXPORT Picture
XftDrawPicture (XftDraw *draw)
{
@@ -479,7 +479,7 @@ XftDrawGlyphs (XftDraw *draw,
if (font->format)
{
Picture src;
-
+
if (_XftDrawRenderPrepare (draw) &&
(src = XftDrawSrcPicture (draw, color)))
XftGlyphRender (draw->dpy, _XftDrawOp (draw, color),
@@ -497,7 +497,7 @@ _X_EXPORT void
XftDrawString8 (XftDraw *draw,
_Xconst XftColor *color,
XftFont *pub,
- int x,
+ int x,
int y,
_Xconst FcChar8 *string,
int len)
@@ -507,7 +507,7 @@ XftDrawString8 (XftDraw *draw,
if (XftDebug () & XFT_DBG_DRAW)
printf ("DrawString \"%*.*s\"\n", len, len, string);
-
+
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
@@ -545,7 +545,7 @@ XftDrawString16 (XftDraw *draw,
}
for (i = 0; i < len; i++)
glyphs[i] = XftCharIndex (draw->dpy, pub, string[i]);
-
+
XftDrawGlyphs (draw, color, pub, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -573,7 +573,7 @@ XftDrawString32 (XftDraw *draw,
}
for (i = 0; i < len; i++)
glyphs[i] = XftCharIndex (draw->dpy, pub, string[i]);
-
+
XftDrawGlyphs (draw, color, pub, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -583,7 +583,7 @@ _X_EXPORT void
XftDrawStringUtf8 (XftDraw *draw,
_Xconst XftColor *color,
XftFont *pub,
- int x,
+ int x,
int y,
_Xconst FcChar8 *string,
int len)
@@ -795,7 +795,7 @@ XftDrawCharFontSpec (XftDraw *draw,
_X_EXPORT void
XftDrawRect (XftDraw *draw,
_Xconst XftColor *color,
- int x,
+ int x,
int y,
unsigned int width,
unsigned int height)
@@ -825,9 +825,9 @@ XftDrawSetClip (XftDraw *draw,
*/
if (!r && draw->clip_type == XftClipTypeNone)
return True;
-
- if (r &&
- draw->clip_type == XftClipTypeRegion &&
+
+ if (r &&
+ draw->clip_type == XftClipTypeRegion &&
XEqualRegion (r, draw->clip.region))
{
return True;
@@ -862,7 +862,7 @@ XftDrawSetClip (XftDraw *draw,
case XftClipTypeNone:
break;
}
-
+
/*
* Set the clip
*/
@@ -946,7 +946,7 @@ XftDrawSetClipRectangles (XftDraw *draw,
case XftClipTypeNone:
break;
}
-
+
/*
* Set the clip
*/
@@ -986,7 +986,7 @@ XftDrawSetSubwindowMode (XftDraw *draw, int mode)
XRenderPictureAttributes pa;
pa.subwindow_mode = mode;
- XRenderChangePicture (draw->dpy, draw->render.pict,
+ XRenderChangePicture (draw->dpy, draw->render.pict,
CPSubwindowMode, &pa);
}
if (draw->core.gc)
diff --git a/libXft/src/xftextent.c b/libXft/src/xftextent.c
index 71f5c1c13..1e418f28a 100644
--- a/libXft/src/xftextent.c
+++ b/libXft/src/xftextent.c
@@ -21,7 +21,7 @@
*/
#include "xftint.h"
-
+
_X_EXPORT void
XftGlyphExtents (Display *dpy,
XftFont *pub,
@@ -41,7 +41,7 @@ XftGlyphExtents (Display *dpy,
int left, right, top, bottom;
int overall_left, overall_right;
int overall_top, overall_bottom;
-
+
g = glyphs;
n = nglyphs;
nmissing = 0;
@@ -116,7 +116,7 @@ XftGlyphExtents (Display *dpy,
_X_EXPORT void
XftTextExtents8 (Display *dpy,
XftFont *pub,
- _Xconst FcChar8 *string,
+ _Xconst FcChar8 *string,
int len,
XGlyphInfo *extents)
{
@@ -144,7 +144,7 @@ XftTextExtents8 (Display *dpy,
_X_EXPORT void
XftTextExtents16 (Display *dpy,
XftFont *pub,
- _Xconst FcChar16 *string,
+ _Xconst FcChar16 *string,
int len,
XGlyphInfo *extents)
{
@@ -172,7 +172,7 @@ XftTextExtents16 (Display *dpy,
_X_EXPORT void
XftTextExtents32 (Display *dpy,
XftFont *pub,
- _Xconst FcChar32 *string,
+ _Xconst FcChar32 *string,
int len,
XGlyphInfo *extents)
{
@@ -200,7 +200,7 @@ XftTextExtents32 (Display *dpy,
_X_EXPORT void
XftTextExtentsUtf8 (Display *dpy,
XftFont *pub,
- _Xconst FcChar8 *string,
+ _Xconst FcChar8 *string,
int len,
XGlyphInfo *extents)
{
@@ -243,7 +243,7 @@ XftTextExtentsUtf8 (Display *dpy,
_X_EXPORT void
XftTextExtentsUtf16 (Display *dpy,
XftFont *pub,
- _Xconst FcChar8 *string,
+ _Xconst FcChar8 *string,
FcEndian endian,
int len,
XGlyphInfo *extents)
diff --git a/libXft/src/xftfont.c b/libXft/src/xftfont.c
index 70ab5d8bb..d361498db 100644
--- a/libXft/src/xftfont.c
+++ b/libXft/src/xftfont.c
@@ -33,7 +33,7 @@ XftFontMatch (Display *dpy,
if (!XftInit (NULL))
return NULL;
-
+
new = FcPatternDuplicate (pattern);
if (!new)
return NULL;
@@ -100,7 +100,7 @@ XftFontOpen (Display *dpy, int screen, ...)
FcPatternDestroy (pat);
if (!match)
return NULL;
-
+
font = XftFontOpenPattern (dpy, match);
if (!font)
{
@@ -129,7 +129,7 @@ XftFontOpenName (Display *dpy, int screen, const char *name)
else
printf ("Invalid name\n");
}
-
+
if (!pat)
return NULL;
match = XftFontMatch (dpy, screen, pat, &result);
@@ -146,7 +146,7 @@ XftFontOpenName (Display *dpy, int screen, const char *name)
FcPatternDestroy (pat);
if (!match)
return NULL;
-
+
font = XftFontOpenPattern (dpy, match);
if (!font)
{
@@ -154,7 +154,7 @@ XftFontOpenName (Display *dpy, int screen, const char *name)
printf ("No Font\n");
FcPatternDestroy (match);
}
-
+
return font;
}
@@ -175,7 +175,7 @@ XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd)
else
FcPatternPrint (pat);
}
-
+
if (!pat)
return NULL;
match = XftFontMatch (dpy, screen, pat, &result);
@@ -192,7 +192,7 @@ XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd)
FcPatternDestroy (pat);
if (!match)
return NULL;
-
+
font = XftFontOpenPattern (dpy, match);
if (!font)
{
@@ -200,7 +200,7 @@ XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd)
printf ("No Font\n");
FcPatternDestroy (match);
}
-
+
return font;
}
diff --git a/libXft/src/xftfreetype.c b/libXft/src/xftfreetype.c
index 7238b8259..3d930be78 100644
--- a/libXft/src/xftfreetype.c
+++ b/libXft/src/xftfreetype.c
@@ -57,20 +57,20 @@ _XftGetFile (const FcChar8 *file, int id)
f = malloc (sizeof (XftFtFile) + strlen ((char *) file) + 1);
if (!f)
return NULL;
-
+
XftMemAlloc (XFT_MEM_FILE, sizeof (XftFtFile) + strlen ((char *) file) + 1);
if (XftDebug () & XFT_DBG_REF)
printf ("FontFile %s/%d matches new\n",
file, id);
f->next = _XftFtFiles;
_XftFtFiles = f;
-
+
f->ref = 1;
-
+
f->file = (char *) (f+1);
strcpy (f->file, (char *) file);
f->id = id;
-
+
f->lock = 0;
f->face = NULL;
f->xsize = 0;
@@ -89,7 +89,7 @@ _XftGetFaceFile (FT_Face face)
return NULL;
XftMemAlloc (XFT_MEM_FILE, sizeof(XftFtFile));
f->next = NULL;
-
+
f->ref = 1;
f->file = NULL;
@@ -154,7 +154,7 @@ _XftLockFile (XftFtFile *f)
printf ("Loading file %s/%d\n", f->file, f->id);
if (FT_New_Face (_XftFTlibrary, f->file, f->id, &f->face))
--f->lock;
-
+
f->xsize = 0;
f->ysize = 0;
f->matrix.xx = f->matrix.xy = f->matrix.yx = f->matrix.yy = 0;
@@ -188,11 +188,11 @@ _X_HIDDEN FcBool
_XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix)
{
FT_Face face = f->face;
-
+
if (f->xsize != xsize || f->ysize != ysize)
{
if (XftDebug() & XFT_DBG_GLYPH)
- printf ("Set face size to %dx%d (%dx%d)\n",
+ printf ("Set face size to %dx%d (%dx%d)\n",
(int) (xsize >> 6), (int) (ysize >> 6), (int) xsize, (int) ysize);
/*
* Bitmap only faces must match exactly, so find the closest
@@ -217,7 +217,7 @@ _XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix
best = i;
}
}
- /*
+ /*
* Freetype 2.1.7 and earlier used width/height
* for matching sizes in the BDF and PCF loaders.
* This has been fixed for 2.1.8. Because BDF and PCF
@@ -265,7 +265,7 @@ static void
_XftReleaseFile (XftFtFile *f)
{
XftFtFile **prev;
-
+
if (--f->ref != 0)
return;
if (f->lock)
@@ -283,7 +283,7 @@ _XftReleaseFile (XftFtFile *f)
if (f->face)
FT_Done_Face (f->face);
}
- XftMemFree (XFT_MEM_FILE,
+ XftMemFree (XFT_MEM_FILE,
sizeof (XftFtFile) + (f->file ? strlen (f->file) + 1 : 0));
free (f);
}
@@ -349,7 +349,7 @@ XftLockFace (XftFont *public)
XftFontInt *font = (XftFontInt *) public;
XftFontInfo *fi = &font->info;
FT_Face face;
-
+
face = _XftLockFile (fi->file);
/*
* Make sure the face is usable at the requested size
@@ -394,7 +394,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
* Initialize the whole XftFontInfo so that padding doesn't interfere with
* hash or XftFontInfoEqual().
*/
-
+
memset (fi, '\0', sizeof(*fi));
/*
@@ -409,7 +409,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail0;
}
-
+
switch (FcPatternGetInteger (pattern, FC_INDEX, 0, &id)) {
case FcResultNoMatch:
id = 0;
@@ -419,7 +419,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail0;
}
-
+
if (filename)
fi->file = _XftGetFile (filename, id);
else if (FcPatternGetFTFace (pattern, FC_FT_FACE, 0, &face) == FcResultMatch
@@ -436,7 +436,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
if (FcPatternGetDouble (pattern, FC_ASPECT, 0, &aspect) != FcResultMatch)
aspect = 1.0;
-
+
fi->ysize = (FT_F26Dot6) (dsize * 64.0);
fi->xsize = (FT_F26Dot6) (dsize * aspect * 64.0);
@@ -455,7 +455,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail1;
}
-
+
/*
* Get rgba value
*/
@@ -468,7 +468,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail1;
}
-
+
/*
* Get matrix and transform values
*/
@@ -489,8 +489,8 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
fi->transform = (fi->matrix.xx != 0x10000 || fi->matrix.xy != 0 ||
fi->matrix.yx != 0 || fi->matrix.yy != 0x10000);
-
- /*
+
+ /*
* Get render value, set to false if no Render extension present
*/
if (info->hasRender)
@@ -507,7 +507,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
}
else
fi->render = FcFalse;
-
+
/*
* Compute glyph load flags
*/
@@ -530,7 +530,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
/* disable bitmaps when anti-aliasing or transforming glyphs */
if ((!bitmap && fi->antialias) || fi->transform)
fi->load_flags |= FT_LOAD_NO_BITMAP;
-
+
/* disable hinting if requested */
switch (FcPatternGetBool (pattern, FC_HINTING, 0, &hinting)) {
case FcResultNoMatch:
@@ -555,7 +555,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
#else
fi->embolden = FcFalse;
#endif
-
+
#ifdef FC_HINT_STYLE
switch (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hint_style)) {
case FcResultNoMatch:
@@ -615,7 +615,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
else
fi->load_flags |= FT_LOAD_TARGET_MONO;
#endif
-
+
/* set vertical layout if requested */
switch (FcPatternGetBool (pattern, FC_VERTICAL_LAYOUT, 0, &vertical_layout)) {
case FcResultNoMatch:
@@ -657,7 +657,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
if (!global_advance)
fi->load_flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
-
+
/*
* Get requested spacing value
*/
@@ -670,7 +670,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail1;
}
-
+
/*
* Check for minspace
*/
@@ -685,7 +685,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
goto bail1;
}
/*
- * Check for fixed pixel spacing
+ * Check for fixed pixel spacing
*/
switch (FcPatternGetInteger (pattern, FC_CHAR_WIDTH, 0, &fi->char_width)) {
case FcResultNoMatch:
@@ -709,12 +709,12 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
while (nhash--)
hash += *hashp++;
fi->hash = hash;
-
+
/*
* All done
*/
return FcTrue;
-
+
bail1:
_XftReleaseFile (fi->file);
fi->file = NULL;
@@ -736,7 +736,7 @@ XftFontInfoCreate (Display *dpy, _Xconst FcPattern *pattern)
if (!fi)
return NULL;
-
+
if (!XftFontInfoFill (dpy, pattern, fi))
{
free (fi);
@@ -759,7 +759,7 @@ XftFontInfoHash (_Xconst XftFontInfo *fi)
{
return fi->hash;
}
-
+
_X_EXPORT FcBool
XftFontInfoEqual (_Xconst XftFontInfo *a, _Xconst XftFontInfo *b)
{
@@ -767,8 +767,8 @@ XftFontInfoEqual (_Xconst XftFontInfo *a, _Xconst XftFontInfo *b)
}
_X_EXPORT XftFont *
-XftFontOpenInfo (Display *dpy,
- FcPattern *pattern,
+XftFontOpenInfo (Display *dpy,
+ FcPattern *pattern,
XftFontInfo *fi)
{
XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True);
@@ -803,14 +803,14 @@ XftFontOpenInfo (Display *dpy,
}
/*
- * No existing font, create another.
+ * No existing font, create another.
*/
-
+
if (XftDebug () & XFT_DBG_CACHE)
printf ("New font %s/%d size %dx%d\n",
fi->file->file, fi->file->id,
(int) fi->xsize >> 6, (int) fi->ysize >> 6);
-
+
if (FcPatternGetInteger (pattern, XFT_MAX_GLYPH_MEMORY, 0,
&max_glyph_memory) != FcResultMatch)
max_glyph_memory = XFT_FONT_MAX_GLYPH_MEMORY;
@@ -832,7 +832,7 @@ XftFontOpenInfo (Display *dpy,
charset = FcCharSetCopy (charset);
else
charset = FcFreeTypeCharSet (face, FcConfigGetBlanks (NULL));
-
+
antialias = fi->antialias;
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
antialias = FcFalse;
@@ -860,13 +860,13 @@ XftFontOpenInfo (Display *dpy,
{
format = XRenderFindStandardFormat (dpy, PictStandardA1);
}
-
+
if (!format)
goto bail2;
}
else
format = NULL;
-
+
if (charset)
{
num_unicode = FcCharSetCount (charset);
@@ -879,17 +879,17 @@ XftFontOpenInfo (Display *dpy,
hash_value = 0;
rehash_value = 0;
}
-
+
/*
* Sometimes the glyphs are numbered 1..n, other times 0..n-1,
* accept either numbering scheme by making room in the table
*/
num_glyphs = face->num_glyphs + 1;
- alloc_size = (sizeof (XftFontInt) +
+ alloc_size = (sizeof (XftFontInt) +
num_glyphs * sizeof (XftGlyph *) +
hash_value * sizeof (XftUcsHash));
font = malloc (alloc_size);
-
+
if (!font)
goto bail2;
@@ -901,12 +901,12 @@ XftFontOpenInfo (Display *dpy,
if (fi->transform)
{
FT_Vector vector;
-
+
vector.x = 0;
vector.y = face->size->metrics.descender;
FT_Vector_Transform (&vector, &fi->matrix);
descent = -(vector.y >> 6);
-
+
vector.x = 0;
vector.y = face->size->metrics.ascender;
FT_Vector_Transform (&vector, &fi->matrix);
@@ -934,7 +934,7 @@ XftFontOpenInfo (Display *dpy,
font->public.ascent = ascent;
font->public.descent = descent;
font->public.height = height;
-
+
if (fi->char_width)
font->public.max_advance_width = fi->char_width;
else
@@ -952,7 +952,7 @@ XftFontOpenInfo (Display *dpy,
}
font->public.charset = charset;
font->public.pattern = pattern;
-
+
/*
* Management fields
*/
@@ -960,10 +960,10 @@ XftFontOpenInfo (Display *dpy,
font->next = info->fonts;
info->fonts = &font->public;
-
+
font->hash_next = *bucket;
*bucket = &font->public;
-
+
/*
* Copy the info over
*/
@@ -978,7 +978,7 @@ XftFontOpenInfo (Display *dpy,
* bump XftFile reference count
*/
font->info.file->ref++;
-
+
/*
* Per glyph information
*/
@@ -1001,18 +1001,18 @@ XftFontOpenInfo (Display *dpy,
*/
font->glyphset = 0;
font->format = format;
-
+
/*
* Glyph memory management fields
*/
font->glyph_memory = 0;
font->max_glyph_memory = max_glyph_memory;
font->use_free_glyphs = info->use_free_glyphs;
-
+
_XftUnlockFile (fi->file);
return &font->public;
-
+
bail2:
FcCharSetDestroy (charset);
bail1:
@@ -1050,7 +1050,7 @@ XftFontDestroy (Display *dpy, XftFont *public)
XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False);
XftFontInt *font = (XftFontInt *) public;
int i;
-
+
/* note reduction in memory use */
if (info)
info->glyph_memory -= font->glyph_memory;
@@ -1070,11 +1070,11 @@ XftFontDestroy (Display *dpy, XftFont *public)
free (xftg);
}
}
-
+
/* Free the pattern and the charset */
FcPatternDestroy (font->public.pattern);
FcCharSetDestroy (font->public.charset);
-
+
/* Finally, free the font structure */
XftMemFree (XFT_MEM_FONT, sizeof (XftFontInt) +
font->num_glyphs * sizeof (XftGlyph *) +
@@ -1087,7 +1087,7 @@ XftFontFindNthUnref (XftDisplayInfo *info, int n)
{
XftFont *public;
XftFontInt *font;
-
+
for (public = info->fonts; public; public = font->next)
{
font = (XftFontInt*) public;
@@ -1148,10 +1148,10 @@ XftFontClose (Display *dpy, XftFont *public)
{
XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False);
XftFontInt *font = (XftFontInt *) public;
-
+
if (--font->ref != 0)
return;
-
+
if (info)
{
++info->num_unref_fonts;
diff --git a/libXft/src/xftglyphs.c b/libXft/src/xftglyphs.c
index 10adb1587..8e0d247a0 100644
--- a/libXft/src/xftglyphs.c
+++ b/libXft/src/xftglyphs.c
@@ -106,7 +106,7 @@ XftFontLoadGlyphs (Display *dpy,
return;
face = XftLockFace (&font->public);
-
+
if (!face)
return;
@@ -137,7 +137,7 @@ XftFontLoadGlyphs (Display *dpy,
xftg = font->glyphs[glyphindex];
if (!xftg)
continue;
-
+
if (XftDebug() & XFT_DBG_CACHE)
_XftFontValidateMemory (dpy, pub);
/*
@@ -147,7 +147,7 @@ XftFontLoadGlyphs (Display *dpy,
*/
if (xftg->glyph_memory)
continue;
-
+
error = FT_Load_Glyph (face, glyphindex, font->info.load_flags);
if (error)
{
@@ -168,7 +168,7 @@ XftFontLoadGlyphs (Display *dpy,
#define CEIL(x) (((x)+63) & -64)
#define TRUNC(x) ((x) >> 6)
#define ROUND(x) (((x)+32) & -64)
-
+
glyphslot = face->glyph;
#if HAVE_FT_GLYPHSLOT_EMBOLDEN
@@ -181,7 +181,7 @@ XftFontLoadGlyphs (Display *dpy,
/*
* Compute glyph metrics from FreeType information
*/
- if(font->info.transform && glyphslot->format != ft_glyph_format_bitmap)
+ if(font->info.transform && glyphslot->format != ft_glyph_format_bitmap)
{
/*
* calculate the true width by transforming all four corners.
@@ -192,9 +192,9 @@ XftFontLoadGlyphs (Display *dpy,
for(yc = 0; yc <= 1; yc++) {
vector.x = glyphslot->metrics.horiBearingX + xc * glyphslot->metrics.width;
vector.y = glyphslot->metrics.horiBearingY - yc * glyphslot->metrics.height;
- FT_Vector_Transform(&vector, &font->info.matrix);
+ FT_Vector_Transform(&vector, &font->info.matrix);
if (XftDebug() & XFT_DBG_GLYPH)
- printf("Trans %d %d: %d %d\n", (int) xc, (int) yc,
+ printf("Trans %d %d: %d %d\n", (int) xc, (int) yc,
(int) vector.x, (int) vector.y);
if(xc == 0 && yc == 0) {
left = right = vector.x;
@@ -235,7 +235,7 @@ XftFontLoadGlyphs (Display *dpy,
if (TRUNC(bottom) > font->public.max_advance_width)
{
int adjust;
-
+
adjust = bottom - (font->public.max_advance_width << 6);
if (adjust > top)
adjust = top;
@@ -249,7 +249,7 @@ XftFontLoadGlyphs (Display *dpy,
if (TRUNC(right) > font->public.max_advance_width)
{
int adjust;
-
+
adjust = right - (font->public.max_advance_width << 6);
if (adjust > left)
adjust = left;
@@ -309,14 +309,14 @@ XftFontLoadGlyphs (Display *dpy,
xftg->metrics.xOff = TRUNC(ROUND(glyphslot->advance.x));
xftg->metrics.yOff = -TRUNC(ROUND(glyphslot->advance.y));
}
-
+
/*
* If the glyph is relatively large (> 1% of server memory),
* don't send it until necessary
*/
if (!need_bitmaps && size > info->max_glyph_memory / 100)
continue;
-
+
/*
* Make sure there's enough buffer space for the glyph
*/
@@ -343,9 +343,9 @@ XftFontLoadGlyphs (Display *dpy,
ftbit.pixel_mode = ft_pixel_mode_grays;
else
ftbit.pixel_mode = ft_pixel_mode_mono;
-
+
ftbit.buffer = bufBitmap;
-
+
if (subpixel)
FT_Outline_Transform (&glyphslot->outline, &matrix);
@@ -407,7 +407,7 @@ XftFontLoadGlyphs (Display *dpy,
(int) glyphindex);
continue;
}
-
+
if (XftDebug() & XFT_DBG_GLYPH)
{
printf ("glyph %d:\n", (int) glyphindex);
@@ -426,7 +426,7 @@ XftFontLoadGlyphs (Display *dpy,
line = bufBitmap;
for (y = 0; y < height * vmul; y++)
{
- if (font->info.antialias)
+ if (font->info.antialias)
{
static char den[] = { " .:;=+*#" };
for (x = 0; x < pitch; x++)
@@ -464,7 +464,7 @@ XftFontLoadGlyphs (Display *dpy,
int rf, gf, bf;
int s;
int o, os;
-
+
/*
* Filter the glyph to soften the color fringes
*/
@@ -525,7 +525,7 @@ XftFontLoadGlyphs (Display *dpy,
*out++ = (green << 24) | (red << 16) | (green << 8) | blue;
}
}
-
+
xftg->glyph_memory = sizergba + sizeof (XftGlyph);
if (font->format)
{
@@ -534,7 +534,7 @@ XftFontLoadGlyphs (Display *dpy,
if (ImageByteOrder (dpy) != XftNativeByteOrder ())
XftSwapCARD32 ((CARD32 *) bufBitmapRgba, sizergba >> 2);
XRenderAddGlyphs (dpy, font->glyphset, &glyph,
- &xftg->metrics, 1,
+ &xftg->metrics, 1,
(char *) bufBitmapRgba, sizergba);
}
else
@@ -580,7 +580,7 @@ XftFontLoadGlyphs (Display *dpy,
if (!font->glyphset)
font->glyphset = XRenderCreateGlyphSet (dpy, font->format);
XRenderAddGlyphs (dpy, font->glyphset, &glyph,
- &xftg->metrics, 1,
+ &xftg->metrics, 1,
(char *) bufBitmap, size);
}
else
@@ -622,7 +622,7 @@ XftFontUnloadGlyphs (Display *dpy,
FT_UInt glyphindex;
Glyph glyphBuf[1024];
int nused;
-
+
nused = 0;
while (nglyph--)
{
@@ -656,7 +656,7 @@ XftFontUnloadGlyphs (Display *dpy,
free (xftg);
XftMemFree (XFT_MEM_GLYPH, sizeof (XftGlyph));
font->glyphs[glyphindex] = NULL;
- }
+ }
if (font->glyphset && nused)
XRenderFreeGlyphs (dpy, font->glyphset, glyphBuf, nused);
}
@@ -672,7 +672,7 @@ XftFontCheckGlyph (Display *dpy,
XftFontInt *font = (XftFontInt *) pub;
XftGlyph *xftg;
int n;
-
+
if (glyph >= font->num_glyphs)
return FcFalse;
xftg = font->glyphs[glyph];
@@ -715,14 +715,14 @@ XftCharExists (Display *dpy,
#define Missing ((FT_UInt) ~0)
_X_EXPORT FT_UInt
-XftCharIndex (Display *dpy,
+XftCharIndex (Display *dpy,
XftFont *pub,
FcChar32 ucs4)
{
XftFontInt *font = (XftFontInt *) pub;
FcChar32 ent, offset;
FT_Face face;
-
+
if (!font->hash_value)
return 0;
@@ -765,7 +765,7 @@ _XftFontUncacheGlyph (Display *dpy, XftFont *pub)
unsigned long glyph_memory;
FT_UInt glyphindex;
XftGlyph *xftg;
-
+
if (!font->glyph_memory)
return;
if (font->use_free_glyphs)
@@ -781,7 +781,7 @@ _XftFontUncacheGlyph (Display *dpy, XftFont *pub)
}
glyph_memory = 0;
}
-
+
if (XftDebug() & XFT_DBG_CACHE)
_XftFontValidateMemory (dpy, pub);
for (glyphindex = 0; glyphindex < font->num_glyphs; glyphindex++)
diff --git a/libXft/src/xftint.h b/libXft/src/xftint.h
index 3aafecf86..43f9ebec9 100644
--- a/libXft/src/xftint.h
+++ b/libXft/src/xftint.h
@@ -115,14 +115,14 @@ typedef struct _XftUcsHash {
typedef struct _XftFtFile {
struct _XftFtFile *next;
int ref; /* number of font infos using this file */
-
+
char *file; /* file name */
int id; /* font index within that file */
FT_F26Dot6 xsize; /* current xsize setting */
FT_F26Dot6 ysize; /* current ysize setting */
FT_Matrix matrix; /* current matrix setting */
-
+
int lock; /* lock count; can't unload unless 0 */
FT_Face face; /* pointer to face; only valid when lock */
} XftFtFile;
@@ -337,7 +337,7 @@ FcFontSet *XftListFontSets (FcFontSet **sets, int nsets, FcPattern *p, FcObjectS
void
XftRectCore (XftDraw *draw,
_Xconst XftColor *color,
- int x,
+ int x,
int y,
unsigned int width,
unsigned int height);
@@ -401,7 +401,7 @@ FcBool
XftDrawRenderPrepare (XftDraw *draw);
/* xftextent.c */
-
+
/* xftfont.c */
/* xftfreetype.c */
@@ -436,7 +436,7 @@ XftListFontsPatternObjects (Display *dpy,
FcObjectSet *os);
/* xftname.c */
-void
+void
_XftNameInit (void);
/* xftrender.c */
diff --git a/libXft/src/xftlist.c b/libXft/src/xftlist.c
index 0780f7ca8..f15974530 100644
--- a/libXft/src/xftlist.c
+++ b/libXft/src/xftlist.c
@@ -45,12 +45,12 @@ XftListFonts (Display *dpy,
va_start (va, screen);
FcPatternVapBuild (pattern, NULL, va);
-
+
first = va_arg (va, const char *);
FcObjectSetVapBuild (os, first, va);
-
+
va_end (va);
-
+
fs = XftListFontsPatternObjects (dpy, screen, pattern, os);
FcPatternDestroy (pattern);
FcObjectSetDestroy (os);
diff --git a/libXft/src/xftname.c b/libXft/src/xftname.c
index a0c6be704..30dd6e06c 100644
--- a/libXft/src/xftname.c
+++ b/libXft/src/xftname.c
@@ -33,7 +33,7 @@ static const FcObjectType _XftObjectTypes[] = {
static FcBool _XftNameInitialized;
-_X_HIDDEN void
+_X_HIDDEN void
_XftNameInit (void)
{
if (_XftNameInitialized)
@@ -42,11 +42,11 @@ _XftNameInit (void)
FcNameRegisterObjectTypes (_XftObjectTypes, NUM_OBJECT_TYPES);
}
-_X_EXPORT FcPattern
+_X_EXPORT FcPattern
*XftNameParse (const char *name)
-{
+{
_XftNameInit ();
- return FcNameParse ((FcChar8 *) name);
+ return FcNameParse ((FcChar8 *) name);
}
_X_EXPORT FcBool
diff --git a/libXft/src/xftrender.c b/libXft/src/xftrender.c
index 94c211bde..b280c0313 100644
--- a/libXft/src/xftrender.c
+++ b/libXft/src/xftrender.c
@@ -55,10 +55,10 @@ XftGlyphRender (Display *dpy,
unsigned int char_local[NUM_LOCAL];
unsigned int *chars;
FcBool glyphs_loaded;
-
+
if (!font->format)
return;
-
+
/*
* Load missing glyphs
*/
@@ -75,7 +75,7 @@ XftGlyphRender (Display *dpy,
}
if (nmissing)
XftFontLoadGlyphs (dpy, pub, FcTrue, missing, nmissing);
-
+
if (!font->glyphset)
goto bail1;
if (max < 0x100)
@@ -169,12 +169,12 @@ XftGlyphSpecRender (Display *dpy,
FcBool glyphs_loaded;
int nelt;
int x, y;
-
+
if (!font->format)
return;
if (!nglyphs)
return;
-
+
/*
* Load missing glyphs
*/
@@ -192,7 +192,7 @@ XftGlyphSpecRender (Display *dpy,
}
if (nmissing)
XftFontLoadGlyphs (dpy, pub, FcTrue, missing, nmissing);
-
+
if (!font->glyphset)
goto bail1;
@@ -224,7 +224,7 @@ XftGlyphSpecRender (Display *dpy,
char8 = (char *) chars;
char16 = (unsigned short *) chars;
char32 = (unsigned int *) chars;
-
+
/*
* Compute the number of glyph elts needed
*/
@@ -249,7 +249,7 @@ XftGlyphSpecRender (Display *dpy,
/* Substitute default for non-existant glyphs */
if (g >= font->num_glyphs || !font->glyphs[g])
g = 0;
- /*
+ /*
* check to see if the glyph is placed where it would
* fall using the normal spacing
*/
@@ -354,7 +354,7 @@ XftCharSpecRender (Display *dpy,
Picture src,
XftFont *pub,
Picture dst,
- int srcx,
+ int srcx,
int srcy,
_Xconst XftCharSpec *chars,
int len)
@@ -396,7 +396,7 @@ static XRenderPictFormat *
XftPreferFormat (Display *dpy, XRenderPictFormat *a, XRenderPictFormat *b)
{
XRenderPictFormat *prefer = NULL;
-
+
if (a == b)
prefer = a;
else if (XftIsARGBFormat(a) != XftIsARGBFormat(b))
@@ -439,10 +439,10 @@ XftGlyphFontSpecRender (Display *dpy,
FcBool glyphs_loaded;
int nelt;
int x, y;
-
+
if (!nglyphs)
return;
-
+
/*
* Load missing glyphs. Have to load them
* one at a time in case the font changes
@@ -467,7 +467,7 @@ XftGlyphFontSpecRender (Display *dpy,
if (!font->glyphset)
goto bail1;
}
-
+
/*
* See what encoding size is needed
*/
@@ -496,7 +496,7 @@ XftGlyphFontSpecRender (Display *dpy,
char8 = (char *) chars;
char16 = (unsigned short *) chars;
char32 = (unsigned int *) chars;
-
+
/*
* Compute the number of glyph elts needed
*/
@@ -531,7 +531,7 @@ XftGlyphFontSpecRender (Display *dpy,
/* Substitute default for non-existant glyphs */
if (g >= font->num_glyphs || !font->glyphs[g])
g = 0;
- /*
+ /*
* check to see if the glyph is placed where it would
* fall using the normal spacing
*/
@@ -571,7 +571,7 @@ XftGlyphFontSpecRender (Display *dpy,
{
XftFont *pub = glyphs[i].font;
XftFontInt *font = (XftFontInt *) pub;
-
+
g = glyphs[i].glyph;
/* Substitute default for non-existant glyphs */
if (g >= font->num_glyphs || !font->glyphs[g])
@@ -699,7 +699,7 @@ XftTextRender8 (Display *dpy,
}
for (i = 0; i < len; i++)
glyphs[i] = XftCharIndex (dpy, pub, string[i]);
- XftGlyphRender (dpy, op, src, pub, dst,
+ XftGlyphRender (dpy, op, src, pub, dst,
srcx, srcy, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -731,7 +731,7 @@ XftTextRender16 (Display *dpy,
}
for (i = 0; i < len; i++)
glyphs[i] = XftCharIndex (dpy, pub, string[i]);
- XftGlyphRender (dpy, op, src, pub, dst,
+ XftGlyphRender (dpy, op, src, pub, dst,
srcx, srcy, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -762,9 +762,9 @@ XftTextRender16BE (Display *dpy,
return;
}
for (i = 0; i < len; i++)
- glyphs[i] = XftCharIndex (dpy, pub,
+ glyphs[i] = XftCharIndex (dpy, pub,
(string[i*2]<<8) | string[i*2+1]);
- XftGlyphRender (dpy, op, src, pub, dst,
+ XftGlyphRender (dpy, op, src, pub, dst,
srcx, srcy, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -795,9 +795,9 @@ XftTextRender16LE (Display *dpy,
return;
}
for (i = 0; i < len; i++)
- glyphs[i] = XftCharIndex (dpy, pub,
+ glyphs[i] = XftCharIndex (dpy, pub,
string[i*2] | (string[i*2+1]<<8));
- XftGlyphRender (dpy, op, src, pub, dst,
+ XftGlyphRender (dpy, op, src, pub, dst,
srcx, srcy, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -829,7 +829,7 @@ XftTextRender32 (Display *dpy,
}
for (i = 0; i < len; i++)
glyphs[i] = XftCharIndex (dpy, pub, string[i]);
- XftGlyphRender (dpy, op, src, pub, dst,
+ XftGlyphRender (dpy, op, src, pub, dst,
srcx, srcy, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -860,12 +860,12 @@ XftTextRender32BE (Display *dpy,
return;
}
for (i = 0; i < len; i++)
- glyphs[i] = XftCharIndex (dpy, pub,
+ glyphs[i] = XftCharIndex (dpy, pub,
(string[i*4] << 24) |
(string[i*4+1] << 16) |
(string[i*4+2] << 8) |
(string[i*4+3]));
- XftGlyphRender (dpy, op, src, pub, dst,
+ XftGlyphRender (dpy, op, src, pub, dst,
srcx, srcy, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
@@ -896,12 +896,12 @@ XftTextRender32LE (Display *dpy,
return;
}
for (i = 0; i < len; i++)
- glyphs[i] = XftCharIndex (dpy, pub,
+ glyphs[i] = XftCharIndex (dpy, pub,
(string[i*4]) |
(string[i*4+1] << 8) |
(string[i*4+2] << 16) |
(string[i*4+3] << 24));
- XftGlyphRender (dpy, op, src, pub, dst,
+ XftGlyphRender (dpy, op, src, pub, dst,
srcx, srcy, x, y, glyphs, len);
if (glyphs != glyphs_local)
free (glyphs);
diff --git a/libXft/src/xftswap.c b/libXft/src/xftswap.c
index 942efdb31..e7748c93f 100644
--- a/libXft/src/xftswap.c
+++ b/libXft/src/xftswap.c
@@ -101,7 +101,7 @@ XftSwapImage (XImage *image)
{
switch (image->bits_per_pixel) {
case 32:
- XftSwapCARD32 ((CARD32 *) image->data,
+ XftSwapCARD32 ((CARD32 *) image->data,
image->height * image->bytes_per_line >> 2);
break;
case 24:
diff --git a/libXft/src/xftxlfd.c b/libXft/src/xftxlfd.c
index 7c1991163..dee2f44de 100644
--- a/libXft/src/xftxlfd.c
+++ b/libXft/src/xftxlfd.c
@@ -119,42 +119,42 @@ XftXlfdParse (const char *xlfd_orig, FcBool ignore_scalable, FcBool complete)
if (!pixel)
return NULL;
-
+
pat = FcPatternCreate ();
if (!pat)
return NULL;
-
+
save = (char *) malloc (strlen (foundry) + 1);
-
+
if (!save) {
FcPatternDestroy (pat);
return NULL;
}
if (!FcPatternAddString (pat, XFT_XLFD, (FcChar8 *) xlfd_orig)) goto bail;
-
+
XftSplitStr (foundry, save);
if (save[0] && strcmp (save, "*") != 0)
if (!FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) save)) goto bail;
-
+
XftSplitStr (family, save);
if (save[0] && strcmp (save, "*") != 0)
if (!FcPatternAddString (pat, FC_FAMILY, (FcChar8 *) save)) goto bail;
-
+
weight_value = _XftMatchSymbolic (XftXlfdWeights, NUM_XLFD_WEIGHTS,
XftSplitStr (weight_name, save),
FC_WEIGHT_MEDIUM);
- if (!FcPatternAddInteger (pat, FC_WEIGHT, weight_value))
+ if (!FcPatternAddInteger (pat, FC_WEIGHT, weight_value))
goto bail;
-
+
slant_value = _XftMatchSymbolic (XftXlfdSlants, NUM_XLFD_SLANTS,
XftSplitStr (slant, save),
FC_SLANT_ROMAN);
- if (!FcPatternAddInteger (pat, FC_SLANT, slant_value))
+ if (!FcPatternAddInteger (pat, FC_SLANT, slant_value))
goto bail;
-
+
dpixel = (double) pixel;
-
+
if (point > 0)
{
if (!FcPatternAddDouble (pat, FC_SIZE, ((double) point) / 10.0)) goto bail;
@@ -163,13 +163,13 @@ XftXlfdParse (const char *xlfd_orig, FcBool ignore_scalable, FcBool complete)
dpixel = (double) point * (double) resy / 720.0;
}
}
-
+
if (dpixel > 0)
if (!FcPatternAddDouble (pat, FC_PIXEL_SIZE, dpixel)) goto bail;
-
+
free (save);
return pat;
-
+
bail:
free (save);
FcPatternDestroy (pat);