|
From: | Cristian Vicol |
Subject: | Re: [ft] Fill and stroke |
Date: | Tue, 25 Aug 2009 23:49:20 +0200 |
Thanks a
lot!
The rastered glyphs look much better now. Unfortunatelly, I'm facing now a problem which I had not previously, when working with bitmap glyphs. I need to transform (slant) some glyphs. As long as only one glyph variant occurs (either normal or slanted), all it's ok. But as soon I have both variants for the same glyph and pointsize, I'm geting the SAME spans on the second call as in the first one. Basically I used similar code you've posted, with the difference that I'm doing after FT_Load_Glyph FT_Get_Glyph(face->glyph, &glyph); if(fbSlanted) FT_Glyph_Set_Transform(glyph, &slantMatrix, NULL); else FT_Glyph_Set_Transform(glyph, NULL, NULL); This is called with fbSlanted TRUE or FALSE, according to input text: I'm getting in the second call (for the same glyph/pointsize combination) the same spans as in the first one. For all glyphs I'm using FT_Done_Glyph at the end of the function. It seems as FreeType is doing some sort of spans caching... What else should I reset? Best regards, Cristian Vicol ----- Original Message ----- From: "Erik Möller" <address@hidden> To: "'Cristi'" <address@hidden>; <address@hidden> Sent: Wednesday, August 19, 2009 9:05 PM Subject: RE: [ft] Fill and stroke Hi Cristian, As far as I know the only way to do that properly is by using freetypes direct rendering feature. I did a small sample program to illustrate how to do this last time the topic was on the list. Check out this link http://freetype.sourceforge.net/freetype2/docs/tutorial/step3.html Kind regards, Erik Möller http://www.timetrap.se -----Original Message----- From: address@hidden [mailto:address@hidden On Behalf Of Cristi Sent: den 19 augusti 2009 12:05 To: address@hidden Subject: [ft] Fill and stroke Hello, Is it possible with FreeType to fill and stroke a glyph in a singe raster operation? The problem I have is that decomposed in two steps (fill and the stroke) and then copy both images, the result does not see good. For some fonts/glyphs the stroked glyph is smaller then the filled one (theoretically should be bigger), for others the shape is completly different or the difference between left offsets (bitmap.left) too big. That's why the resulting images contain gaps between the stroked and filled glyph. Is there a way to directly fill and stroke an outline? Thanks! Cristian Vicol -- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser _______________________________________________ Freetype mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/freetype __________ Information from ESET NOD32 Antivirus, version of virus signature database 4347 (20090819) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4349 (20090819) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com |
[Prev in Thread] | Current Thread | [Next in Thread] |