So, after a bit more testing, my main issue is that I can't figure out how to make the border thin enough. Like I said above, if I use a border radius of less that 64 then the border is no longer fully opaque and instead gets a greyish tone.
Like in the FreeType example, I first render the border and then render the actual glyph on top of it, which results in this: https://dl.dropbox.com/u/2406449/FreeType/fat_border.jpg I'd like the border to be way thinner. How do I achieve that? On Mon, Feb 11, 2013 at 10:23 AM, Soren Dreijer <[email protected]>wrote: > Hi Werner, > > Yes, I've already taken a look at the example, but it doesn't resemble any > of the other tutorials on the website since it renders with spans rather > than to a bitmap. Ignoring that part, though, the only difference between > that code and mine is that it uses FT_Glyph_StrokeBorder() rather than > FT_Glyph_Stroke() and that the stroke radius is much thicker than mine > (outlineWidth * 64). > > If I change my example to use a radius of 64, then it looks much better > (there's actually a black border), but the problem is that I'm rendering > with a huge font size (a height of 400 pixels) for testing purposes and as > soon as I make the characters a regular size, e.g. 32 pixels tall, then I > can't use a border with a radius of 64 since that eats up the full glyph, > and making the border any smaller results in my original problem (i.e. no > opaque pixels in the border). > > The example you linked to also render the border in a different way: it > uses FT_Glyph_StrokeBorder() to create the border (which looks like this > https://dl.dropbox.com/u/2406449/FreeType/outside_border.jpg), which is > fully opaque, and then the example draws that before the actual glyph (I > think there was a question here on the mailing list from somebody else > regarding that order). > > I just want the same border that FT_Glyph_StrokeBorder() (correctly) > generates, but with the proper opaque colors as generated by > FT_Glyph_StrokeBorder(). > > > On Mon, Feb 11, 2013 at 12:42 AM, Werner LEMBERG <[email protected]> wrote: > >> >> > I'm trying to create a border outline around my FreeType glyphs with >> > the stroke functions [...] >> > >> > Am I doing something horribly wrong here or what's going on? >> >> No time to look closer into your example, but have you seen this >> tutorial? >> >> http://www.freetype.org/freetype2/docs/tutorial/example2.cpp >> >> >> Werner >> > >
_______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
