From patchwork Sat Jul 1 08:41:49 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jlacvdr X-Patchwork-Id: 12349 Received: from aub78-1-82-234-23-163.fbx.proxad.net ([82.234.23.163] helo=matrix.jlac.dyndns.org) by www.linuxtv.org with esmtp (Exim 4.50) id 1Fwb31-0007Rp-OE for vdr@linuxtv.org; Sat, 01 Jul 2006 10:41:51 +0200 Received: from Moustik (moustik.jlac.dyndns.org [192.168.0.21]) by matrix.jlac.dyndns.org (Postfix) with ESMTP id D8734452D8 for ; Sat, 1 Jul 2006 10:41:57 +0200 (CEST) Subject: [vdr] [Patch] text2skin plugins & no OSD with libfreetype6 2.2 From: jlacvdr To: VDR Mailing List In-Reply-To: <446DD49E.6020001@teledetection.fr> References: <446C5545.1080301@syphir.sytes.net> <446DD49E.6020001@teledetection.fr> Date: Sat, 01 Jul 2006 10:41:49 +0200 Message-Id: <1151743309.5037.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 08:41:52 -0000 Status: O X-Status: X-Keywords: X-UID: 9990 Hi, The attached patch file fix the text2skin plugin which doesn't display OSD text when it's linking with libfreetype6 2.2 Best Regards, Jerome --- text2skin-1.0-orig/graphtft/font.c 2005-01-30 19:09:42.000000000 +0100 +++ text2skin/graphtft/font.c 2006-06-30 21:33:53.000000000 +0200 @@ -139,20 +139,21 @@ error = FT_Load_Glyph( _face, glyph_index, FT_LOAD_DEFAULT ); if ( error ) continue; /* ignore errors */ - // convert to a mono bitmap - error = FT_Render_Glyph( _face->glyph, ft_render_mode_mono ); - if ( error ) continue; - // now, convert to vdr font data int width = (_slot->metrics.horiAdvance / 64) + 1; int bearingX = (_slot->metrics.horiBearingX / 64) +1; width = (width > (int)sizeof(cFont::tPixelData) * 8) ? (((int)sizeof(cFont::tPixelData) * 8)-2) :width ; - int top = _slot->bitmap_top; - int y_off = Size - top; font_data[(num_char_array*num_rows)+0]=width; font_data[(num_char_array*num_rows)+1]=num_rows_global; + // convert to a mono bitmap + error = FT_Render_Glyph( _face->glyph, ft_render_mode_mono ); + if ( error ) continue; + + int top = _slot->bitmap_top; + int y_off = Size - top; + unsigned char *bmp = _slot->bitmap.buffer; for (int y = 0; y < _slot->bitmap.rows; ++y , y_off++) {