--- deliantra/Deliantra-Client/Client.xs 2006/08/04 16:49:58 1.134 +++ deliantra/Deliantra-Client/Client.xs 2006/08/14 03:04:17 1.139 @@ -146,12 +146,21 @@ static void layout_get_pixel_size (CFPlus__Layout self, int *w, int *h) { - pango_layout_get_pixel_size (self->pl, w, h); + PangoRectangle rect; - if (!*w) *w = 1; - if (!*h) *h = 1; + // get_pixel_* wrongly rounds down + pango_layout_get_extents (self->pl, 0, &rect); - *w = (*w + 3) & ~3; + rect.width = (rect.width + PANGO_SCALE - 1) / PANGO_SCALE; + rect.height = (rect.height + PANGO_SCALE - 1) / PANGO_SCALE; + + if (!rect.width) rect.width = 1; + if (!rect.height) rect.height = 1; + + rect.width = (rect.width + 3) & ~3; + + *w = rect.width; + *h = rect.height; } typedef uint16_t mapface; @@ -1027,12 +1036,13 @@ } void -render (CFPlus::Layout self, float x, float y) +render (CFPlus::Layout self, float x, float y, int flags = 0) PPCODE: pango_opengl_render_layout_subpixel ( self->pl, x * PANGO_SCALE, y * PANGO_SCALE, - self->r, self->g, self->b, self->a + self->r, self->g, self->b, self->a, + flags ); MODULE = CFPlus PACKAGE = CFPlus::Texture @@ -1804,6 +1814,7 @@ const_iv (GL_CONVOLUTION_BORDER_MODE), const_iv (GL_CONSTANT_BORDER), const_iv (GL_LINES), + const_iv (GL_LINE_STRIP), const_iv (GL_LINE_LOOP), const_iv (GL_QUADS), const_iv (GL_QUAD_STRIP), @@ -2010,4 +2021,3 @@ void glCallList (int list) -