[SOLVED] Global Fonts Annihiliated

Well the story starts off 2 days ago when I wanted to disable antialiasing and subpixel rendering (which makes the blue and red coloring on fonts) for fonts under a certain size. At the start I didn't know exactly what everything was so I follow the wikis for "Xorg Font Configuration" and "Fonts". I dont use a ~/.fonts, so all of my editting was done in the /etc/fonts/local.conf.
Basically everything looks like this: http://omploader.org/vMmtjNg/NothingIsSpared.png
Anti aliasing or something is totally missing from everything no matter what I do. I've used the template found at http://wiki.archlinux.org/index.php/Xor … _very_good into /etc/fonts/local.conf to no avail. I've reinstalled fonts, and fooled turning things off and on to see if it would make any difference and nothing has.
I'm hoping a xorg or font guru can walk me through some things that could help improve my situtation.
Last edited by Jimi (2009-10-23 04:17:14)

Still haven't found a solution--Like I said all GTK apps are suffering from horrible fonts, while FireFox and urxvt are responding to /etc/fonts/local.conf and ~/.fonts.config
I finally found the cairo-respect-fontconfig patch (i think), but i have no idea what to do with it
#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_lcd_filter.dpatch by Fabien Tassin <[email protected]>
## All lines beginning with `## DP:' are a description of the patch.
## DP: From git rev 5d887ad5dca5af0f8216830d1b04d08a5aba9bee
@DPATCH@
diff -urNad cairo-1.8.0~/src/cairo-font-options.c cairo-1.8.0/src/cairo-font-options.c
--- cairo-1.8.0~/src/cairo-font-options.c 2008-09-25 22:30:14.000000000 +0200
+++ cairo-1.8.0/src/cairo-font-options.c 2008-10-14 15:01:37.000000000 +0200
@@ -39,6 +39,7 @@
static const cairo_font_options_t _cairo_font_options_nil = {
CAIRO_ANTIALIAS_DEFAULT,
CAIRO_SUBPIXEL_ORDER_DEFAULT,
+ CAIRO_LCD_FILTER_DEFAULT,
CAIRO_HINT_STYLE_DEFAULT,
CAIRO_HINT_METRICS_DEFAULT
@@ -54,6 +55,7 @@
options->antialias = CAIRO_ANTIALIAS_DEFAULT;
options->subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT;
+ options->lcd_filter = CAIRO_LCD_FILTER_DEFAULT;
options->hint_style = CAIRO_HINT_STYLE_DEFAULT;
options->hint_metrics = CAIRO_HINT_METRICS_DEFAULT;
@@ -64,6 +66,7 @@
options->antialias = other->antialias;
options->subpixel_order = other->subpixel_order;
+ options->lcd_filter = other->lcd_filter;
options->hint_style = other->hint_style;
options->hint_metrics = other->hint_metrics;
@@ -189,6 +192,8 @@
options->antialias = other->antialias;
if (other->subpixel_order != CAIRO_SUBPIXEL_ORDER_DEFAULT)
options->subpixel_order = other->subpixel_order;
+ if (other->lcd_filter != CAIRO_LCD_FILTER_DEFAULT)
+ options->lcd_filter = other->lcd_filter;
if (other->hint_style != CAIRO_HINT_STYLE_DEFAULT)
options->hint_style = other->hint_style;
if (other->hint_metrics != CAIRO_HINT_METRICS_DEFAULT)
@@ -221,6 +226,7 @@
return (options->antialias == other->antialias &&
options->subpixel_order == other->subpixel_order &&
+ options->lcd_filter == other->lcd_filter &&
options->hint_style == other->hint_style &&
options->hint_metrics == other->hint_metrics);
@@ -246,7 +252,8 @@
return ((options->antialias) |
(options->subpixel_order << 4) |
- (options->hint_style << 8) |
+ (options->lcd_filter << 8) |
+ (options->hint_style << 12) |
(options->hint_metrics << 16));
slim_hidden_def (cairo_font_options_hash);
@@ -328,6 +335,48 @@
+ * _cairo_font_options_set_lcd_filter:
+ * @options: a #cairo_font_options_t
+ * @lcd_filter: the new LCD filter
+ *
+ * Sets the LCD filter for the font options object. The LCD filter
+ * specifies how pixels are filtered when rendered with an antialiasing
+ * mode of %CAIRO_ANTIALIAS_SUBPIXEL. See the documentation for
+ * #cairo_lcd_filter_t for full details.
+ *
+ * Since: 1.8
+ **/
+void
+_cairo_font_options_set_lcd_filter (cairo_font_options_t *options,
+ cairo_lcd_filter_t lcd_filter)
+{
+ if (cairo_font_options_status (options))
+ return;
+
+ options->lcd_filter = lcd_filter;
+}
+
+/**
+ * _cairo_font_options_get_lcd_filter:
+ * @options: a #cairo_font_options_t
+ *
+ * Gets the LCD filter for the font options object.
+ * See the documentation for #cairo_lcd_filter_t for full details.
+ *
+ * Return value: the LCD filter for the font options object
+ *
+ * Since: 1.8
+ **/
+cairo_lcd_filter_t
+_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options)
+{
+ if (cairo_font_options_status ((cairo_font_options_t *) options))
+ return CAIRO_LCD_FILTER_DEFAULT;
+
+ return options->lcd_filter;
+}
+
+/**
* cairo_font_options_set_hint_style:
* @options: a #cairo_font_options_t
* @hint_style: the new hint style
diff -urNad cairo-1.8.0~/src/cairo-ft-font.c cairo-1.8.0/src/cairo-ft-font.c
--- cairo-1.8.0~/src/cairo-ft-font.c 2008-09-25 22:28:24.000000000 +0200
+++ cairo-1.8.0/src/cairo-ft-font.c 2008-10-14 15:01:37.000000000 +0200
@@ -57,6 +57,30 @@
#include FT_SYNTHESIS_H
#endif
+#if HAVE_FT_LIBRARY_SETLCDFILTER
+#include FT_LCD_FILTER_H
+#endif
+
+/* Fontconfig version older than 2.6 didn't have these options */
+#ifndef FC_LCD_FILTER
+#define FC_LCD_FILTER "lcdfilter"
+#endif
+/* Some Ubuntu versions defined FC_LCD_FILTER without defining the following */
+#ifndef FC_LCD_NONE
+#define FC_LCD_NONE 0
+#define FC_LCD_DEFAULT 1
+#define FC_LCD_LIGHT 2
+#define FC_LCD_LEGACY 3
+#endif
+
+/* FreeType version older than 2.3.5(?) didn't have these options */
+#ifndef FT_LCD_FILTER_NONE
+#define FT_LCD_FILTER_NONE 0
+#define FT_LCD_FILTER_DEFAULT 1
+#define FT_LCD_FILTER_LIGHT 2
+#define FT_LCD_FILTER_LEGACY 16
+#endif
+
#define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 64.0))
#define DOUBLE_FROM_26_6(t) ((double)(t) / 64.0)
#define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))
@@ -737,23 +761,286 @@
return CAIRO_STATUS_SUCCESS;
-/* Empirically-derived subpixel filtering values thanks to Keith
- * Packard and libXft. */
-static const int filters[3][3] = {
- /* red */
-#if 0
- { 65538*4/7,65538*2/7,65538*1/7 },
- /* green */
- { 65536*1/4, 65536*2/4, 65537*1/4 },
- /* blue */
- { 65538*1/7,65538*2/7,65538*4/7 },
+/* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
+ * into a different format. For example, we want to convert a
+ * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
+ * ARGB or ABGR bitmap.
+ *
+ * this function prepares a target descriptor for this operation.
+ *
+ * input :: target bitmap descriptor. The function will set its
+ * 'width', 'rows' and 'pitch' fields, and only these
+ *
+ * slot :: the glyph slot containing the source bitmap. this
+ * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
+ *
+ * mode :: the requested final rendering mode. supported values are
+ * MONO, NORMAL (i.e. gray), LCD and LCD_V
+ *
+ * the function returns the size in bytes of the corresponding buffer,
+ * it's up to the caller to allocate the corresponding memory block
+ * before calling _fill_xrender_bitmap
+ *
+ * it also returns -1 in case of error (e.g. incompatible arguments,
+ * like trying to convert a gray bitmap into a monochrome one)
+ */
+static int
+_compute_xrender_bitmap_size(FT_Bitmap *target,
+ FT_GlyphSlot slot,
+ FT_Render_Mode mode)
+{
+ FT_Bitmap *ftbit;
+ int width, height, pitch;
+
+ if (slot->format != FT_GLYPH_FORMAT_BITMAP)
+ return -1;
+
+ /* compute the size of the final bitmap */
+ ftbit = &slot->bitmap;
+
+ width = ftbit->width;
+ height = ftbit->rows;
+ pitch = (width + 3) & ~3;
+
+ switch (ftbit->pixel_mode) {
+ case FT_PIXEL_MODE_MONO:
+ if (mode == FT_RENDER_MODE_MONO) {
+ pitch = (((width + 31) & ~31) >> 3);
+ break;
+ }
+ /* fall-through */
+
+ case FT_PIXEL_MODE_GRAY:
+ if (mode == FT_RENDER_MODE_LCD ||
+ mode == FT_RENDER_MODE_LCD_V)
+ {
+ /* each pixel is replicated into a 32-bit ARGB value */
+ pitch = width * 4;
+ }
+ break;
+
+ case FT_PIXEL_MODE_LCD:
+ if (mode != FT_RENDER_MODE_LCD)
+ return -1;
+
+ /* horz pixel triplets are packed into 32-bit ARGB values */
+ width /= 3;
+ pitch = width * 4;
+ break;
+
+ case FT_PIXEL_MODE_LCD_V:
+ if (mode != FT_RENDER_MODE_LCD_V)
+ return -1;
+
+ /* vert pixel triplets are packed into 32-bit ARGB values */
+ height /= 3;
+ pitch = width * 4;
+ break;
+
+ default: /* unsupported source format */
+ return -1;
+ }
+
+ target->width = width;
+ target->rows = height;
+ target->pitch = pitch;
+ target->buffer = NULL;
+
+ return pitch * height;
+}
+
+/* this functions converts the glyph bitmap found in a FT_GlyphSlot
+ * into a different format (see _compute_xrender_bitmap_size)
+ *
+ * you should call this function after _compute_xrender_bitmap_size
+ *
+ * target :: target bitmap descriptor. Note that its 'buffer' pointer
+ * must point to memory allocated by the caller
+ *
+ * slot :: the glyph slot containing the source bitmap
+ *
+ * mode :: the requested final rendering mode
+ *
+ * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
+ */
+static void
+_fill_xrender_bitmap(FT_Bitmap *target,
+ FT_GlyphSlot slot,
+ FT_Render_Mode mode,
+ int bgr)
+{
+ FT_Bitmap *ftbit = &slot->bitmap;
+ unsigned char *srcLine = ftbit->buffer;
+ unsigned char *dstLine = target->buffer;
+ int src_pitch = ftbit->pitch;
+ int width = target->width;
+ int height = target->rows;
+ int pitch = target->pitch;
+ int subpixel;
+ int h;
+
+ subpixel = (mode == FT_RENDER_MODE_LCD ||
+ mode == FT_RENDER_MODE_LCD_V);
+
+ if (src_pitch < 0)
+ srcLine -= src_pitch * (ftbit->rows - 1);
+
+ target->pixel_mode = ftbit->pixel_mode;
+
+ switch (ftbit->pixel_mode) {
+ case FT_PIXEL_MODE_MONO:
+ if (subpixel) {
+ /* convert mono to ARGB32 values */
+
+ for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch) {
+ int x;
+
+ for (x = 0; x < width; x++) {
+ if (srcLine[(x >> 3)] & (0x80 >> (x & 7)))
+ ((unsigned int *) dstLine)[x] = 0xffffffffU;
+ }
+ }
+ target->pixel_mode = FT_PIXEL_MODE_LCD;
+
+ } else if (mode == FT_RENDER_MODE_NORMAL) {
+ /* convert mono to 8-bit gray */
+
+ for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch) {
+ int x;
+
+ for (x = 0; x < width; x++) {
+ if (srcLine[(x >> 3)] & (0x80 >> (x & 7)))
+ dstLine[x] = 0xff;
+ }
+ }
+ target->pixel_mode = FT_PIXEL_MODE_GRAY;
+
+ } else {
+ /* copy mono to mono */
+
+ int bytes = (width + 7) >> 3;
+
+ for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch)
+ memcpy (dstLine, srcLine, bytes);
+ }
+ break;
+
+ case FT_PIXEL_MODE_GRAY:
+ if (subpixel) {
+ /* convert gray to ARGB32 values */
+
+ for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch) {
+ int x;
+ unsigned int *dst = (unsigned int *) dstLine;
+
+ for (x = 0; x < width; x++) {
+ unsigned int pix = srcLine[x];
+
+ pix |= (pix << 8);
+ pix |= (pix << 16);
+
+ dst[x] = pix;
+ }
+ }
+ target->pixel_mode = FT_PIXEL_MODE_LCD;
+ } else {
+ /* copy gray into gray */
+
+ for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch)
+ memcpy (dstLine, srcLine, width);
+ }
+ break;
+
+ case FT_PIXEL_MODE_LCD:
+ if (!bgr) {
+ /* convert horizontal RGB into ARGB32 */
+
+ for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch) {
+ int x;
+ unsigned char *src = srcLine;
+ unsigned int *dst = (unsigned int *) dstLine;
+
+ for (x = 0; x < width; x++, src += 3) {
+ unsigned int pix;
+
+ pix = ((unsigned int)src[0] << 16) |
+ ((unsigned int)src[1] << 8) |
+ ((unsigned int)src[2] ) |
+ ((unsigned int)src[1] << 24) ;
+
+ dst[x] = pix;
+ }
+ }
+ } else {
+ /* convert horizontal BGR into ARGB32 */
+
+ for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch) {
+
+ int x;
+ unsigned char *src = srcLine;
+ unsigned int *dst = (unsigned int *) dstLine;
+
+ for (x = 0; x < width; x++, src += 3) {
+ unsigned int pix;
+
+ pix = ((unsigned int)src[2] << 16) |
+ ((unsigned int)src[1] << 8) |
+ ((unsigned int)src[0] ) |
+ ((unsigned int)src[1] << 24) ;
+
+ dst[x] = pix;
+ }
+ }
+ }
+ break;
+
+ default: /* FT_PIXEL_MODE_LCD_V */
+ /* convert vertical RGB into ARGB32 */
+ if (!bgr) {
+
+ for (h = height; h > 0; h--, srcLine += 3 * src_pitch, dstLine += pitch) {
+ int x;
+ unsigned char* src = srcLine;
+ unsigned int* dst = (unsigned int *) dstLine;
+
+ for (x = 0; x < width; x++, src += 1) {
+ unsigned int pix;
+#if 1
+ pix = ((unsigned int)src[0] << 16) |
+ ((unsigned int)src[src_pitch] << 8) |
+ ((unsigned int)src[src_pitch*2] ) |
+ 0xFF000000 ;
+#else
+ pix = ((unsigned int)src[0] << 16) |
+ ((unsigned int)src[src_pitch] << 8) |
+ ((unsigned int)src[src_pitch*2] ) |
+ ((unsigned int)src[src_pitch] << 24) ;
#endif
- { 65538*9/13,65538*3/13,65538*1/13 },
- /* green */
- { 65538*1/6, 65538*4/6, 65538*1/6 },
- /* blue */
- { 65538*1/13,65538*3/13,65538*9/13 },
+ dst[x] = pix;
+ }
+ }
+ } else {
+
+ for (h = height; h > 0; h--, srcLine += 3*src_pitch, dstLine += pitch) {
+ int x;
+ unsigned char *src = srcLine;
+ unsigned int *dst = (unsigned int *) dstLine;
+
+ for (x = 0; x < width; x++, src += 1) {
+ unsigned int pix;
+
+ pix = ((unsigned int)src[src_pitch * 2] << 16) |
+ ((unsigned int)src[src_pitch] << 8) |
+ ((unsigned int)src[0] ) |
+ ((unsigned int)src[src_pitch] << 24) ;
+
+ dst[x] = pix;
+ }
+ }
+ }
+ }
+}
+
/* Fills in val->image with an image surface created from @bitmap
@@ -766,7 +1053,7 @@
int width, height, stride;
unsigned char *data;
int format = CAIRO_FORMAT_A8;
- cairo_bool_t subpixel = FALSE;
+ cairo_image_surface_t *image;
width = bitmap->width;
height = bitmap->rows;
@@ -823,11 +1110,7 @@
case FT_PIXEL_MODE_LCD:
case FT_PIXEL_MODE_LCD_V:
case FT_PIXEL_MODE_GRAY:
- switch (font_options->antialias) {
- case CAIRO_ANTIALIAS_DEFAULT:
- case CAIRO_ANTIALIAS_GRAY:
- case CAIRO_ANTIALIAS_NONE:
- default:
+ if (font_options->antialias != CAIRO_ANTIALIAS_SUBPIXEL) {
stride = bitmap->pitch;
if (own_buffer) {
data = bitmap->buffer;
@@ -839,104 +1122,16 @@
memcpy (data, bitmap->buffer, stride * height);
format = CAIRO_FORMAT_A8;
- break;
- case CAIRO_ANTIALIAS_SUBPIXEL: {
- int x, y;
- unsigned char *in_line, *out_line, *in;
- unsigned int *out;
- unsigned int red, green, blue;
- int rf, gf, bf;
- int s;
- int o, os;
- unsigned char *data_rgba;
- unsigned int width_rgba, stride_rgba;
- int vmul = 1;
- int hmul = 1;
+ } else {
+ /* if we get there, the data from the source bitmap
+ * really comes from _fill_xrender_bitmap, and is
+ * made of 32-bit ARGB or ABGR values */
+ assert (own_buffer != 0);
+ assert (bitmap->pixel_mode != FT_PIXEL_MODE_GRAY);
- switch (font_options->subpixel_order) {
- case CAIRO_SUBPIXEL_ORDER_DEFAULT:
- case CAIRO_SUBPIXEL_ORDER_RGB:
- case CAIRO_SUBPIXEL_ORDER_BGR:
- default:
- width /= 3;
- hmul = 3;
- break;
- case CAIRO_SUBPIXEL_ORDER_VRGB:
- case CAIRO_SUBPIXEL_ORDER_VBGR:
- vmul = 3;
- height /= 3;
- break;
- * Filter the glyph to soften the color fringes
- width_rgba = width;
+ data = bitmap->buffer;
stride = bitmap->pitch;
- stride_rgba = (width_rgba * 4 + 3) & ~3;
- data_rgba = calloc (stride_rgba, height);
- if (data_rgba == NULL) {
- if (own_buffer)
- free (bitmap->buffer);
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- os = 1;
- switch (font_options->subpixel_order) {
- case CAIRO_SUBPIXEL_ORDER_VRGB:
- os = stride;
- case CAIRO_SUBPIXEL_ORDER_DEFAULT:
- case CAIRO_SUBPIXEL_ORDER_RGB:
- default:
- rf = 0;
- gf = 1;
- bf = 2;
- break;
- case CAIRO_SUBPIXEL_ORDER_VBGR:
- os = stride;
- case CAIRO_SUBPIXEL_ORDER_BGR:
- bf = 0;
- gf = 1;
- rf = 2;
- break;
- in_line = bitmap->buffer;
- out_line = data_rgba;
- for (y = 0; y < height; y++)
- in = in_line;
- out = (unsigned int *) out_line;
- in_line += stride * vmul;
- out_line += stride_rgba;
- for (x = 0; x < width * hmul; x += hmul)
- red = green = blue = 0;
- o = 0;
- for (s = 0; s < 3; s++)
- red += filters[rf][s]*in[x+o];
- green += filters[gf][s]*in[x+o];
- blue += filters[bf][s]*in[x+o];
- o += os;
- red = red / 65536;
- green = green / 65536;
- blue = blue / 65536;
- *out++ = (green << 24) | (red << 16) | (green << 8) | blue;
- /* Images here are stored in native format. The
- * backend must convert to its own format as needed
- if (own_buffer)
- free (bitmap->buffer);
- data = data_rgba;
- stride = stride_rgba;
format = CAIRO_FORMAT_ARGB32;
- subpixel = TRUE;
- break;
break;
case FT_PIXEL_MODE_GRAY2:
@@ -948,19 +1143,20 @@
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- *surface = (cairo_image_surface_t *)
+ /* XXX */
+ *surface = image = (cairo_image_surface_t *)
cairo_image_surface_create_for_data (data,
format,
width, height, stride);
- if ((*surface)->base.status) {
+ if (image->base.status) {
free (data);
return (*surface)->base.status;
- if (subpixel)
- pixman_image_set_component_alpha ((*surface)->pixman_image, TRUE);
+ if (font_options->antialias == CAIRO_ANTIALIAS_SUBPIXEL)
+ pixman_image_set_component_alpha (image->pixman_image, TRUE);
- _cairo_image_surface_assume_ownership_of_data ((*surface));
+ _cairo_image_surface_assume_ownership_of_data (image);
return CAIRO_STATUS_SUCCESS;
@@ -985,16 +1181,59 @@
cairo_font_options_t *font_options,
cairo_image_surface_t **surface)
+ int rgba = FC_RGBA_UNKNOWN;
+ int lcd_filter = FT_LCD_FILTER_LEGACY;
FT_GlyphSlot glyphslot = face->glyph;
FT_Outline *outline = &glyphslot->outline;
FT_Bitmap bitmap;
FT_BBox cbox;
- FT_Matrix matrix;
- int hmul = 1;
- int vmul = 1;
- unsigned int width, height, stride;
- cairo_bool_t subpixel = FALSE;
+ unsigned int width, height;
cairo_status_t status;
+ FT_Error fterror;
+ FT_Library library = glyphslot->library;
+ FT_Render_Mode render_mode = FT_RENDER_MODE_NORMAL;
+
+ switch (font_options->antialias) {
+ case CAIRO_ANTIALIAS_NONE:
+ render_mode = FT_RENDER_MODE_MONO;
+ break;
+
+ case CAIRO_ANTIALIAS_SUBPIXEL:
+ switch (font_options->subpixel_order) {
+ case CAIRO_SUBPIXEL_ORDER_DEFAULT:
+ case CAIRO_SUBPIXEL_ORDER_RGB:
+ case CAIRO_SUBPIXEL_ORDER_BGR:
+ render_mode = FT_RENDER_MODE_LCD;
+ break;
+
+ case CAIRO_SUBPIXEL_ORDER_VRGB:
+ case CAIRO_SUBPIXEL_ORDER_VBGR:
+ render_mode = FT_RENDER_MODE_LCD_V;
+ break;
+ }
+
+ switch (font_options->lcd_filter) {
+ case CAIRO_LCD_FILTER_NONE:
+ lcd_filter = FT_LCD_FILTER_NONE;
+ break;
+ case CAIRO_LCD_FILTER_DEFAULT:
+ case CAIRO_LCD_FILTER_INTRA_PIXEL:
+ lcd_filter = FT_LCD_FILTER_LEGACY;
+ break;
+ case CAIRO_LCD_FILTER_FIR3:
+ lcd_filter = FT_LCD_FILTER_LIGHT;
+ break;
+ case CAIRO_LCD_FILTER_FIR5:
+ lcd_filter = FT_LCD_FILTER_DEFAULT;
+ break;
+ }
+
+ break;
+
+ case CAIRO_ANTIALIAS_DEFAULT:
+ case CAIRO_ANTIALIAS_GRAY:
+ render_mode = FT_RENDER_MODE_NORMAL;
+ }
FT_Outline_Get_CBox (outline, &cbox);
@@ -1005,20 +1244,21 @@
width = (unsigned int) ((cbox.xMax - cbox.xMin) >> 6);
height = (unsigned int) ((cbox.yMax - cbox.yMin) >> 6);
- stride = (width * hmul + 3) & ~3;
if (width * height == 0) {
cairo_format_t format;
/* Looks like fb handles zero-sized images just fine */
- switch (font_options->antialias) {
- case CAIRO_ANTIALIAS_NONE:
+ switch (render_mode) {
+ case FT_RENDER_MODE_MONO:
format = CAIRO_FORMAT_A1;
break;
- case CAIRO_ANTIALIAS_SUBPIXEL:
+ case FT_RENDER_MODE_LCD:
+ case FT_RENDER_MODE_LCD_V:
format= CAIRO_FORMAT_ARGB32;
break;
- case CAIRO_ANTIALIAS_DEFAULT:
- case CAIRO_ANTIALIAS_GRAY:
+ case FT_RENDER_MODE_LIGHT:
+ case FT_RENDER_MODE_NORMAL:
+ case FT_RENDER_MODE_MAX:
default:
format = CAIRO_FORMAT_A8;
break;
@@ -1030,73 +1270,73 @@
return (*surface)->base.status;
} else {
- matrix.xx = matrix.yy = 0x10000L;
- matrix.xy = matrix.yx = 0;
+ int bitmap_size;
- switch (font_options->antialias) {
- case CAIRO_ANTIALIAS_NONE:
- bitmap.pixel_mode = FT_PIXEL_MODE_MONO;
- bitmap.num_grays = 1;
- stride = ((width + 31) & -32) >> 3;
- break;
- case CAIRO_ANTIALIAS_DEFAULT:
- case CAIRO_ANTIALIAS_GRAY:
- bitmap.pixel_mode = FT_PIXEL_MODE_GRAY;
- bitmap.num_grays = 256;
- stride = (width + 3) & -4;
+ switch (render_mode) {
+ case FT_RENDER_MODE_LCD:
+ if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_BGR) {
+ rgba = FC_RGBA_BGR;
+ } else {
+ rgba = FC_RGBA_RGB;
+ }
break;
- case CAIRO_ANTIALIAS_SUBPIXEL:
- switch (font_options->subpixel_order) {
- case CAIRO_SUBPIXEL_ORDER_RGB:
- case CAIRO_SUBPIXEL_ORDER_BGR:
- case CAIRO_SUBPIXEL_ORDER_DEFAULT:
- default:
- matrix.xx *= 3;
- hmul = 3;
- subpixel = TRUE;
- break;
- case CAIRO_SUBPIXEL_ORDER_VRGB:
- case CAIRO_SUBPIXEL_ORDER_VBGR:
- matrix.yy *= 3;
- vmul = 3;
- subpixel = TRUE;
- break;
+ case FT_RENDER_MODE_LCD_V:
+ if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR) {
+ rgba = FC_RGBA_VBGR;
+ } else {
+ rgba = FC_RGBA_VRGB;
- FT_Outline_Transform (outline, &matrix);
- bitmap.pixel_mode = FT_PIXEL_MODE_GRAY;
- bitmap.num_grays = 256;
- stride = (width * hmul + 3) & -4;
+ break;
+ case FT_RENDER_MODE_MONO:
+ case FT_RENDER_MODE_LIGHT:
+ case FT_RENDER_MODE_NORMAL:
+ case FT_RENDER_MODE_MAX:
+ default:
+ break;
- bitmap.pitch = stride;
- bitmap.width = width * hmul;
- bitmap.rows = height * vmul;
- bitmap.buffer = calloc (stride, bitmap.rows);
- if (bitmap.buffer == NULL)
+#if HAVE_FT_LIBRARY_SETLCDFILTER
+ FT_Library_SetLcdFilter (library, lcd_filter);
+#endif
+
+ fterror = FT_Render_Glyph (face->glyph, render_mode);
+
+#if HAVE_FT_LIBRARY_SETLCDFILTER
+ FT_Library_SetLcdFilter (library, FT_LCD_FILTER_NONE);
+#endif
+
+ if (fterror != 0)
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- FT_Outline_Translate (outline, -cbox.xMin*hmul, -cbox.yMin*vmul);
+ bitmap_size = _compute_xrender_bitmap_size (&bitmap,
+ face->glyph,
+ render_mode);
+ if (bitmap_size < 0)
+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- if (FT_Outline_Get_Bitmap (glyphslot->library, outline, &bitmap) != 0) {
- free (bitmap.buffer);
+ bitmap.buffer = calloc (1, bitmap_size);
+ if (bitmap.buffer == NULL)
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+ _fill_xrender_bitmap (&bitmap, face->glyph, render_mode,
+ (rgba == FC_RGBA_BGR || rgba == FC_RGBA_VBGR));
+
+ /* Note:
+ * _get_bitmap_surface will free bitmap.buffer if there is an error
+ */
status = _get_bitmap_surface (&bitmap, TRUE, font_options, surface);
if (status)
return status;
- * Note: the font's coordinate system is upside down from ours, so the
- * Y coordinate of the control box needs to be negated. Moreover, device
- * offsets are position of glyph origin relative to top left while xMin
- * and yMax are offsets of top left relative to origin. Another negation.
- cairo_surface_set_device_offset (&(*surface)->base,
- floor (-(double) cbox.xMin / 64.0),
- floor (+(double) cbox.yMax / 64.0));
+ /* Note: the font's coordinate system is upside down from ours, so the
+ * Y coordinate of the control box needs to be negated. Moreover, device
+ * offsets are position of glyph origin relative to top left while xMin
+ * and yMax are offsets of top left relative to origin. Another negation.
+ */
+ cairo_surface_set_device_offset (&(*surface)->base,
+ (double)-glyphslot->bitmap_left,
+ (double)+glyphslot->bitmap_top);
+ }
return CAIRO_STATUS_SUCCESS;
@@ -1316,6 +1556,7 @@
if (antialias) {
cairo_subpixel_order_t subpixel_order;
+ int lcd_filter;
/* disable hinting if requested */
if (FcPatternGetBool (pattern,
@@ -1351,6 +1592,25 @@
ft_options.base.antialias = CAIRO_ANTIALIAS_SUBPIXEL;
+ if (FcPatternGetInteger (pattern,
+ FC_LCD_FILTER, 0, &lcd_filter) == FcResultMatch)
+ {
+ switch (lcd_filter) {
+ case FC_LCD_NONE:
+ ft_options.base.lcd_filter = CAIRO_LCD_FILTER_NONE;
+ break;
+ case FC_LCD_DEFAULT:
+ ft_options.base.lcd_filter = CAIRO_LCD_FILTER_FIR5;
+ break;
+ case FC_LCD_LIGHT:
+ ft_options.base.lcd_filter = CAIRO_LCD_FILTER_FIR3;
+ break;
+ case FC_LCD_LEGACY:
+ ft_options.base.lcd_filter = CAIRO_LCD_FILTER_INTRA_PIXEL;
+ break;
+ }
+ }
+
#ifdef FC_HINT_STYLE
if (FcPatternGetInteger (pattern,
FC_HINT_STYLE, 0, &hintstyle) != FcResultMatch)
@@ -1451,6 +1711,12 @@
if (other->base.hint_style == CAIRO_HINT_STYLE_NONE)
options->base.hint_style = CAIRO_HINT_STYLE_NONE;
+ if (options->base.lcd_filter == CAIRO_LCD_FILTER_DEFAULT)
+ options->base.lcd_filter = other->base.lcd_filter;
+
+ if (other->base.lcd_filter == CAIRO_LCD_FILTER_NONE)
+ options->base.lcd_filter = CAIRO_LCD_FILTER_NONE;
+
if (options->base.antialias == CAIRO_ANTIALIAS_NONE) {
if (options->base.hint_style == CAIRO_HINT_STYLE_NONE)
load_flags |= FT_LOAD_NO_HINTING;
@@ -1474,11 +1740,11 @@
case CAIRO_SUBPIXEL_ORDER_DEFAULT:
case CAIRO_SUBPIXEL_ORDER_RGB:
case CAIRO_SUBPIXEL_ORDER_BGR:
- load_target |= FT_LOAD_TARGET_LCD;
+ load_target = FT_LOAD_TARGET_LCD;
break;
case CAIRO_SUBPIXEL_ORDER_VRGB:
case CAIRO_SUBPIXEL_ORDER_VBGR:
- load_target |= FT_LOAD_TARGET_LCD_V;
+ load_target = FT_LOAD_TARGET_LCD_V;
break;
@@ -2421,6 +2687,34 @@
+ if (options->lcd_filter != CAIRO_LCD_FILTER_DEFAULT)
+ {
+ if (FcPatternGet (pattern, FC_LCD_FILTER, 0, &v) == FcResultNoMatch)
+ {
+ int lcd_filter;
+
+ switch (options->lcd_filter) {
+ case CAIRO_LCD_FILTER_NONE:
+ lcd_filter = FT_LCD_FILTER_NONE;
+ break;
+ case CAIRO_LCD_FILTER_DEFAULT:
+ case CAIRO_LCD_FILTER_INTRA_PIXEL:
+ lcd_filter = FT_LCD_FILTER_LEGACY;
+ break;
+ case CAIRO_LCD_FILTER_FIR3:
+ lcd_filter = FT_LCD_FILTER_LIGHT;
+ break;
+ default:
+ case CAIRO_LCD_FILTER_FIR5:
+ lcd_filter = FT_LCD_FILTER_DEFAULT;
+ break;
+ }
+
+ if (! FcPatternAddInteger (pattern, FC_LCD_FILTER, lcd_filter))
+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+ }
+ }
+
if (options->hint_style != CAIRO_HINT_STYLE_DEFAULT)
if (FcPatternGet (pattern, FC_HINTING, 0, &v) == FcResultNoMatch)
diff -urNad cairo-1.8.0~/src/cairo-surface.c cairo-1.8.0/src/cairo-surface.c
--- cairo-1.8.0~/src/cairo-surface.c 2008-09-25 22:28:56.000000000 +0200
+++ cairo-1.8.0/src/cairo-surface.c 2008-10-14 15:01:37.000000000 +0200
@@ -73,6 +73,7 @@
FALSE, /* has_font_options */ \
{ CAIRO_ANTIALIAS_DEFAULT, /* antialias */ \
CAIRO_SUBPIXEL_ORDER_DEFAULT, /* subpixel_order */ \
+ CAIRO_LCD_FILTER_DEFAULT, /* lcd_filter */ \
CAIRO_HINT_STYLE_DEFAULT, /* hint_style */ \
CAIRO_HINT_METRICS_DEFAULT /* hint_metrics */ \
} /* font_options */ \
diff -urNad cairo-1.8.0~/src/cairo-types-private.h cairo-1.8.0/src/cairo-types-private.h
--- cairo-1.8.0~/src/cairo-types-private.h 2008-09-25 22:29:06.000000000 +0200
+++ cairo-1.8.0/src/cairo-types-private.h 2008-10-14 15:01:37.000000000 +0200
@@ -113,9 +113,35 @@
cairo_bool_t is_snapshot;
+
+/**
+ * cairo_lcd_filter_t:
+ * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for
+ * font backend and target device
+ * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering
+ * @CAIRO_LCD_FILTER_INTRA_PIXEL: Intra-pixel filter
+ * @CAIRO_LCD_FILTER_FIR3: FIR filter with a 3x3 kernel
+ * @CAIRO_LCD_FILTER_FIR5: FIR filter with a 5x5 kernel
+ *
+ * The LCD filter specifies the low-pass filter applied to LCD-optimized
+ * bitmaps generated with an antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL.
+ *
+ * Note: This API was temporarily made available in the public
+ * interface during the 1.7.x development series, but was made private
+ * before 1.8.
+ **/
+typedef enum _cairo_lcd_filter {
+ CAIRO_LCD_FILTER_DEFAULT,
+ CAIRO_LCD_FILTER_NONE,
+ CAIRO_LCD_FILTER_INTRA_PIXEL,
+ CAIRO_LCD_FILTER_FIR3,
+ CAIRO_LCD_FILTER_FIR5
+} cairo_lcd_filter_t;
+
struct _cairo_font_options {
cairo_antialias_t antialias;
cairo_subpixel_order_t subpixel_order;
+ cairo_lcd_filter_t lcd_filter;
cairo_hint_style_t hint_style;
cairo_hint_metrics_t hint_metrics;
diff -urNad cairo-1.8.0~/src/cairo-xlib-screen.c cairo-1.8.0/src/cairo-xlib-screen.c
--- cairo-1.8.0~/src/cairo-xlib-screen.c 2008-09-25 22:29:39.000000000 +0200
+++ cairo-1.8.0/src/cairo-xlib-screen.c 2008-10-14 15:01:37.000000000 +0200
@@ -150,13 +150,22 @@
cairo_bool_t xft_antialias;
int xft_hintstyle;
int xft_rgba;
+ int xft_lcdfilter;
cairo_antialias_t antialias;
cairo_subpixel_order_t subpixel_order;
+ cairo_lcd_filter_t lcd_filter;
cairo_hint_style_t hint_style;
if (!get_boolean_default (dpy, "antialias", &xft_antialias))
xft_antialias = TRUE;
+ if (!get_integer_default (dpy, "lcdfilter", &xft_lcdfilter)) {
+ /* -1 is an non-existant Fontconfig constant used to differentiate
+ * the case when no lcdfilter property is available.
+ */
+ xft_lcdfilter = -1;
+ }
+
if (!get_boolean_default (dpy, "hinting", &xft_hinting))
xft_hinting = TRUE;
@@ -239,6 +248,24 @@
subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT;
+ switch (xft_lcdfilter) {
+ case FC_LCD_NONE:
+ lcd_filter = CAIRO_LCD_FILTER_NONE;
+ break;
+ case FC_LCD_DEFAULT:
+ lcd_filter = CAIRO_LCD_FILTER_FIR5;
+ break;
+ case FC_LCD_LIGHT:
+ lcd_filter = CAIRO_LCD_FILTER_FIR3;
+ break;
+ case FC_LCD_LEGACY:
+ lcd_filter = CAIRO_LCD_FILTER_INTRA_PIXEL;
+ break;
+ default:
+ lcd_filter = CAIRO_LCD_FILTER_DEFAULT;
+ break;
+ }
+
if (xft_antialias) {
if (subpixel_order == CAIRO_SUBPIXEL_ORDER_DEFAULT)
antialias = CAIRO_ANTIALIAS_GRAY;
@@ -251,6 +278,7 @@
cairo_font_options_set_hint_style (&info->font_options, hint_style);
cairo_font_options_set_antialias (&info->font_options, antialias);
cairo_font_options_set_subpixel_order (&info->font_options, subpixel_order);
+ _cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter);
cairo_font_options_set_hint_metrics (&info->font_options, CAIRO_HINT_METRICS_ON);
diff -urNad cairo-1.8.0~/src/cairoint.h cairo-1.8.0/src/cairoint.h
--- cairo-1.8.0~/src/cairoint.h 2008-09-26 00:56:48.000000000 +0200
+++ cairo-1.8.0/src/cairoint.h 2008-10-14 15:01:37.000000000 +0200
@@ -1336,6 +1336,13 @@
_cairo_font_options_init_copy (cairo_font_options_t *options,
const cairo_font_options_t *other);
+cairo_private void
+_cairo_font_options_set_lcd_filter (cairo_font_options_t *options,
+ cairo_lcd_filter_t lcd_filter);
+
+cairo_private cairo_lcd_filter_t
+_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options);
+
/* cairo-hull.c */
cairo_private cairo_status_t
_cairo_hull_compute (cairo_pen_vertex_t *vertices, int *num_vertices);
Last edited by Jimi (2009-10-21 23:00:23)

Similar Messages

  • Is there a way to do a global font change in iWeb '09?

    Hi,
    I inherited a web site, created in iWeb '09. I've got the site files on my Mac ... when I start iWeb,
    and select a page to edit, it complains:
    The following errors occurred while trying to open this page:
    Missing Font TrajanPro-Regular
    Missing Font TrajanPro-Bold
    Missing Font HelveticaNeue-Roman
    Many (most or all) pages in the web site need these three fonts.
    Thru googling, I know that those three fonts are proprietary fonts that I could purchase.
    However, it seems silly to buy and install a font when the web server and end-user's
    browser won't have it (and will therefore get substituted at their end).
    Therefore, I think that my best choice is to change all uses of those fonts in the web site to
    be uses of some "standard web fonts".
    So, how do I do a global font change or substitution in iWeb '09? It seems like an awfully
    obvious thing to want to do. (Finding each instance of use and manually selecting the text
    and doing a font change is simply not feasible.)
    (E.g.: Change "HelveticeNeue-Roman" to "Helvetica Regular")
    thanks,
    Stan
    [email protected]

    how do I do a global font change or substitution in iWeb '09?
    There is no way to do what you want. Send a feature request to Apple via http://www.apple.com/feedback.iweb.html.
    OT

  • [SOLVED] Java Font Too Small in OpenBox

    I usually use Cinnamon, but decided to give OpenBox a whirl again. I am encountering a problem with OpenBox and the size of fonts in Java apps. I'm using the Oracle JDK, not OpenJDK.
    These first screenshots show the font on OpenBox being too small:
    http://www.dadburn.com/linuxscreenshots … tprob1.png
    http://www.dadburn.com/linuxscreenshots … tprob2.png
    As you can see, the fonts used for the controls is super tiny. As can be seen from the second example, the font can be configured in the editing portion through the applications. But the controls themselves remain too small.
    When I log into the SAME account, but use Cinnamon, the fonts are fine. Reference:
    http://www.dadburn.com/linuxscreenshots … tprob3.png
    http://www.dadburn.com/linuxscreenshots … tprob4.png
    So the only difference in these screenshots are the fonts. And the only difference is that I am using Cinnamon vs OpenBox. I;ve searched Google and the Wiki and the Forums, but I'm either not using the proper search terms or just overlooking the results. Can anyone point me in the right direction.
    Also, I am using the fontconfig-infinality stuff. I don't think that matters and again, Cinnamon works and OpenBox has too small a font. And the problem is only on Java apps, not other things.
    Thanks in advance.
    Last edited by mrunion (2014-08-10 03:10:58)

    I've done more digging. I have this in my /etc/profile:
    export _JAVA_OPTIONS='-Dswing.systemlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.aatext=true -Dawt.useSystemAAFontSettings=on'
    Well, this screws up gdx-setup (the first screenshot). If I only use
    export _JAVA_OPTIONS='-Dswing.aatext=true -Dawt.useSystemAAFontSettings=on'
    Then gdx-setup looks fine. Netbeans was still messed up either way. I did find that it seems Netbeans has issues with the GTK+ look and feel on non-GTK platforms. So I reverted NetBeans to the (ugly) Metal theme and now the fonts are bigger.
    So I am marking this as solved. It seems that the GTK+ look and feel is just not happy on non-GTK+ platforms. I guess that makes sense in a way.

  • (Solved) Openbox font too small

    I've removed gnome and installed openbox, and now my fonts are too small. My firefox webpage fonts are fine, tint2 fonts are ok as well. But I think some leftover gnome setting is affecting it. I deleted .gnome2, but it's not working. What should I do?
    EDIT: Fixed! Didn't think of Xorg at first
    Last edited by zephyrus17 (2009-11-05 11:53:03)

    I've done more digging. I have this in my /etc/profile:
    export _JAVA_OPTIONS='-Dswing.systemlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.aatext=true -Dawt.useSystemAAFontSettings=on'
    Well, this screws up gdx-setup (the first screenshot). If I only use
    export _JAVA_OPTIONS='-Dswing.aatext=true -Dawt.useSystemAAFontSettings=on'
    Then gdx-setup looks fine. Netbeans was still messed up either way. I did find that it seems Netbeans has issues with the GTK+ look and feel on non-GTK platforms. So I reverted NetBeans to the (ugly) Metal theme and now the fonts are bigger.
    So I am marking this as solved. It seems that the GTK+ look and feel is just not happy on non-GTK+ platforms. I guess that makes sense in a way.

  • Does anybody know how to solve this font problem?

    Hello everyone,
    I have had this font problem for weeks now and I can't seem to get it solved. There are a number of fonts that won't load properly in Illustrator, PS, and InDesign. They are loaded in the system, but refuse to show up in the list. I've installed them in the home directory/library/fonts. These are commercial opentype fonts and one homemade opentype font. Sometimes the font that I created will appear, other times it does not, but many other fonts refuse to show up in the font display lists of these 3 software packages.
    I've cleared the font caches with FontNuke, everything looks like it should work properly, but it does not. Also, with Font Book, I've resolved any duplicate font problems. Does anybody know how to solve this problem? Is this a known CS4 bug?
    Any help would be greatly appreciated. I'm using the latest Mac Mini and CS4 software.
    Thanks in advance.
    CB

    Hi,
    How do I check if the fonts have the correct creator and so on?
    Anyway, I've spent the better part of today validating and removing suspect
    fonts. Why does the right click choice for resolve duplicates and the
    validate font behave completely differently in Font Book? I discovered that
    when this is investigated further with the validate font command, I found I
    had a massive amount of duplicates that according to font book cause minor
    errors. I thought that would have been sorted out with the resolve duplicate
    command, instead I ended up check marking and manually removing the fonts
    that had minor errors.
    I still have many commercial fonts plus my own font not showing up in
    Illustrator or PhotoShop. If I copy and paste the font directly into
    InDesign's font folder, my font shows up. I also tried removing my font to
    see if this would fix any of the other problems. It doesn't. I did type in
    my font name in the console dialog box and this message is displayed for
    this font as well as mine and many others.
    10-04-06 5:21:09 PM Font Book[12940] ##### ERROR:  The font system thinks
    the font
    file://localhost/Library/Fonts/Voluta%20Script%20Pro/VolutaScriptPro-Regular.otf
    is active, but the file no longer exists!
    Then I went back to font book to check to see if it is there and it is
    enabled. For my font the caution triangle appears with the multiple copies
    of the font is installed. Resolving duplicates doesn't solve this problem.
    Any ideas of how to fix this problem?
    Thanks
    CB

  • Set global font size for the whole application.

    Is there a way of setting a font globally
    What I mean I want to set a font size for the whole application.
    Is this posable ??
    Thanks Craig

    After posting over 300 questions I would think you would be passed the "New to Java TechnologY" stage.
    The answer for Swing applications is yes this can be done.
    I don't know how to do it for AWT components.
    Since you posted the question in this forum (as oppose to the Swing forum for Swing related problems), I'm assuming this is an AWT related question and therefore I can't help you.

  • [SEMI-SOLVED] MonoDevelop fonts are invisible in XMonad

    A MonoDevelop project open in the XMonad tiling window manager:
    The same MonoDevelop project is shown, but this time I opened it in the MATE Desktop Environment:
    Any idea what might be causing the fonts to “disappear” in XMonad?
    Note that the text is actually there in XMonad: in MonoDevelop’s editor, I can do CTRL+A CTRL+C and then paste in e.g. LeafPad and see that the text does exist, it is just misteriously invisible.
    I would really like to solve this since I want to use XMonad as my everyday environment.
    Last edited by Montague (2014-02-14 18:19:33)

    Well this issue is semi-solved, but honestly I do not know what fixed it.
    I wish I had a specific fix to share in case someone else encouters the same issue, but for the record here is what I tried, in no particular order.
    (The two last points probably have nothing to do with the problem I was having, as they relate to how Java programs behave in tiling WM, but as I said, I have no clue what fixed my invisible fonts in MonoDevelop (in XMonad), so I’ll just dump everything I did in that list…) :
    installed ttf-ms-fonts from the AUR
    installed a few themes from the AUR, i.e. adwaita-x-dark-and-light-theme and a few others
    removed `wmname LG3D' from my `~/.xinitrc'
    uncommented export _JAVA_AWT_WM_NONREPARENTING=1 in `/etc/profile.d/jre.sh'
    I think that’s it.
    P.S. : however, fonts are still invisible on some tabs in MonoDevelop, but that problem happens in both XMonad and MATE, so I marked this as [SEMI-SOLVED]. Any input appreciated !
    XMonad :
    MATE :
    Last edited by Montague (2014-02-14 18:07:02)

  • [SOLVED] Distorted fonts in oxygen-gtk theme

    I have install oxygen-gtk2 theme along with gtk-kde4.
    When my desktop effects are ON I am seeing distorted fonts in drop down menu's of gtk applications.
    They become normal when I move mouse on them. Also they appear normal when desktop effects are OFF.
    No other theme have any issue.
    Can anyone help me in solving this ?
    Versons:
    oxygen-gtk2 :  1.2.5-1
    gtk-kde4       :  0.9.5b-2
    Screen Shots:
    Last edited by girish_patel (2012-07-13 17:25:46)

    I have "Intel(R) Graphics Media Accelerator HD".
    I don't have flash video player running. This issue is consistent even without running anything else.
    And It is not visible in kde application or with other gtk themes.
    It comes only with oxygen-gtk, with kde desktop effects activated, only in gtk applications, only for text in pop-up menus.
    Even other texts in those application are normal.
    Is anybody else facing same issue in this combination ?

  • [SOLVED] X11: Fonts issue with HDL Designer

    Hi,
    Yesterday I installed HDL Designer for my job. But I couldn't launch it successfully.
    After some environment variable checks, it give me this error message:
    Error: Could not create FontSet for font '-adobe-helvetica-medium-r-normal-*-*-*-*-*-*-*-*'.
    The following character sets cannot be drawn with this font:
    ISO8859-1
    My locale is set on fr_CH-UTF-8 and the application set LC_ALL to C.
    And after some searchs, I found two non-working solutions:
    A pretty old:
    http://www.edaboard.com/thread1456.html
    I tried to create the old X11R6 directory and then do some symbolic links with no success.
    A recent one with the right applications version:
    http://forum.ubuntuusers.de/topic/solve … er-2013-1/
    I haven't found any equivalent package for "xfonts-75" in the official repositories nor in aur.
    So maybe I missed something like symbolics link 'cause I don't have the sames directories.
    Any idea?
    Thank you.
    [EDIT] Problem solved. I found the missing fonts package (xorg-fonts-75dpi).
    Last edited by st@uffi (2014-09-17 14:54:25)

    You might want to also ask in the Adobe forums:
    http://www.adobe.com/support/forums/

  • Synchronizing Adobe fonts to C:\Windows global fonts

    Hello all,
    Is there any problem with synchronizing the global Windows font folder
    C:\Windows\Fonts with the Common Files\Adobe\Fonts folder?
    Can I use the standard sync'ing app for that, such as GoodSync or Beyond
    Compare ?
    It escapes me as to why Adobe apps would build themselves/itself a private
    fonts folder. The average user is left completely vexed about using some
    font in Adobe-app-CS2 - then can't find the same font in Word or CorelDraw
    etc. etc.
    Tim

    Ahhhhhh Peter, you are brilliant... I sat here and wondered and wondered if <br />Bob had meant "install the fonts that are currently in the Adobe folder into <br />the Windows Fonts folder."  I have trusted Bob's postings in these newsgroup <br />for (I think years) and didn't want to misinterpret what he told me; but I <br />now understand his post by your confirming what he meant.<br /><br />Thank you so so much!!!!<br /><br />Tim<br /><br /><br /><br /><br /><br /><br /><[email protected]> wrote in message <br />news:[email protected]..<br />> Looking at Bob's post I can see how you might have been confused. In the <br />> Windows fonts folder, use the install fonts command and navigate to the <br />> private folder to find them. You should move them out of the private <br />> folder to a safe location after copying them into the Windows fonts <br />> folder.<br />><br />> Peter

  • [SOLVED] TrueType font rendering issues

    The problem I have run into is related to TrueType fonts.
    I have a netbook that I reinstalled Arch on. I have an i3-wm setup with an i3bar populated by i3status.
    I have multiple items that use unicode icons using the ttf-icons font.
    I installed two fonts, gohufont and ttf-icons, albeit in an unusualy way. Due to external reasons, the machine doesn't have an Internet connection, so I had to install the fonts sort-of manually.
    I downloaded the necessary files for the fonts and did it this way: the gohufont is in pcf format compressed with gzip. I looked at the fonts PKGBUILD file and manually repeated the installation process via `install(1)'. It was installed in /usr/share/fonts/misc. I did the same with ttf-icons and it is installed in /usr/share/fonts/TTF. After doing so, I updated the font cache via `fc-cache -fv'. Both fonts show up in the output of fc-list(1), Gohufont works fine, but the icons font doesn't.
    The .i3status.conf contains format lines with icons from the font and the ones that were in the file when it was retrieved from the machine it was running on do actually show up and render in the bar. Upon adding a new unicode symbol from vim via ^v+u+<char code>, it turns into a representation of ^<letter> (the color highlight indicates that it is a unicode char). The other glyphs aren't being rendered properly in vim either, as opposed to all being fine previously. Instead of the actual glyph, they show up as a sequence of: <rounded square with a question mark in it><tilde><letter>[<another tilde><another letter>]<round square with a question mark> (probably the closing symbol). After saving the file, the untouched glyphs still show up properly, but the added ones show up as wide blocks with digit codes in them.
    I am using gnome-terminal with a bash shell. Upon opening the font selection dialog in gnome-terminal and selecting the icons font, it is rendered as square blocks with numbers in them (thus, indicating that they didn't render properly).
    I also attempted placing them in appropriate subfolders under ~/.fonts and then running `mkfontscale', `mkfontdir' in the ~/.fonts directory and then appending the directory to the font path via `xset fp+ ~/.fonts' and rehashing via `xset fp rehash' and updating the font cache again via `fc-cache -fv'. Still no dice.
    I assume this might be a unicode problem, seeing as they're not being rendered in the terminal editor properly either.
    xorg-font-util, xorg-font-utils, fontconfig and freetype2 are all installed.
    Any tips or pointers would be highly appreciated.
    Update: I had forgotten to set the default locale, so it was "C". I have set LANG to en_US.UTF-8 in /etc/locale.conf and have explicitely exported the LANG variable to the same value in my .bashrc. For some reason, it didn't apply after restarting X or logging out and in, so I set it using `localectl set-locale' and that did take effect. Now the old unicode glyph characters are all round squares with questionmarks inside them in the config file when opened in VIM and the new one is still a ^<letter>. The old ones render in the bar but the new one doesn't.
    Update2: So apparently, a reboot was necessary for the changes to take effect system wide. The icons now appear in the terminal and everything. I just had to delete the ^<letter> representation of the broken one in the configuration file and re-enter it again. So this seems to be resolved. I will write down a step-by-step solution some time later (might be tomorrow, as I don't have the time at the moment). Anyone looking for a solution will probably find one here.
    Last edited by gk (2014-03-17 12:31:11)

    Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

  • [solved] wine fonts totally messed up

    here is a screenshot:
    www.nakamura-gebiet.de/screenshot_from_2008-12-09_at_14:22:59.png
    is it a wine, font, xorg and/or other problem?
    SOLVED:
    create text file (stuff.txt) with following entry:
    [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
    "ClientSideWithRender"="N"
    then run
    regedit stuff.txt
    thne it should work (at least for me).
    for some people it does not work. look at thread below.
    Last edited by DonVla (2008-12-09 14:34:56)

    heh?
    that's this thread.
    ps: thanks allen found right thread (http://bbs.archlinux.org/viewtopic.php?id=60316). my fault
    i've searched, but, hm, sometimes i'm kind of blind....
    Last edited by DonVla (2008-12-09 14:09:37)

  • [Solved] Strange font problem - after update.

    Hello guys,
    encountered a strange small font problem on sites with code wrappers like stackoverflow/blogs/jsfiddle. After update. took a look at my font setup all looks good.
    I've also checked the settings for gtk2/3 and no problems there.
    INFO:
    Google-Chrome-Beta. [same thing]
    Firefox [same thing]
    /etc/vconsole.conf ->
    KEYMAP=sv-latin1
    FONT=ter-112n
    .gtkrc-2.0->
    gtk-theme-name="Clearlooks"
    gtk-icon-theme-name="Faience"
    gtk-font-name="Tewi 9"
    gtk-cursor-theme-name="Adwaita"
    gtk-cursor-theme-size=0
    gtk-toolbar-style=GTK_TOOLBAR_BOTH
    gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
    gtk-button-images=1
    gtk-menu-images=1
    gtk-enable-event-sounds=0
    gtk-enable-input-feedback-sounds=0
    gtk-xft-antialias=1
    gtk-xft-hinting=1
    gtk-xft-hintstyle="hintfull"
    gtk-xft-rgba="none"
    /gtk-3.0/settings.ini->
    gtk-theme-name=Clearlooks
    gtk-icon-theme-name=Faience
    gtk-font-name=Tewi 9
    Any ideas on this problem would be greatfully appreciated.
    http://imgur.com/MD7yPI2
    Mod note: removed huge image -- WorMzy
    Last edited by Learning (2015-05-22 21:55:07)

    Update:
    Tried reinstalling, change the fonts, remove all font clear the cache.
    change, look up the settings, looked up size, tried monitor dpi.
    checked all the config files for anything remotely related to this problem.
    Had a quick look at the bug tracker for google-chrome-beta as well no reported
    font problems as far as i can find.
    Update2:
    Tried adding custom.css to the browser not even that worked.
    update3: [SOLVED]
    So i solved the problem.
    The problem was a faulty font that was stuck and used in the pre somehow.
    Removed and added another to the list and somehow that worked.
    recommendations - if anyone has this problem in the future.
    open firefox and look in the font tab what is used. and remove that
    or try to install a fixed one. that should work.
    -Nothing has yielded any working results.
    So any ideas at this point would be most appreciated.
    Thanks,
    -L
    Last edited by Learning (2015-05-22 21:59:14)

  • Is it yet possible to change all global font sizes in thunderbird?

    I see there are several posts about the base font sizes in thunderbird but have you actually solved this yet please?

    These are the Options available to you which can increase the font size of '''everything''' in Thunderbird - Folder pane - email list etc. It is up to you which you choose to use.
    '''1. Increase screen resolution'''
    You have not told us what screen resolution you are using. This will effect everything you see on your desktop and all windows including Thunderbird. So if you are having an issue with the idea of using addon or creating a userChrome.css file then try this first.
    Control Panel > Personalization > Display Settings A high Resolution will decrease the overall size of everything. If you are finding everything on your computer including everything in Thunderbird is too small, then lower the Resolution setting to increase the over all appearance of size. It is operated using a slide bar. then click on Apply and then OK when happy with result.
    '''2. Use an Addon: '''
    addon will only effect Thunderbird and not other programs nor desktop.
    * https://addons.mozilla.org/en-us/thunderbird/addon/theme-font-size-changer/
    download the addon to your computer. then install the addon following this information:
    * https://support.mozilla.org/en-US/kb/add-ons-and-extensions-faq#w_how-do-i-install-an-add-on
    '''3. create css file This only effects Thunderbird.'''
    This may seem a little daunting, but it is simple. It requires you to be able to follow instructions, create folders, copy paste and save files. You do not need to actually write code.
    Make Hidden files and folder visible:
    * http://kb.mozillazine.org/Show_hidden_files_and_folders
    In Thunderbird:
    * Help > Troubleshooting Information
    * click on 'show folder' button
    * a new window opens showing your Profile folder.
    * '''Close Thunderbird now - this is important.'''
    Create new folder and call it '''chrome''' note the spelling - use a lower case 'c' It should be in the same place as the 'Mail' folder.
    open Notepad:
    usually located under All Programs > accessories > Notepad
    Copy all the text between lines below and paste it into the Notepad document.
    <pre>
    * Do not remove the @namespace line -- it's required for correct functioning
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    *Make all the default font sizes eg:14 px:
    * { font-size: '''14px''' !important; }
    </pre>
    If this proves to be too small you can edit the 14px to say 16px etc
    Save the document as filename '''userChrome.css''' in the '''chrome''' folder. Note the spelling all lower case except for the 'C'.
    Restart Thunderbird.

  • Global font changes

    I just noticed that when I globally change the font in a document I lose formatting elements like italics and bold. This seems like a strange default option. Is there any way I can avoid it.

    You need to create your own default template. Set up your document with the margins, headers, etc. as you'd like. Redefine all of the paragraph & character styles to have your desired font.
    While you're at it, you might want to set default styles for all objects, text boxes, tables, paragraph styles, etc. Start with a blank document & insert an object. Change the color, wrap, etc. to your choosing & then go to Format > Advanced > Define Default Shape Style then delete the object. Repeat with an image/photo, a text box & a table.
    Now, save this as a template then, in Pages > Preferences, select this template as the default for new documents. All of your new documents will have these settings for inserted objects, images & tables. Unfortunately, the settings won't apply to any other templates or "foreign" documents you open with Pages.

Maybe you are looking for